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

additional launcher

Open mitm001 opened this issue 5 years ago • 2 comments

I am new to jpackage but have spent some time trying to get it to work with my current build procedures.

My current build behavior has a src/main/dist folder that contains an updater application that has its own start script and is not on the class path of the main application. This folder gets added to the distribution during build, maintaining the same folder structure as is in the dist folder.

The main application uses ProcessBuilder to start this updater when it needs to. The updater uses ProcessBuilder to start the main application when it needs to.

I think this is an secondaryLauncher in the jlink plugin but this doesn't seem to work in the runtime plugin, even though I see nothing in the jpackage docs saying a non modular build cannot have an additional launcher.

Is there a way I can add the updater and its start script using the runtime plugin that maintains the folder structure inside the installed applications app folder?

mitm001 avatar Aug 31 '20 22:08 mitm001

More reading shows missing installer option --input as well as the secondaryLauncher would accomplish these things.

mitm001 avatar Sep 01 '20 16:09 mitm001

There is currently no support for additional launchers in the runtime plugin, so you need to add a couple of things to your build.gradle to make it work. I put up an example on the secondaryLauncher branch of badass-runtime-example-javafx.

The main steps are:

siordache avatar Sep 03 '20 14:09 siordache