diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9472d9f..d91dc1b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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: diff --git a/installer/wix/build_installer.ps1 b/installer/wix/build_installer.ps1 index 8688367..f1d7106 100644 --- a/installer/wix/build_installer.ps1 +++ b/installer/wix/build_installer.ps1 @@ -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" diff --git a/installer/wix/gps.wxs b/installer/wix/gps.wxs index 9d36919..62d8990 100644 --- a/installer/wix/gps.wxs +++ b/installer/wix/gps.wxs @@ -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)">