Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate identifiers for generated application scripts in WiX when JDKPackagerPlugin enabled #1529

Open
Facsimiler opened this issue Dec 9, 2022 · 0 comments
Labels

Comments

@Facsimiler
Copy link

When running sbt windows:packageBin, I get errors with duplicate script file entries in the generated WiX .wxs file, but only if the JDKPackagerPlugin is enabled; if this plugin is not enabled, the .wxs file is generated correctly.

Expected behaviour

Native packager should produce a single, valid component definition for the generated application Windows batch file, and Bash script.

For example:

          <!-- etc. --><DirectoryRef Id="_bin97543xxxx">
            <Component Id="_bin_myapp109803301" Guid="71797867-610c-4c9b-ae19-9cf3ffb1c107">
              <File Id="fl__bin_myapp109803301" Name="myapp" DiskId="1" Source="bin\myapp">
                
              </File>
            </Component>
          </DirectoryRef><DirectoryRef Id="_bin97543xxxx">
            <Component Id="_bin_myapp_bat147501657" Guid="c17fcd85-bd84-4fba-be80-523bc13af11f">
              <File Id="fl__bin_myapp_bat147501657" Name="myapp.bat" DiskId="1" Source="bin\myapp.bat">
                
              </File>
            </Component>
          </DirectoryRef><!-- etc. -->

Actual behaviour

Native packager creates duplicate component definitions for the generated Windows batch file, and Bash script, but only if the JDKPackagerPlugin is enabled.

For example:

          <!-- etc. --><DirectoryRef Id="_bin97543xxxx">
            <Component Id="_bin_myapp109803301" Guid="71797867-610c-4c9b-ae19-9cf3ffb1c107">
              <File Id="fl__bin_myapp109803301" Name="myapp" DiskId="1" Source="bin\myapp">
                
              </File>
            </Component>
          </DirectoryRef><DirectoryRef Id="_bin97543xxxx">
            <Component Id="_bin_myapp109803301" Guid="8ae1a323-04cb-4aad-9407-ef622628be9b">
              <File Id="fl__bin_myapp109803301" Name="myapp" DiskId="1" Source="bin\myapp">
                
              </File>
            </Component>
          </DirectoryRef><DirectoryRef Id="_bin97543xxxx">
            <Component Id="_bin_myapp_bat147501657" Guid="c17fcd85-bd84-4fba-be80-523bc13af11f">
              <File Id="fl__bin_myapp_bat147501657" Name="myapp.bat" DiskId="1" Source="bin\myapp.bat">
                
              </File>
            </Component>
          </DirectoryRef><DirectoryRef Id="_bin97543xxxx">
            <Component Id="_bin_myapp_bat147501657" Guid="ac150d21-40bb-417d-a919-3cb8d73292d9">
              <File Id="fl__bin_myapp_bat147501657" Name="myapp.bat" DiskId="1" Source="bin\myapp.bat">
                
              </File>
            </Component>
          </DirectoryRef><!-- etc. -->

Note the duplicate entries for bin\myapp and bin\myapp.bat. That is, there are two entries, with the same ID, for each file, but with different GUIDs.

Information

  • What sbt-native-packager are you using: 1.9.11
  • What sbt version: 1.8.0
  • What is your build system (e.g. Ubuntu, MacOS, Windows, Debian ): Windows 10 Enterprise 22H2.
  • What package are you building (e.g. docker, rpm, ...) Windows MSI, via WiX
  • What version has your build tool (find out with e.g. rpm --version) WiX Toolset v3.11.2.4516
  • What is your target system (e.g. Ubuntu 16.04, CentOS 7) Windows 10, Windows 11

Relevant SBT configuration:

enablePlugins(JDKPackagerPlugin)
enablePlugins(WindowsPlugin)
enablePlugins(JavaAppPackaging)
maintainer := "Me <[email protected]>"
packageSummary := "MyApp Installer"
packageDescription := """MyApp is cool"""
wixProductId := "10cdf7e0-a6b0-4d92-8144-c2c60ae96236"
wixProductUpgradeId := "7558a7d4-6bc9-4e64-9e7d-1b4207034cfb"
Windows / name := s"MyApp-${version.value}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants