beryx-gist/badass-runtime-example-javafx

directory in windows is unknown

knakul853 opened this issue · 3 comments

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

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

installerOptions = ['--win-menu', '--win-menu-group', 'MZmine Software',  '--win-shortcut','--win-dir-chooser','--win-upgrade-uuid', "$uuid"]

@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']

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.