Update windows-msi.yml

This commit is contained in:
Laurent Trinques
2026-05-12 21:33:05 +02:00
committed by GitHub
parent ef261a7afd
commit e40f9c6b72

View File

@@ -15,7 +15,7 @@ jobs:
steps: steps:
# ---------------------------------------------------------------- # ----------------------------------------------------------------
# 1. Checkout (pour récupérer QElectroTech.wxs et CMakeLists.txt) # 1. Checkout (pour récupérer QElectroTech.wxs et les sources)
# ---------------------------------------------------------------- # ----------------------------------------------------------------
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -25,7 +25,7 @@ jobs:
# ---------------------------------------------------------------- # ----------------------------------------------------------------
# 2. Télécharger l'artifact portable du build principal # 2. Télécharger l'artifact portable du build principal
# Nécessite que windows-build.yml uploade un artifact nommé # Nécessite que windows-build.yml uploade un artifact nommé
# "qelectrotech-windows-portable" (nom fixe, voir windows-build.yml) # "qelectrotech-windows-portable" (nom fixe)
# ---------------------------------------------------------------- # ----------------------------------------------------------------
- name: Download portable artifact - name: Download portable artifact
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
@@ -88,11 +88,15 @@ jobs:
# ---------------------------------------------------------------- # ----------------------------------------------------------------
# 5. Installer l'extension WixUI # 5. Installer l'extension WixUI
# WIX_ACCEPT_EULA=true est la méthode officielle pour accepter
# la licence OSMF de WiX v7 en environnement CI
# ---------------------------------------------------------------- # ----------------------------------------------------------------
- name: Install WiX UI extension - name: Install WiX UI extension
shell: pwsh shell: pwsh
env:
WIX_ACCEPT_EULA: true
run: | run: |
wix extension add WixToolset.UI.wixext/7.0.0 --accept-eula wix extension add WixToolset.UI.wixext/7.0.0
Write-Host "Extension UI installée." Write-Host "Extension UI installée."
# ---------------------------------------------------------------- # ----------------------------------------------------------------
@@ -128,8 +132,7 @@ jobs:
} }
Write-Host "Executable : $($exe.FullName) ($([math]::Round($exe.Length/1MB,1)) MB)" Write-Host "Executable : $($exe.FullName) ($([math]::Round($exe.Length/1MB,1)) MB)"
# FilesDir = dossier contenant bin\ (soit artifact\files directement, # FilesDir = dossier contenant bin\
# soit un sous-dossier si l'artifact a une structure imbriquée)
$binDir = $exe.Directory.FullName $binDir = $exe.Directory.FullName
$filesDir = Split-Path $binDir -Parent $filesDir = Split-Path $binDir -Parent
@@ -141,6 +144,8 @@ jobs:
# ---------------------------------------------------------------- # ----------------------------------------------------------------
- name: Build MSI - name: Build MSI
shell: pwsh shell: pwsh
env:
WIX_ACCEPT_EULA: true
run: | run: |
$version = "${{ steps.version.outputs.VERSION_MSI }}" $version = "${{ steps.version.outputs.VERSION_MSI }}"
$verDisplay = "${{ steps.version.outputs.VERSION_DISPLAY }}" $verDisplay = "${{ steps.version.outputs.VERSION_DISPLAY }}"
@@ -162,7 +167,6 @@ jobs:
-d "ProductVersion=$verDisplay" ` -d "ProductVersion=$verDisplay" `
-d "FilesDir=$filesDir" ` -d "FilesDir=$filesDir" `
-ext WixToolset.UI.wixext ` -ext WixToolset.UI.wixext `
--accept-eula `
-o "dist\$outputName" -o "dist\$outputName"
if (-not (Test-Path "dist\$outputName")) { if (-not (Test-Path "dist\$outputName")) {