Mercurial > hg > sonic-visualiser
comparison deploy/win64/generate-wxs.ps1 @ 2448:119588c42772
Generate the WXS files from templated inputs, substituting in the version and redistributable paths; also include OpenSSL libraries in the package, fixing #1895 Windows build fails to open https locations
author | Chris Cannam |
---|---|
date | Tue, 14 Jan 2020 13:23:04 +0000 |
parents | |
children | 692cd6d3144d |
comparison
equal
deleted
inserted
replaced
2447:d7b724db4bd0 | 2448:119588c42772 |
---|---|
1 | |
2 Set-StrictMode -Version 2.0 | |
3 $ErrorActionPreference = "Stop" | |
4 | |
5 $redist_ver = "14.24.28127" | |
6 $version = (Get-Content version.h) -replace '#define SV_VERSION ','' -replace '"','' | |
7 $wxs = "deploy\win64\sonic-visualiser.wxs" | |
8 | |
9 $in = "$wxs.in" | |
10 | |
11 $redist_dir="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\$redist_ver\x64\Microsoft.VC142.CRT" | |
12 | |
13 echo "Generating $wxs..." | |
14 echo " ...for SV version $version" | |
15 echo " ...for redist version $redist_ver" | |
16 echo " ...from $in" | |
17 echo "" | |
18 | |
19 if (!(Test-Path -Path $redist_dir -PathType Container)) { | |
20 echo "ERROR: Redistributable directory $redist_dir not found" | |
21 exit 1 | |
22 } | |
23 | |
24 if (!(Test-Path -Path $in -PathType Leaf)) { | |
25 echo "ERROR: Input file $in not found" | |
26 exit 1 | |
27 } | |
28 | |
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 | |
30 | |
31 echo "Done" |