Fix replacement in setup.h done in AppVeyor builds

We can't write to the file we're reading from, so use a temporary
variable.
This commit is contained in:
Vadim Zeitlin
2021-01-31 23:12:08 +01:00
parent d1810b0dce
commit b016088493

View File

@@ -63,7 +63,8 @@ before_build:
if (-not (Test-Path env:wxUSE_STL)) { $env:wxUSE_STL = '0' }
if (-not (Test-Path env:wxUSE_WEBVIEW_EDGE)) { $env:wxUSE_WEBVIEW_EDGE = '0' }
if (($env:compiler -ne "msys2") -and ($env:compiler -ne "cygwin")) {
gc include\wx\msw\setup.h |
$txt = gc include\wx\msw\setup.h
Write-Output $txt |
%{$_ -replace "define wxUSE_STL 0", "define wxUSE_STL $env:wxUSE_STL"} |
%{$_ -replace "define wxUSE_WEBVIEW_EDGE 0", "define wxUSE_WEBVIEW_EDGE $env:wxUSE_WEBVIEW_EDGE"} |
sc include\wx\msw\setup.h