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?
control. Menu class provides all the methods to deal with menus. This class needs to be instantiated to create a Menu. The following sample of code shows the implementation of JavaFX menu.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With