Mercurial > hg > sonic-visualiser
comparison deploy/win64/generate-wxs.ps1 @ 2485:692cd6d3144d
Use most recent redist dir, rather than hardcoding one
author | Chris Cannam |
---|---|
date | Mon, 30 Mar 2020 14:36:34 +0100 |
parents | 119588c42772 |
children | 8ac67c315afa |
comparison
equal
deleted
inserted
replaced
2484:eb3ee81babf8 | 2485:692cd6d3144d |
---|---|
1 | 1 |
2 Set-StrictMode -Version 2.0 | 2 Set-StrictMode -Version 2.0 |
3 $ErrorActionPreference = "Stop" | 3 $ErrorActionPreference = "Stop" |
4 | 4 |
5 $redist_ver = "14.24.28127" | 5 $redist_parent_dir = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\" |
6 | |
7 $redists = (Get-ChildItem -Path $redist_parent_dir -Name -Include 14.* -Attributes Directory) | |
8 | |
9 if (!$redists) { | |
10 echo "ERROR: No 14.x redistributable directories found under $redist_parent_dir" | |
11 exit 1 | |
12 } | |
13 | |
14 $redist_ver = $redists[-1] | |
15 | |
6 $version = (Get-Content version.h) -replace '#define SV_VERSION ','' -replace '"','' | 16 $version = (Get-Content version.h) -replace '#define SV_VERSION ','' -replace '"','' |
7 $wxs = "deploy\win64\sonic-visualiser.wxs" | 17 $wxs = "deploy\win64\sonic-visualiser.wxs" |
8 | 18 |
9 $in = "$wxs.in" | 19 $in = "$wxs.in" |
10 | 20 |
11 $redist_dir="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\$redist_ver\x64\Microsoft.VC142.CRT" | 21 $redist_dir="$redist_parent_dir\$redist_ver\x64\Microsoft.VC142.CRT" |
12 | 22 |
13 echo "Generating $wxs..." | 23 echo "Generating $wxs..." |
14 echo " ...for SV version $version" | 24 echo " ...for SV version $version" |
15 echo " ...for redist version $redist_ver" | 25 echo " ...for redist version $redist_ver" |
16 echo " ...from $in" | 26 echo " ...from $in" |