badass-runtime-plugin icon indicating copy to clipboard operation
badass-runtime-plugin copied to clipboard

How to reduce jpackage size ?

Open pradeepsimba opened this issue 2 years ago • 3 comments

I build a jpackage for my application.

But , the size of my jpackage is 120 MB.

How can I reduce the size of jpackage ?

pradeepsimba avatar Jul 02 '22 12:07 pradeepsimba

What's your current configuration? Not giving us much to go on here.

hakanai avatar Jan 15 '23 05:01 hakanai

You can try to set options for jLink to not to deliver header files or man pages of jdk

runtime {
   options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
   [...]
}

schmulschubiak avatar Jan 27 '23 13:01 schmulschubiak

You can try to set options for jLink to not to deliver header files or man pages of jdk

runtime {
   options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
   [...]
}

my configuration.

        runtime {
            options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']

            launcher {
                noConsole = true
            }
            jpackage {


                def currentOs = org.gradle.internal.os.OperatingSystem.current()
                def imgType = currentOs.windows ? 'ico' : currentOs.macOsX ? 'icns' : 'png'
                imageOptions += ['--icon', "src/main/resources/hellofx.$imgType"]
                installerOptions += ['--resource-dir', "src/main/resources"]
                installerOptions += ['--vendor', 'Acme Corporation']

                if(currentOs.windows) {
                    installerOptions += ['--win-per-user-install', '--win-dir-chooser', '--win-menu', '--win-shortcut']
                }
                else if (currentOs.linux) {
                    installerOptions += ['--linux-package-name', 'hellofx','--linux-shortcut']
                }
                else if (currentOs.macOsX) {
                    installerOptions += ['--mac-package-name', 'hellofx']
                }
            }
        }

I tried this. but , it not worked

pradeepsimba avatar Jan 31 '23 12:01 pradeepsimba