Wix source code produced by src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinMsiBundler.java.html doesn't comply to recommendations of how files should be packed in component. The recommendation is to use one file per a component - http://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/add_a_file.html. However jpackage produces way less components than files:
---
$ less config/bundle.wxi | grep '<Component' | wc -w
634
$ less config/bundle.wxi | grep '<File' | wc -w
1650
---
Data picked from my local test project.
src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinMsiBundler.java.html:745
+ " Guid=\"" + UUID.randomUUID().toString() + "\""
Use of random GUIDs for components is not recommended and potentially can result in issues with application updates. The recommended approach is to generate stable GUIDs - http://wixtoolset.org/documentation/manual/v3/howtos/general/generate_guids.html, http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-does-heat-maintain-consistent-GUIDs-td7599757.html.
Algorithm to create stable GUIDs is explained at https://tools.ietf.org/html/rfc4122#page-13. However we can avoid the hassle of generating stable GUIDs if we would put only one file in every component. In this case WiX is able to generate stable GUIDs for us.
---
$ less config/bundle.wxi | grep '<Component' | wc -w
634
$ less config/bundle.wxi | grep '<File' | wc -w
1650
---
Data picked from my local test project.
src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinMsiBundler.java.html:745
+ " Guid=\"" + UUID.randomUUID().toString() + "\""
Use of random GUIDs for components is not recommended and potentially can result in issues with application updates. The recommended approach is to generate stable GUIDs - http://wixtoolset.org/documentation/manual/v3/howtos/general/generate_guids.html, http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-does-heat-maintain-consistent-GUIDs-td7599757.html.
Algorithm to create stable GUIDs is explained at https://tools.ietf.org/html/rfc4122#page-13. However we can avoid the hassle of generating stable GUIDs if we would put only one file in every component. In this case WiX is able to generate stable GUIDs for us.
- duplicates
-
JDK-8166315 Javapackager MSI bundler should use heat.exe to generate WiX source file
- Closed
- relates to
-
JDK-8232728 File Association icons no longer work on windows
- Resolved
-
JDK-8233138 Error 2343 when using --win-dir-chooser
- Resolved
-
JDK-8232646 Follow up for JDK-8223325
- Resolved