threerings / getdown

Download, Install, Update
Other
507 stars 125 forks source link

[Question]How do you make an installer for a getdown project using jpackage? #266

Closed HiddenMachine3 closed 2 years ago

HiddenMachine3 commented 2 years ago

Hi, forgive me if this is the wrong place to ask this question, but I don't know where else to post.

I would like to just use jpackage like so : jpackage --main-jar getdown.jar --ico ...... etc But the problem is, you need to pass in the folder containing the getdown files as an --argument, which we don't know at runtime if we enable --win-dir-chooser.

The current solutions I have come up with is just forking the project and adding a line to detect the getdown.txt in the same folder as getdown-launcher.jar( or getdown.jar), and use that as an argument from within java code. Or, using a "middle man" jar as the --main-jar "MiddleMan.jar" to call getdown.jar with the needed argument that does the same exact thing from within java code.

Is there already a way to package the getdown.jar files with getdown.txt so as to make it compatible with jpackage --win-dir-chooser ?

HiddenMachine3 commented 2 years ago

This answer solved the problem : https://stackoverflow.com/a/74165219