Added comments, cleanup
@@ -224,29 +224,34 @@ runtime {
"jdk.unsupported",
"jdk.unsupported.desktop"]
jpackage {
- if(org.gradle.internal.os.OperatingSystem.current().windows) {
+ if (OperatingSystem.current().isWindows()) {
+ // The WiX toolset must be installed, see https://wixtoolset.org/releases/
installerType = "msi"
// additional options for jpackage
- imageOptions = ['--icon', 'src/main/resources/MZmineIcon.ico']
- installerOptions = ['--win-menu',
- '--win-menu-group', 'MZmine',
- '--win-shortcut',
- '--win-dir-chooser',
- '--win-upgrade-uuid', "$uuid",
- '--license-file', 'LICENSE.txt'
+ imageOptions = ["--icon", "src/main/resources/MZmineIcon.ico"]
+ installerOptions = ["--win-menu",
+ "--win-menu-group", "MZmine",
+ "--win-shortcut",
+ "--win-dir-chooser",
+ "--win-upgrade-uuid", "$uuid",
+ "--license-file", "LICENSE.txt"
]
- } else if(org.gradle.internal.os.OperatingSystem.current().macOsX) {
+ }
+ if (OperatingSystem.current().isMacOsX()) {
installerType = "dmg"
// additional options for jpackage
- imageOptions = ['--icon', 'src/main/resources/MZmineIcon.icns']
- installerOptions = ['--license-file', 'LICENSE.txt']
- } else {
+ imageOptions = ["--icon", "src/main/resources/MZmineIcon.icns"]
+ installerOptions = ["--license-file", "LICENSE.txt"]
+ }
+ if (OperatingSystem.current().isLinux()) {
+ // rpmbuild and rpm tools need to be installed
+ installerType = ["rpm", "deb"]
// additional options for jpackage
- imageOptions = ['--icon', 'src/main/resources/MZmineIcon.png']
- installerOptions = ['--linux-shortcut',
- '--linux-menu-group','MZmine',
- '--license-file', 'LICENSE.txt',
- '--linux-deb-maintainer', "plusik@gmail.com"
+ imageOptions = ["--icon", "src/main/resources/MZmineIcon.png"]
+ installerOptions = ["--linux-shortcut",
+ "--linux-menu-group","MZmine",
+ "--license-file", "LICENSE.txt",
+ "--linux-deb-maintainer", "plusik@gmail.com"
]
}
