diff --git a/appveyor.yml b/appveyor.yml index d4450d7a4..1511191bd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,5 @@ environment: msvs_toolset: 14 - BOOST_VERSION: 61 FASTBUILD: 1 matrix: - platform: x64 diff --git a/scripts/build-appveyor.bat b/scripts/build-appveyor.bat index 84088d4cb..2ae40dfb6 100644 --- a/scripts/build-appveyor.bat +++ b/scripts/build-appveyor.bat @@ -22,7 +22,6 @@ ECHO msvs_toolset^: %msvs_toolset% SET BUILD_TYPE=%configuration% SET BUILDPLATFORM=%platform% SET TOOLS_VERSION=%msvs_toolset%.0 -SET ICU_VERSION=56.1 ECHO ICU_VERSION^: %ICU_VERSION% IF DEFINED APPVEYOR (ECHO on AppVeyor) ELSE (ECHO NOT on AppVeyor) ECHO ======== @@ -63,6 +62,14 @@ ECHO extracting binary deps IF EXIST mapnik-sdk (ECHO already extracted) ELSE (7z -y x deps.7z | %windir%\system32\FIND "ing archive") 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 +ECHO BOOST_VERSION found in SDK^: %BOOST_VERSION% +ECHO ICU_VERSION found in SDK^: %ICU_VERSION% +ECHO ICU_VERSION2 found in SDK^: %ICU_VERSION2% + + CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 IF %ERRORLEVEL% NEQ 0 GOTO ERROR diff --git a/scripts/build-local.bat b/scripts/build-local.bat index 306e10c86..5a27b9bf8 100644 --- a/scripts/build-local.bat +++ b/scripts/build-local.bat @@ -10,11 +10,6 @@ SET APPVEYOR=true SET LOCAL_BUILD_DONT_SKIP_TESTS=true SET FASTBUILD=1 -FOR /F "tokens=1 usebackq" %%i in (`powershell .\scripts\parse-appveyor-yml.ps1`) DO SET BOOST_VERSION=%%i -ECHO BOOST_VERSION found in appveyor.yml^: %BOOST_VERSION% -IF "%BOOST_VERSION%"=="0" ECHO BOOST_VERSION not valid && SET ERRORLEVEL=1 && GOTO ERROR - - :: OVERRIDE PARAMETERS >>>>>>>> :NEXT-ARG diff --git a/scripts/get-boost-icu-version-from-sdk.ps1 b/scripts/get-boost-icu-version-from-sdk.ps1 new file mode 100644 index 000000000..dc3bd43c5 --- /dev/null +++ b/scripts/get-boost-icu-version-from-sdk.ps1 @@ -0,0 +1,15 @@ +$ErrorActionPreference = 'Stop' +$boost_version='0' +$icu_version='0' + +#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] + +#icuin56.dll +$icu_version=(Get-ChildItem ".\mapnik-gyp\mapnik-sdk\lib" -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" diff --git a/scripts/parse-appveyor-yml.ps1 b/scripts/parse-appveyor-yml.ps1 deleted file mode 100644 index f87ae7e3a..000000000 --- a/scripts/parse-appveyor-yml.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$ErrorActionPreference = 'Stop' -$boost_version='0' -Get-Content .\appveyor.yml | - foreach { - if ($_ -match "BOOST_VERSION: "){ $boost_version = $_.split()[-1] } - } -Write-Host $boost_version