wix: add variable for version and upgrade code

This commit is contained in:
Stéphane Cerveau 2023-03-05 20:57:26 +01:00
parent a99750a571
commit 2527a730d3
3 changed files with 13 additions and 11 deletions

View file

@ -106,17 +106,15 @@ windows installer stable:
image: "$WINDOWS_RUST_STABLE_IMAGE" image: "$WINDOWS_RUST_STABLE_IMAGE"
extends: '.msvc2019 build' extends: '.msvc2019 build'
script: script:
- git fetch --tags
- "& ./ci/build_gps.ps1" - "& ./ci/build_gps.ps1"
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && - "& ./installer/wix/prepare_wix.ps1"
powershell ./installer/wix/prepare_wix.ps1" - "& ./installer/wix/prepare_gstreamer.ps1"
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && - "& ./installer/wix/build_installer.ps1"
powershell ./installer/wix/prepare_gstreamer.ps1"
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 &&
powershell ./installer/wix/build_installer.ps1"
artifacts: artifacts:
paths: paths:
- installer/wix/*.msi - installer/wix/*.msi
expire_in: 1 days expire_in: 10 days
rustfmt-clippy: rustfmt-clippy:

View file

@ -2,6 +2,10 @@ $wixFolder = Join-Path $PSScriptRoot -ChildPath 'wix/'
$candleToolPath = Join-Path $wixFolder -ChildPath candle.exe $candleToolPath = Join-Path $wixFolder -ChildPath candle.exe
$lightToolPath = Join-Path $wixFolder -ChildPath light.exe $lightToolPath = Join-Path $wixFolder -ChildPath light.exe
$heatToolPath = Join-Path $wixFolder -ChildPath heat.exe $heatToolPath = Join-Path $wixFolder -ChildPath heat.exe
$GPSUpgradeCode = "9B87C8FF-599C-4F20-914E-AF5E68CB3DC0"
$GPSVersion = $(git describe --always --abbrev=0)
Write-Output $GPSVersion
$GPSVersion = "0.2.3"
try try
{ {
@ -34,9 +38,9 @@ try
Write-Output $wxs_files Write-Output $wxs_files
Write-Output $obj_files Write-Output $obj_files
# compiling wxs file into wixobj # compiling wxs file into wixobj
$msiFileName = "GstPipelineStudio.msi" $msiFileName = "GstPipelineStudio-$GPSVersion.msi"
foreach ($f in $wxs_files){ foreach ($f in $wxs_files){
& "$candleToolPath" "$f" -dPlatform=x64 -dgstreamerBinInstallDir="$gstreamerBinInstallDir" -dgstreamerPluginInstallDir="$gstreamerPluginInstallDir" & "$candleToolPath" "$f" -dPlatform=x64 -dGPSUpgradeCode="$GPSUpgradeCode" -dGPSVersion="$GPSVersion" -dgstreamerBinInstallDir="$gstreamerBinInstallDir" -dgstreamerPluginInstallDir="$gstreamerPluginInstallDir"
if($LASTEXITCODE -ne 0) if($LASTEXITCODE -ne 0)
{ {
throw "Compilation of $wxsFileName failed with exit code $LASTEXITCODE" throw "Compilation of $wxsFileName failed with exit code $LASTEXITCODE"

View file

@ -4,8 +4,8 @@
Language="1033" Language="1033"
Manufacturer="dabrain34" Manufacturer="dabrain34"
Name="GstPipelineStudio" Name="GstPipelineStudio"
UpgradeCode="B28B3FA8-9310-4AA7-B0CA-CBCCA5FD00B2" UpgradeCode="$(var.GPSUpgradeCode)"
Version="1.0.0.0"> Version="$(var.GPSVersion)">
<Package InstallScope="perMachine" Compressed="yes" /> <Package InstallScope="perMachine" Compressed="yes" />