Jkh
Jkh

Reputation: 33

Is it possible to add custom dialogs in a JPackage generated MSI installer

I am building a Java application image with a runtime image using Jlink and Jpackage to be distributed for Windows via a MSI installer also generated by JPackage. I would like to add a step in the installer to be able to let the user configure a working directory for the application (located somewhere the user has read and write access) that is different from the installation directory and use the default AppData if the user skips this step.

I am using OpenJDK 19.0.2, testing on Windows 10 Pro 21H2

JPackage documentation specifies in its 'Resources Used in Packaging' section :

To override resources that can't be overridden from the command line, add your customized files to the resource directory that you pass to jpackage

Using the '--temp' JPackage option, I was able to see all the WIX configuration files used to generate the final MSI. Even if I can modify some of them (main.wxs for instance) and re rerun JPackage with '--resource-dir' to point on the modified files, it seems that JPackage doesn't allow the integration of NEW custom dialogs (by integration I mean dialogs relying on wixhelper.dll, localization string templates etc...)

From this quote I understand that I am trying to achieve something out of the scope of JPackage but I was wondering if my only solution is to integrate an outside WIX project configuration to my packaging process. if not, what would be the right way to handle this use case?

Thank you

Upvotes: 2

Views: 126

Answers (1)

Philippe Rusare
Philippe Rusare

Reputation: 1

You Don't have doing all of that, just add " --win-dir-chooser --win-console " in your jpackage command line.

Upvotes: 0

Related Questions