From 28162f072022424255fd9dce925249dce5c9b77f Mon Sep 17 00:00:00 2001 From: bergwerkgis Date: Mon, 5 Sep 2016 14:00:17 +0000 Subject: [PATCH] [skip travis] fix relative path to get-boost-icu-version-from-sdk.ps1 (differs when called from windows-builds) --- scripts/build-appveyor.bat | 4 +++- scripts/get-boost-icu-version-from-sdk.ps1 | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/build-appveyor.bat b/scripts/build-appveyor.bat index 2ae40dfb6..d1fc084eb 100644 --- a/scripts/build-appveyor.bat +++ b/scripts/build-appveyor.bat @@ -64,7 +64,9 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR ECHO looking for boost and icu versions in SDK ... -FOR /F "tokens=1,2 usebackq" %%i in (`powershell .\scripts\get-boost-icu-version-from-sdk.ps1`) DO SET %%i=%%j +FOR /F "tokens=1,2 usebackq" %%i in (`powershell %APPVEYOR_BUILD_FOLDER%\scripts\get-boost-icu-version-from-sdk.ps1`) DO SET %%i=%%j +IF %ERRORLEVEL% NEQ 0 GOTO ERROR + ECHO BOOST_VERSION found in SDK^: %BOOST_VERSION% ECHO ICU_VERSION found in SDK^: %ICU_VERSION% ECHO ICU_VERSION2 found in SDK^: %ICU_VERSION2% diff --git a/scripts/get-boost-icu-version-from-sdk.ps1 b/scripts/get-boost-icu-version-from-sdk.ps1 index dc3bd43c5..a24c3196c 100644 --- a/scripts/get-boost-icu-version-from-sdk.ps1 +++ b/scripts/get-boost-icu-version-from-sdk.ps1 @@ -1,15 +1,21 @@ $ErrorActionPreference = 'Stop' $boost_version='0' $icu_version='0' +$libdir=$PSScriptRoot+"\..\mapnik-gyp\mapnik-sdk\lib" #get boost and icu versions directly from the files in the SDK #boost_python-vc140-mt-1_61.dll -$boost_version=(Get-ChildItem ".\mapnik-gyp\mapnik-sdk\lib" -Filter *boost*.dll)[0].BaseName.split("_")[-1] +$boost_version=(Get-ChildItem $libdir -Filter *boost*.dll)[0].BaseName.split("_")[-1] #icuin56.dll -$icu_version=(Get-ChildItem ".\mapnik-gyp\mapnik-sdk\lib" -Filter icuin*.dll)[0].BaseName.split("icuin")[-1] +$icu_version=(Get-ChildItem $libdir -Filter icuin*.dll)[0].BaseName.split("icuin")[-1] Write-Host "BOOST_VERSION" $boost_version Write-Host "ICU_VERSION" $icu_version".1" Write-Host "ICU_VERSION2" $icu_version"_1" + +trap { + "Error: $_" + exit 1 +}