Skip to content

Commit d093283

Browse files
committed
wix4
1 parent 36167c2 commit d093283

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

.github/workflows/build_gui_apps.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ jobs:
163163
}
164164
165165
echo "WiX v4 installed successfully"
166+
167+
# Note: We don't need to install WiX extensions for our basic MSI installer
168+
# If needed in the future, uncomment the line below
169+
# dotnet tool install --global WixToolset.Util.wixext
166170
}
167171
168172
# Display WiX version (should not fail the build if this fails)

scripts/create_windows_msi.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -180,18 +180,15 @@ def create_wix_files(input_dir, version):
180180
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
181181
<Fragment>
182182
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
183-
<!-- In WiX 4, Files element must be a direct child of Fragment, Directory, DirectoryRef, etc. -->
184-
<!-- Not a child of Component -->
185-
<Component Id="MainExecutable" Guid="*" KeyPath="yes">
183+
<Component Id="MainExecutable" Guid="*">
186184
<File Id="GetDistGUIEXE" Source="{input_dir_forward}/GetDistGUI.exe" KeyPath="yes" />
187185
</Component>
188-
</ComponentGroup>
189186
190-
<!-- Use Files element at Fragment level for all other files -->
191-
<Files Directory="INSTALLFOLDER" Source="{input_dir_forward}/*">
192-
<!-- Exclude the main executable which is already included above -->
193-
<Exclude Name="GetDistGUI.exe" />
194-
</Files>
187+
<!-- Add a component for each file in the directory -->
188+
<Component Id="AppFiles" Guid="*">
189+
<File Source="{input_dir_forward}/*" Exclude="GetDistGUI.exe" />
190+
</Component>
191+
</ComponentGroup>
195192
</Fragment>
196193
</Wix>
197194
"""
@@ -229,7 +226,7 @@ def build_msi(wxs_path, components_wxs_path, output_dir, version):
229226
build_cmd = [
230227
"wix", "build",
231228
"-v", # Verbose output
232-
"-ext", "WixToolset.Util.wixext", # Add Util extension for better error handling
229+
# Extension removed as it's not installed in the workflow environment
233230
"-o", msi_path,
234231
wxs_path,
235232
components_wxs_path

0 commit comments

Comments
 (0)