RFR: 8319457: Update jpackage to support WiX Toolset 4 on Windows [v4]

Alexander Matveev almatvee at openjdk.org
Wed Jun 5 04:36:02 UTC 2024


On Tue, 4 Jun 2024 16:07:18 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:

>> Add support for WiX4 (and WiX5) in jpackage.
>> 
>> jpackage supports WiX3, WiX4 and WiX5. It will pick WiX4/WiX5 if one of them is installed and there is WiX3 installed too. (Note: WiX4 and WiX5 are not supposed to be installed side-by-side, but if it happens, WiX5 will be preferred over WiX4).
>> 
>> Custom WiX3 sources will be automatically converted to WiX4 format if WiX4/WiX5 is used. The converter provides:
>> 
>> - full support of the conversion of WiX L10N (.wxl) files, i.e. full support of "http://schemas.microsoft.com/wix/2006/localization" to "http://wixtoolset.org/schemas/v4/wxl" namespace conversion;
>> - partial support of WiX source (.wxs) files, i.e. partial support of "http://schemas.microsoft.com/wix/2006/wi" to "http://wixtoolset.org/schemas/v4/wxs" namespace conversion;
>> 
>> The converter is a XSLT stylesheet. The default converter is `src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/wix3-to-wix4-conv.xsl`. It can be replaced with the custom converter by adding "wix-conv.xsl" file to the resource directory.
>
> Alexey Semenyuk has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - WixSourceConverter#applyTo should do what OverridableResource#saveToFile() does: create parent directory and replace output file if it exists.
>  - Fix issue with overwriting custom l10n file in the resource directory. All WiX source files from the resource directory should be copied to jpackage work directory before running wxi tools. jpackage should not change files in the resource directory.

src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WixAppImageFragmentBuilder.java line 157:

> 155: 
> 156:     @Override
> 157:     List<String> getLoggableWixFeatures() {

Maybe I am missing something, but is it used? I only see call to base class `WixFragmentBuilder::getLoggableWixFeatures`.

src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources.properties line 44:

> 42: resource.installdirnotemptydlg-wix-file=Not empty install directory dialog WiX project file
> 43: resource.launcher-as-service-wix-file=Service installer WiX project file
> 44: resource.wix-src-conv=XSLT stylesheet converting WiX sources from WiX v3 to WiX v4 format

WiX v4 -> WiX v4/v5

src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources.properties line 46:

> 44: resource.wix-src-conv=XSLT stylesheet converting WiX sources from WiX v3 to WiX v4 format
> 45: 
> 46: error.no-wix-tools=Can not find WiX tools. Was looking for WiX v3 light.exe and candle.exe or WiX v4 wix.exe and none was found

WiX v4 -> WiX v4/v5

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19318#discussion_r1626887692
PR Review Comment: https://git.openjdk.org/jdk/pull/19318#discussion_r1626907533
PR Review Comment: https://git.openjdk.org/jdk/pull/19318#discussion_r1626909859


More information about the core-libs-dev mailing list