Mercurial > hg > sonic-visualiser
annotate deploy/win64/generate-wxs.ps1 @ 2474:266d2fc815f4 audio-source-refactor
Minor subrepo fixes
author | Chris Cannam |
---|---|
date | Mon, 23 Mar 2020 14:16:11 +0000 |
parents | 119588c42772 |
children | 692cd6d3144d |
rev | line source |
---|---|
Chris@2448 | 1 |
Chris@2448 | 2 Set-StrictMode -Version 2.0 |
Chris@2448 | 3 $ErrorActionPreference = "Stop" |
Chris@2448 | 4 |
Chris@2448 | 5 $redist_ver = "14.24.28127" |
Chris@2448 | 6 $version = (Get-Content version.h) -replace '#define SV_VERSION ','' -replace '"','' |
Chris@2448 | 7 $wxs = "deploy\win64\sonic-visualiser.wxs" |
Chris@2448 | 8 |
Chris@2448 | 9 $in = "$wxs.in" |
Chris@2448 | 10 |
Chris@2448 | 11 $redist_dir="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\$redist_ver\x64\Microsoft.VC142.CRT" |
Chris@2448 | 12 |
Chris@2448 | 13 echo "Generating $wxs..." |
Chris@2448 | 14 echo " ...for SV version $version" |
Chris@2448 | 15 echo " ...for redist version $redist_ver" |
Chris@2448 | 16 echo " ...from $in" |
Chris@2448 | 17 echo "" |
Chris@2448 | 18 |
Chris@2448 | 19 if (!(Test-Path -Path $redist_dir -PathType Container)) { |
Chris@2448 | 20 echo "ERROR: Redistributable directory $redist_dir not found" |
Chris@2448 | 21 exit 1 |
Chris@2448 | 22 } |
Chris@2448 | 23 |
Chris@2448 | 24 if (!(Test-Path -Path $in -PathType Leaf)) { |
Chris@2448 | 25 echo "ERROR: Input file $in not found" |
Chris@2448 | 26 exit 1 |
Chris@2448 | 27 } |
Chris@2448 | 28 |
Chris@2448 | 29 (Get-Content $in) -replace '@VERSION@', $version -replace '@REDIST_VER@', $redist_ver -replace '@W@', '<!-- DO NOT EDIT THIS FILE: it is auto-generated -->' | Out-File -encoding ASCII $wxs |
Chris@2448 | 30 |
Chris@2448 | 31 echo "Done" |