-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing jpackage options #5227
base: master
Are you sure you want to change the base?
Add missing jpackage options #5227
Conversation
@@ -36,6 +36,8 @@ abstract class AbstractMacOSPlatformSettings : AbstractPlatformSettings() { | |||
var appCategory: String? = null | |||
var minimumSystemVersion: String? = null | |||
|
|||
var dmgContents = ArrayList<String>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is supported from 21 onwards, I considered having this option opt-in to make sure people are aware that this only works when building with jdk 21
But possibly I am overthinking this, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to check the toolchain here, and issue a warning (and ignore the property) if current JDK is older than 21?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it probably is possible, but I would need a pointer to somewhere this has been done to make sure I get it right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found if (jvmRuntimeInfo.majorVersion >= 18) {
on my own 😄
Not tested yet, only made sure to copy the values from documentation. Not sure how I can make a snapshot build from this to test in a sample projects. If there is an easy way to publish this as snapshot I have a sample repo to test these changes |
Please add a reference to https://youtrack.jetbrains.com/issue/CMP-2236 in the PR description |
I haven't used |
@@ -36,6 +36,8 @@ abstract class AbstractMacOSPlatformSettings : AbstractPlatformSettings() { | |||
var appCategory: String? = null | |||
var minimumSystemVersion: String? = null | |||
|
|||
var dmgContents = ArrayList<String>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to check the toolchain here, and issue a warning (and ignore the property) if current JDK is older than 21?
I agree, the documentation is bad there. I just spun up an ubuntu docker container to check this. I could confirm that the option accepts parameters and those affect the output .deb: This is the .deb I got with this jpackage command:
While the .deb without dependencies does not have this dependency (
Somewhat incomplete history of commands in case you want to reproduce (missing apt install openjdk tmux, but this will depend on the image)
|
Just some more tests, you can add multiple dependencies separated by comma:
And just putting it there without arguments does not add any binaries:
But this only works when its the last argument, otherwise it consumes the next one:
|
One more evidence that behaviour is different from documentation - this is the definition of the argument in code, its a string argument: |
…ike --linux-package-deps, so accept any string for now
Describe proposed changes and the issue being fixed
Adds additional jpackage options, introduced in jdk 17 and 21:
Fixes
Testing
Describe how you tested your changes. If possible and needed:
This should be tested by QA
Release Notes
Fixes - Desktop
--win-shortcut-prompt
,--win-update-url
,--linux-package-deps
and--mac-dmg-content