I'm using the JavaFX Gradle plugin to build my JavaFX application. Is it possible to add more than one start menu item to the finished installer?
Asked
Active
Viewed 265 times
15
-
2I've checked this, it seems that some special configuration is needed. When I found something working, I will provide you with an answer. **Disclaimer:** I'm the creator of the JavaFX Gradle plugin – FibreFoX Sep 29 '17 at 18:48
1 Answers
9
After answering your other question regarding additional native launchers I checked the sources of the JDK, to see what is needed for this.
Any launcher with the enabled "needMenu"-property will be reflected in some menu-entry inside the start-menu. Just add something like this to your buildfile:
jfx {
// ... normal configuration ...
// your secondary entry points, each will inherit the configuration, unless you specify otherwise here
secondaryLaunchers = [
[
appName: 'somethingDifferent2',
mainClass: 'your.different.entrypoint.MainApp',
// the following is required for an start-menu entry
needMenu: true
]
]
}
Disclaimer: I'm the creator of that JavaFX-Gradle-plugin

FibreFoX
- 2,858
- 1
- 19
- 41