RFR: JDK-8223643: Provide better defined context for custom installer steps on Windows
Alexey Semenyuk
alexey.semenyuk at oracle.com
Thu May 23 18:57:45 UTC 2019
Please review the jpackage fix for bug [1] at [2].
This is a fix for the JDK-8200758-branch branch of the open sandbox
repository (jpackage).
src\jdk.jpackage\windows\classes\jdk\jpackage\internal\WinMsiBundler.java:
- code running candle.exe on WiX sources reworked. Before the fix
template.wxs file was used in text substitution with application
specific strings and the result file was passed to candel.exe command
line. With this patch application specific data is saved in WiX
variables that are put on candle.exe command line and candle.exe runs on
main.wxs that is used as is. Sample candle.exe command line:
---
Running [C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe,
-nologo,
C:\cygwin64\tmp\jdk.jpackage1414148896269938282\config\GuiTest.wxs,
-ext, WixUtilExtension, -out,
C:\cygwin64\tmp\jdk.jpackage1414148896269938282\tmp\GuiTest.wixobj,
-dJpAppDescription=GuiTest, -dJpAppVersion=1.0,
-dJpWixVersion36OrNewer=yes,
-dJpProductCode=36784cc6-d050-4852-ac67-2f7de7c0b292,
-dJpAppName=GuiTest,
-dJpProductUpgradeCode=4f3374fd-f78a-4ffb-96f8-d5412bcca95f,
-dJpIsSystemWide=yes, -dJpAppVendor=Unknown,
-dJpConfigDir=C:\cygwin64\tmp\jdk.jpackage1414148896269938282\config] in
C:\cygwin64\tmp\jdk.jpackage1414148896269938282\images\win-msi.image\GuiTest
GuiTest.wxs
---
- high level description of what WinMsiBundler class does is
documented in class comment. Meaning of WiX variables defined by
jpackage on candle.exe command line documented as well. Main Wix source
used by jpackage (main.wxs) and a set of WiX variables defined by
jpackage should be considered as a public interface for custom
extensions of WiX installers produced by jpackage;
- fix error when r/o non rtf file is passed with --license command line
option (line 459).
test\jdk\tools\jpackage\createinstaller\windows:
- added tests for runtime installer. Like all jpackage tests that
depend on running platform specific packaging tools (WiX Toolkit,
rpmbuild, etc.) the new tests come with @ignore tag.
src\jdk.jpackage\share\classes\jdk\jpackage\main\CommandLine.java:
- fix javadoc errors and make the class package private.
src\jdk.jpackage\windows\classes\jdk\jpackage\internal\resources\WinResources.properties,
MsiInstallerStrings_en.wxl:
- move "message.install.dir.exist" string from .properties file to
corresponding .wxl file. Reason: this string is referenced only from
installers generated by jpackage, not in jpackage itself. All localized
strings used in installers should be stored in .wxl files and not in
.properties files.
src\jdk.jpackage\windows\classes\jdk\jpackage\internal\resources\template.wxs,
main.wxs:
- rename template.wxs into main.wxs and make it a valid WiX source
that doesn't require preliminary text substitution.
[1] https://bugs.openjdk.java.net/browse/JDK-8223643
[2] http://cr.openjdk.java.net/~asemenyuk/8223643/webrev.00/
Thanks,
Alexey
More information about the core-libs-dev
mailing list