Open ogerardin opened 11 months ago
Hi @ogerardin! I've managed to reproduce your issue with WiX Toolset 3.11.2.4516 ... I guess new versions are more restrictive than previous ones.
Here you have a quick fix, until I can patch and release JP 1.7.6:
Just create ${project.basedir}/assets/windows/msm.wxs.vtl
file with next content and will use this template instead of the default one:
#set ($name = $info.name.replaceAll("[^A-Za-z0-9_.]", "_"))
#set ($id = 0)
#macro(list $file)
#set($guid = $GUID.randomUUID())
#set($id = $id + 1)
#if($file.isDirectory())
#if($file.equals(${info.appFolder}))
<Directory Id="INSTALLFOLDER" Name="${file.name}">
#else
<Directory Id="_${id}" Name="${file.name}">
#end
#foreach($child in $file.listFiles())
#list($child)
#end
</Directory>
#else
<Component Id="_${id}" Guid="${guid}" Win64="yes">
#if($file.equals(${info.executable}))
<File Id="EXEFILE" Name="${guid}_${file.name}" KeyPath="yes" Source="${file}">
<Shortcut Id="ApplicationStartMenuShortcut" Name="${info.winConfig.shortcutName}" Description="${info.description}" Directory="ProgramMenuFolder" />
</File>
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall" />
<RegistryValue Root="HKLM" Key="Software\\${info.organizationName}\\${info.name}" Name="installed" Type="integer" Value="1" />
#else
<File Name="${guid}_${file.name}" KeyPath="yes" Source="${file}"/>
#end
</Component>
#end
#end
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Module Id="${name}_Module" Codepage="1252" Language="1033" Version="${info.winConfig.productVersion}">
<Package Id="${GUID.randomUUID()}" Manufacturer="${info.organizationName}" InstallerVersion="200" Languages="1033" Platform="x64" SummaryCodepage="1252" Description="${info.description}"/>
<Directory Id="TARGETDIR" Name="SourceDir">
#list(${info.appFolder})
<Directory Id="ProgramMenuFolder" />
#if ($info.winConfig.registry)
<Component Id="RegistryEntries" Guid="${GUID.randomUUID()}">
#foreach ($entry in $info.winConfig.registry.entries)
<RegistryKey Root="${entry.root}" Key="${entry.subkey}" ForceDeleteOnUninstall="yes">
<RegistryValue
Type="${entry.valueTypeAsWIXToolsetString}"
#if ($entry.valueName)
Name="$!{entry.valueName}"
#end
#if ($entry.valueData)
Value="$!{entry.valueData}"
#end
/>
</RegistryKey>
#end
</Component>
#end
</Directory>
</Module>
</Wix>
Now it concats guid
to filename, in order to avoid duplicated files:
#if($file.equals(${info.executable}))
<File Id="EXEFILE" Name="${guid}_${file.name}" KeyPath="yes" Source="${file}">
<Shortcut Id="ApplicationStartMenuShortcut" Name="${info.winConfig.shortcutName}" Description="${info.description}" Directory="ProgramMenuFolder" />
</File>
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall" />
<RegistryValue Root="HKLM" Key="Software\\${info.organizationName}\\${info.name}" Name="installed" Type="integer" Value="1" />
#else
<File Name="${guid}_${file.name}" KeyPath="yes" Source="${file}"/>
#end
I hope it helps!
Thanks for your investigation! So far I don't have a real need to update to 1.7.3, so I will wait for 1.7.6.
Hi @ogerardin! I managed to build a MSI installer with WiX 3.14 using JavaPackager 1.7.6. Please, could you test it and give me some feedback? Thanks!
Hi @ogerardin! I managed to build a MSI installer with WiX 3.14 using JavaPackager 1.7.6. Please, could you test it and give me some feedback? Thanks!
I will asap!
I'm submitting a…
Short description of the issue/suggestion: v1.7.3 and later are broken on Windows. No issue until 1.7.2.
[ERROR] MSI installer generation failed due to: Command execution failed: light -spdb -out C:\Users\gerardin\IdeaProjects\xpman\xpman-fx-dist\target\X-Plane Manager_1.0-SNAPSHOT.msm C:\Users\gerardin\IdeaProjects\xpman\xpman-fx-dist\target\assets\X-Plane Manager.msm.wixobj
Steps to reproduce the issue/enhancement:Bump plugin version to 1.7.3
What is the expected behavior?
No regression.
What is the current behavior?
Fails with error message.
Do you have outputs, screenshots, demos or samples which demonstrate the problem or enhancement?
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Other information (e.g. related issues, suggestions how to fix, links for us to have context)