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"
extends: '.msvc2019 build'
script:
- git fetch --tags
- "& ./ci/build_gps.ps1"
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 &&
powershell ./installer/wix/prepare_wix.ps1"
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 &&
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"
- "& ./installer/wix/prepare_wix.ps1"
- "& ./installer/wix/prepare_gstreamer.ps1"
- "& ./installer/wix/build_installer.ps1"
artifacts:
paths:
- installer/wix/*.msi
expire_in: 1 days
expire_in: 10 days
rustfmt-clippy:

View file

@ -2,6 +2,10 @@ $wixFolder = Join-Path $PSScriptRoot -ChildPath 'wix/'
$candleToolPath = Join-Path $wixFolder -ChildPath candle.exe
$lightToolPath = Join-Path $wixFolder -ChildPath light.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
{
@ -34,9 +38,9 @@ try
Write-Output $wxs_files
Write-Output $obj_files
# compiling wxs file into wixobj
$msiFileName = "GstPipelineStudio.msi"
$msiFileName = "GstPipelineStudio-$GPSVersion.msi"
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)
{
throw "Compilation of $wxsFileName failed with exit code $LASTEXITCODE"

View file

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