File: build-appveyor.bat

package info (click to toggle)
mapnik 4.1.4%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 18,580 kB
  • sloc: cpp: 163,826; python: 1,265; sh: 690; xml: 161; makefile: 123; perl: 28; lisp: 13
file content (94 lines) | stat: -rw-r--r-- 3,215 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
@ECHO OFF
SETLOCAL
SET EL=0

ECHO =========== %~f0 ===========

ECHO NUMBER_OF_PROCESSORS^: %NUMBER_OF_PROCESSORS%
powershell Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
powershell .\scripts\appveyor-system-info.ps1
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

::only build on AppVeyor, if explicitly stated
ECHO APPVEYOR_REPO_COMMIT_MESSAGE^: "%APPVEYOR_REPO_COMMIT_MESSAGE%"
::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

ECHO configuration^: %configuration%
ECHO platform^: %platform%
ECHO msvs_toolset^: %msvs_toolset%
SET BUILD_TYPE=%configuration%
SET BUILDPLATFORM=%platform%
SET TOOLS_VERSION=%msvs_toolset%.0
ECHO ICU_VERSION^: %ICU_VERSION%
IF DEFINED APPVEYOR (ECHO on AppVeyor) ELSE (ECHO NOT on AppVeyor)
ECHO ========

SET PATH=C:\Python27;%PATH%
SET PATH=C:\Program Files\7-Zip;%PATH%

::update submodules (variant + test data)
git submodule update --init
IF %ERRORLEVEL% NEQ 0 GOTO ERROR


::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

::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


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


ECHO looking for boost and icu versions in SDK ...
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%


CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

SET AV_MAPNIK_GYP_STARTTIME=%TIME%
ECHO calling build.bat of mapnik-gyp && CALL build.bat
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO %AV_MAPNIK_GYP_STARTTIME% started mapnik-gyp build.bat
ECHO %TIME% finished mapnik-gyp build.bat

GOTO DONE

:ERROR
ECHO =========== ERROR %~f0 ===========
ECHO ERRORLEVEL^: %ERRORLEVEL%
SET EL=%ERRORLEVEL%

:DONE
ECHO =========== DONE %~f0 ===========

EXIT /b %EL%