Skip to content

Commit 932bfe3

Browse files
committed
wix4
1 parent ee0b326 commit 932bfe3

File tree

1 file changed

+37
-6
lines changed

1 file changed

+37
-6
lines changed

.github/workflows/build_gui_apps.yml

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,50 @@ jobs:
141141
142142
- name: Install WiX Toolset v4
143143
run: |
144-
# Install WiX v4 as a .NET tool (specify version 6.0.0 for stability)
145-
dotnet tool install --global wix --version 6.0.0
146-
# Verify installation
144+
# Check if WiX is already installed
145+
wix --version || (
146+
# Install WiX v4 as a .NET tool (specify version 6.0.0 for stability)
147+
echo "Installing WiX v4..."
148+
dotnet tool install --global wix --version 6.0.0
149+
150+
# Verify installation succeeded
151+
if ($LASTEXITCODE -ne 0) {
152+
echo "Failed to install WiX v4"
153+
exit 1
154+
}
155+
156+
echo "WiX v4 installed successfully"
157+
)
158+
159+
# Display WiX version (should not fail the build if this fails)
147160
wix --version
148-
# Show available commands
149-
wix --help
150-
echo "WiX v4 installed as a .NET tool"
161+
if ($LASTEXITCODE -ne 0) {
162+
echo "Warning: Could not get WiX version, but continuing build"
163+
} else {
164+
echo "WiX v4 is ready to use"
165+
}
151166
152167
- name: Create MSI Installer with WiX v4
153168
run: |
169+
# Verify WiX is available
170+
if (!(Get-Command wix -ErrorAction SilentlyContinue)) {
171+
echo "ERROR: WiX v4 is not available. Cannot create MSI installer."
172+
exit 1
173+
}
174+
154175
# Create MSI installer using WiX v4
176+
echo "Creating MSI installer..."
155177
python ./scripts/create_windows_msi.py --input-dir dist/GetDistGUI --output-dir dist
156178
179+
# Verify MSI was created
180+
$msiFile = Get-ChildItem -Path dist -Filter "GetDist-GUI-*.msi" | Select-Object -First 1 -ExpandProperty FullName
181+
if (-not $msiFile) {
182+
echo "ERROR: MSI installer was not created."
183+
exit 1
184+
}
185+
186+
echo "MSI installer created successfully at: $msiFile"
187+
157188
- name: Sign MSI Installer
158189
if: github.event.inputs.skip_signing != 'true'
159190
env:

0 commit comments

Comments
 (0)