2015-09-21 13:38:36 +02:00
|
|
|
@ECHO OFF
|
|
|
|
SETLOCAL
|
|
|
|
SET EL=0
|
|
|
|
|
|
|
|
ECHO =========== %~f0 ===========
|
|
|
|
|
2015-09-21 15:17:03 +02:00
|
|
|
ECHO NUMBER_OF_PROCESSORS^: %NUMBER_OF_PROCESSORS%
|
2015-12-16 13:04:35 +01:00
|
|
|
powershell Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force
|
2015-09-21 15:17:03 +02:00
|
|
|
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
2015-12-16 11:56:05 +01:00
|
|
|
powershell .\scripts\appveyor-system-info.ps1
|
2015-12-16 13:04:35 +01:00
|
|
|
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
2015-09-21 15:17:03 +02:00
|
|
|
|
2015-09-21 16:11:17 +02:00
|
|
|
::only build on AppVeyor, if explicitly stated
|
2016-02-04 11:21:41 +01:00
|
|
|
ECHO APPVEYOR_REPO_COMMIT_MESSAGE^: "%APPVEYOR_REPO_COMMIT_MESSAGE%"
|
2015-10-03 10:26:00 +02:00
|
|
|
::SET BUILD_ON_APPVEYOR=0
|
|
|
|
::for /F "tokens=1 usebackq" %%i in (`powershell .\scripts\parse-commit-message.ps1 '[build appveyor]'`) DO SET BUILD_ON_APPVEYOR=%%i
|
|
|
|
::IF %BUILD_ON_APPVEYOR% EQU 0 ECHO not building, commit with [build appveyor] && GOTO DONE
|
2015-09-21 16:11:17 +02:00
|
|
|
|
2015-09-21 18:45:38 +02:00
|
|
|
ECHO configuration^: %configuration%
|
|
|
|
ECHO platform^: %platform%
|
|
|
|
ECHO msvs_toolset^: %msvs_toolset%
|
2015-09-21 14:35:11 +02:00
|
|
|
SET BUILD_TYPE=%configuration%
|
|
|
|
SET BUILDPLATFORM=%platform%
|
2015-09-21 14:42:52 +02:00
|
|
|
SET TOOLS_VERSION=%msvs_toolset%.0
|
2016-02-29 14:58:59 +01:00
|
|
|
SET ICU_VERSION=56.1
|
|
|
|
ECHO ICU_VERSION^: %ICU_VERSION%
|
2015-09-21 19:52:13 +02:00
|
|
|
IF DEFINED APPVEYOR (ECHO on AppVeyor) ELSE (ECHO NOT on AppVeyor)
|
|
|
|
ECHO ========
|
2015-09-21 14:35:11 +02:00
|
|
|
|
2015-09-21 13:38:36 +02:00
|
|
|
SET PATH=C:\Python27;%PATH%
|
|
|
|
SET PATH=C:\Program Files\7-Zip;%PATH%
|
2015-12-01 11:49:53 +01:00
|
|
|
|
2016-01-18 11:52:02 +01:00
|
|
|
::update submodule variant
|
|
|
|
git submodule update --init deps/mapbox/variant
|
|
|
|
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
|
|
|
|
2016-02-24 15:36:43 +01:00
|
|
|
|
|
|
|
::python bindings, including test data
|
|
|
|
IF NOT EXIST bindings\python git clone --recursive https://github.com/mapnik/python-mapnik.git bindings/python
|
|
|
|
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
|
|
|
|
|
|
|
CD bindings\python & IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
|
|
|
git fetch & IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
|
|
|
git pull & IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
|
|
|
CD ..\.. & IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
|
|
|
|
2015-09-21 14:04:28 +02:00
|
|
|
::cloning mapnik-gyp
|
|
|
|
if EXIST mapnik-gyp ECHO mapnik-gyp already cloned && GOTO MAPNIK_GYP_ALREADY_HERE
|
|
|
|
CALL git clone https://github.com/mapnik/mapnik-gyp.git
|
|
|
|
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
|
|
|
:MAPNIK_GYP_ALREADY_HERE
|
|
|
|
CD mapnik-gyp
|
|
|
|
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
|
|
|
git pull
|
|
|
|
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
|
|
|
|
|
|
|
|
2015-09-21 13:38:36 +02:00
|
|
|
SET DEPS_URL=https://mapbox.s3.amazonaws.com/windows-builds/windows-build-deps/mapnik-win-sdk-binary-deps-%msvs_toolset%.0-%platform%.7z
|
|
|
|
ECHO fetching binary deps^: %DEPS_URL%
|
|
|
|
IF EXIST deps.7z (ECHO already downloaded) ELSE (powershell Invoke-WebRequest "${env:DEPS_URL}" -OutFile deps.7z)
|
|
|
|
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
|
|
|
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
|
|
|
|
|
2015-09-21 14:04:28 +02:00
|
|
|
CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
|
|
|
|
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
2015-09-21 13:38:36 +02:00
|
|
|
|
2015-09-21 18:45:38 +02:00
|
|
|
SET AV_MAPNIK_GYP_STARTTIME=%TIME%
|
2015-09-21 14:04:28 +02:00
|
|
|
ECHO calling build.bat of mapnik-gyp && CALL build.bat
|
|
|
|
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
2015-09-21 18:45:38 +02:00
|
|
|
ECHO %AV_MAPNIK_GYP_STARTTIME% started mapnik-gyp build.bat
|
|
|
|
ECHO %TIME% finished mapnik-gyp build.bat
|
2015-09-21 13:38:36 +02:00
|
|
|
|
|
|
|
GOTO DONE
|
|
|
|
|
|
|
|
:ERROR
|
|
|
|
ECHO =========== ERROR %~f0 ===========
|
|
|
|
ECHO ERRORLEVEL^: %ERRORLEVEL%
|
|
|
|
SET EL=%ERRORLEVEL%
|
|
|
|
|
|
|
|
:DONE
|
|
|
|
ECHO =========== DONE %~f0 ===========
|
|
|
|
|
|
|
|
EXIT /b %EL%
|