view deploy/win32/generate-wxs.ps1 @ 2596:04d381f0d89a tip

Default branch is now named default on git as well as hg, in case we ever want to switch to mirroring in the other direction
author Chris Cannam
date Thu, 27 Aug 2020 15:58:56 +0100
parents 8ac67c315afa
children
line wrap: on
line source

Set-StrictMode -Version 2.0
$ErrorActionPreference = "Stop"

$version = (Get-Content version.h) -replace '#define SV_VERSION ','' -replace '"','' -replace '-pre.*',''
$wxs = "deploy\win32\sonic-visualiser.wxs"

$in = "$wxs.in"

echo "Generating $wxs..."
echo " ...for SV version $version"
echo " ...from $in"
echo ""

if (!(Test-Path -Path $in -PathType Leaf)) {
    echo "ERROR: Input file $in not found"
    exit 1
}

(Get-Content $in) -replace '@VERSION@', $version -replace '@W@', '<!-- DO NOT EDIT THIS FILE: it is auto-generated -->' | Out-File -encoding ASCII $wxs

echo "Done"