我正在使用JavaFX Gradle plugin构建我的JavaFX应用程序。是否可以将多个开始菜单项添加到已完成的安装程序?
发布于 2017-09-30 14:31:31
在回答了你的other question regarding additional native launchers之后,我查看了JDK的源代码,看看这需要什么。
任何启用了"needMenu"-property的启动器都会反映在开始菜单中的某个菜单项中。只需在您的构建文件中添加类似以下内容:
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
]
]
}
免责声明:我是这个JavaFX-Gradle-plugin的创建者
https://stackoverflow.com/questions/46453186
复制相似问题