Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8223325

Improve wix sources generated by jpackage

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: internal
    • Fix Version/s: internal
    • Component/s: tools
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              asemenyuk Alexey Semenyuk
              Reporter:
              asemenyuk Alexey Semenyuk
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: