beryx-gist / badass-runtime-example-javafx

A small JavaFX application that shows how to use the Badass Runtime Plugin
Apache License 2.0
26 stars 3 forks source link

directory in windows is unknown #8

Closed knakul853 closed 4 years ago

knakul853 commented 4 years ago

Hi I am using runtime jpackage for packaging my application its working fine in ubuntu and macOs but in windows It seems app gets installed in the "Unknown" menu. i tried using the option provided in doc but couldn't fix it.

jpackage {
        if(org.gradle.internal.os.OperatingSystem.current().windows) {
            installerType = "msi"
            //list of additional options to be passed to the jpackage executable when creating the application installer.
            imageOptions = ['--icon', 'src/main/resources/MZmineIcon.ico']
            installerOptions = ['--win-menu', '--win-shortcut','--win-dir-chooser','--win-upgrade-uuid', "$uuid"]
        }
        if(org.gradle.internal.os.OperatingSystem.current().macOsX) {
            installerType = "dmg"
            //list of additional options to be passed to the jpackage executable when creating the application installer.
            imageOptions = ['--icon', 'src/main/resources/MZmineIcon.icns']
        }

            installerName = "MZmine"
            imageName = "MZmine"
    }

result

siordache commented 4 years ago

Try using the --win-menu-group option:

installerOptions = ['--win-menu', '--win-menu-group', 'MZmine Software',  '--win-shortcut','--win-dir-chooser','--win-upgrade-uuid', "$uuid"]
knakul853 commented 4 years ago

@siordache thanks a lot you are a life savior

why I am unable to create a shortcut for application in ubuntu. and also how do I know which formate of the image is acceptable for an icon I can't find any doc regarding this.

 installerOptions = ['--linux-shortcut', '--linux-menu-group', '--license-file', '--linux-deb-maintainer']
siordache commented 4 years ago

The options --linux-menu-group --license-file, and --linux-deb-maintainer expect an argument, so you need to specify something like this:

installerOptions = [
    '--linux-shortcut', 
    '--linux-menu-group', 'MZmine Software',
    '--license-file', 'src/main/resources/license.txt',
    '--linux-deb-maintainer', 'knakul853@gmail.com'
]

About the icon format the jpackage documentation says only: "Custom icons must be in a format that meets the requirements of the platform". For Linux you should probably use the PNG format.