beryx / badass-runtime-plugin

Create a custom runtime image of your non-modular application
https://badass-runtime-plugin.beryx.org
Apache License 2.0
162 stars 21 forks source link

help : gradlew jpackage need icon #109

Closed sosoeo closed 1 year ago

sosoeo commented 2 years ago

this plugin is so wonderful!!! 👍, but today a little trouble face me for long time, how can I add icon file for msi installer ? I have tryed 'org.beryx.jlink' , that works when use gradle jpackage and give a icon option settings like : jpackage { jpackageHome = 'C:/jdk-17.0.0-zulu' outputDir = 'my-packaging' // imageOutputDir = file("$buildDir/my-packaging-image") // installerOutputDir = file("$buildDir/my-packaging-installer") imageName = "flatSwingDemo"
appVersion = "1.0.0" icon = file("$projectDir/favicon.ico") skipInstaller = false installerName = "myInstaller"
installerType = 'msi' installerOptions = ['--win-menu', '--win-shortcut','--win-dir-chooser'] }

but when I switched to id 'org.beryx.runtime' version '1.12.7', the idea said 'icon' is unknown property unitll I removed it.

can you add icon back for this plugin too?

canglongxiang commented 2 years ago

Try this configuration:

runtime {
    jpackage {
        imageOptions = [
                '--icon', '$projectDir/favicon.ico'
        ]
    }
}
hakanai commented 1 year ago

The sample project does it the same way.

https://github.com/beryx-gist/badass-runtime-example-javafx/blob/master/build.gradle#L54

I tested the sample earlier today and the icon seemed to be present, so I'll close this as it's pretty well documented by being in the sample project.

Having some convenience for setting the icon without using flags would be nice, but the same goes for all the other flags.