WiX customization

Andy Herrick andy.herrick at oracle.com
Tue Aug 27 12:48:10 UTC 2019


We are just beginning to work on user documentation, and --resource-dir 
is one area that will need extensive documentation and examples. (not to 
mention probably some bug fixes like JDK-8224833 
<https://bugs.openjdk.java.net/browse/JDK-8224833>).

basically the proceedure would be as follows:

1.) build your installer first using the --temp-root <temp-root-path> 
and --verbose args.

2.) look for verbose output that says something like:

> Using default package resource <default name> [<resource-type>]  (add 
> <custom resource name> to the resource-dir to customize).
>
you can look in temp-root-path/config to find all the default resources 
it used, and customize them as you require

2.a) there may also be output that something like:

> no default package resource  [script to run after application image is 
> populated]  (add <app-name>-post-image.wsf to the resource-dir to 
> customize).
Then you can add you own <app-name>-post-image.wsf  (though there will 
be no default script in temp-root-path/config to customize).

3.) now add --resource-dir <resource-dir> option, create <resource-dir> 
and put in it <custom resource name> (or as in 2.a, 
"<app-name>-post-image.wsf>")

4.) now run jpackage again and this time it will take the 
custom-resource instead of the default.

/Andy

On 8/27/2019 2:44 AM, Tobias Oelgarte wrote:
> I would also be interested in that. At least I would like to know 
> where I can find the default files used by jpackage and how to 
> override/modify them if needed.
>
> The current documentation only mentions the --resource-dir option, but 
> does not provide any detailed information.
>
> Am 26.08.2019 um 20:27 schrieb Tom Vasset (tvasset):
>> Hi,
>>
>> I've been experimenting with jpackage for packaging an app with both 
>> a win and a mac installer.
>>
>> For the windows installer, are there ways to customize the WiX files 
>> produced by jpackage? A simple example is to get rid of the default 
>> red WiX icons in the installer and replace them with product specific 
>> ones (which I would think anyone building an msi would want to do).
>>
>> I've tried to find documentation for how to work with the 
>> --resource-dir option (which seems to allow a script to be run), but 
>> I can find no examples of how to use it anywhere...
>>
>> Regards,
>>
>> Tom
>


More information about the core-libs-dev mailing list