Skip to content

Commit 529cb20

Browse files
authored
Merge pull request #257 from geographika/sdk-update
Update Appveyor to use latest Windows SDK
2 parents 447c0c6 + 94a5ed3 commit 529cb20

File tree

1 file changed

+38
-33
lines changed

1 file changed

+38
-33
lines changed

appveyor.yml

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1-
image: Visual Studio 2017
1+
image: Visual Studio 2019
22

33
platform:
44
- x64
55

66
environment:
77
matrix:
8-
# VS 2017
9-
- VS_VERSION: Visual Studio 15 2017
8+
- VS_VERSION: Visual Studio 16 2019
109

1110
shallow_clone: true
1211

1312
build_script:
1413
- echo build_script
15-
- if "%platform%" == "x64" SET VS_FULL=%VS_VERSION% Win64
14+
- set "BUILD_FOLDER=%APPVEYOR_BUILD_FOLDER:\=/%"
15+
- if "%platform%" == "x64" SET VS_FULL=%VS_VERSION%
16+
- if "%platform%" == "x64" SET VS_ARCH=x64
1617
- if "%platform%" == "x86" SET VS_FULL=%VS_VERSION%
17-
- if "%platform%" == "x86" SET SDK=release-1911
18-
- if "%platform%" == "x64" SET SDK=release-1911-x64
18+
- if "%platform%" == "x86" SET VS_ARCH=Win32
19+
- if "%platform%" == "x86" SET SDK=release-1928
20+
- if "%platform%" == "x64" SET SDK=release-1928-x64
21+
- if "%platform%" == "x64" call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build/vcvars64.bat"
22+
- if "%platform%" == "x86" call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build/vcvars32.bat"
1923
- echo "%VS_FULL%"
20-
- if "%platform%" == "x64" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
21-
- if "%platform%" == "x86" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
2224
- set SDK_ZIP=%SDK%-dev.zip
2325
- set SDK_URL=http://download.gisinternals.com/sdk/downloads/%SDK_ZIP%
2426
- echo "%SDK_ZIP%"
@@ -28,14 +30,14 @@ build_script:
2830
- appveyor DownloadFile "%SDK_URL%"
2931
- 7z x "%SDK_ZIP%" > nul
3032
- cd %SDK%
31-
- cd lib
32-
- copy libpng.lib libpng.lib.lib
33+
#- cd lib
34+
#- copy libpng.lib libpng.lib.lib
3335
- cd %APPVEYOR_BUILD_FOLDER%
34-
- set SDK_PREFIX=%CD%\sdk\%SDK%
35-
- set SDK_INC=%CD%\sdk\%SDK%\include
36-
- set SDK_LIB=%CD%\sdk\%SDK%\lib
37-
- set SDK_BIN=%CD%\sdk\%SDK%\bin
38-
- set REGEX_DIR=%CD%\sdk\regex-0.12
36+
- set SDK_PREFIX=%BUILD_FOLDER%/sdk/%SDK%
37+
- set SDK_INC=%BUILD_FOLDER%/sdk/%SDK%/include
38+
- set SDK_LIB=%BUILD_FOLDER%/sdk/%SDK%/lib
39+
- set SDK_BIN=%BUILD_FOLDER%/sdk/%SDK%/bin
40+
- set REGEX_DIR=%BUILD_FOLDER%/sdk/support/regex-0.12
3941

4042
- if not exist apr-1.6.3-win32-src.zip appveyor DownloadFile https://archive.apache.org/dist/apr/apr-1.6.3-win32-src.zip
4143
- 7z x apr-1.6.3-win32-src.zip
@@ -96,42 +98,45 @@ build_script:
9698
- nmake
9799
- nmake install
98100

99-
- copy %SDK_PREFIX%\lib\libfcgi.lib %SDK_PREFIX%\lib\fcgi.lib /Y > nul
100-
- copy %SDK_PREFIX%\lib\apr-1.lib %SDK_PREFIX%\lib\apr-1-1.lib /Y > nul
101-
- copy %SDK_PREFIX%\lib\libapr-1.lib %SDK_PREFIX%\lib\apr-1.lib /Y > nul
102-
- copy %SDK_PREFIX%\lib\aprutil-1.lib %SDK_PREFIX%\lib\aprutil-1-1.lib /Y > nul
103-
- copy %SDK_PREFIX%\lib\libaprutil-1.lib %SDK_PREFIX%\lib\aprutil-1.lib /Y > nul
104-
- xcopy %REGEX_DIR%\*.h %SDK_PREFIX%\include\ /O /X /E /H /K /Y > nul
101+
- echo %SDK_LIB%
102+
- cd %SDK_LIB%
103+
- dir
104+
- copy "%SDK_LIB%/libfcgi.lib" "%SDK_LIB%/fcgi.lib" /Y
105+
- copy "%SDK_LIB%/apr-1.lib" "%SDK_LIB%/apr-1-1.lib" /Y
106+
- copy "%SDK_LIB%/libapr-1.lib" "%SDK_LIB%/apr-1.lib" /Y > nul
107+
- copy "%SDK_LIB%/aprutil-1.lib" "%SDK_LIB%/aprutil-1-1.lib" /Y > nul
108+
- copy "%SDK_LIB%/libaprutil-1.lib" "%SDK_LIB%/aprutil-1.lib" /Y > nul
109+
- xcopy "%REGEX_DIR%/*.h" "%SDK_INC%" /O /X /E /H /K /Y > nul
105110

106111
- cd %APPVEYOR_BUILD_FOLDER%
107112

108113
- mkdir build
109114
- cd build
110-
- cmake -G "%VS_FULL%"
115+
- cmake -G "%VS_FULL%" -A %VS_ARCH%
111116
-DWITH_APACHE=OFF
112117
-DWITH_FCGI=ON
113118
-DWITH_PCRE=ON
114119
-DWITH_TIFF=OFF
115120
-DCMAKE_PREFIX_PATH=%SDK_PREFIX% ..
116121
- cmake --build . --config Release
117122

118-
- copy %SDK_PREFIX%\lib\apr-1-1.lib %SDK_PREFIX%\lib\apr-1.lib /Y > nul
119-
- copy %SDK_PREFIX%\lib\aprutil-1-1.lib %SDK_PREFIX%\lib\aprutil-1.lib /Y > nul
120-
- copy %SDK_PREFIX%\bin\libapr-1.dll %SDK_PREFIX%\bin\apr-1.dll /Y > nul
121-
- copy %SDK_PREFIX%\bin\libaprutil-1.dll %SDK_PREFIX%\bin\aprutil-1.dll /Y > nul
122-
- copy %SDK_PREFIX%\bin\libfcgi.dll %SDK_PREFIX%\bin\fcgi.dll /Y > nul
123-
- copy Release\*dll %SDK_PREFIX%\bin\ /Y > nul
124-
- copy Release\*lib %SDK_PREFIX%\lib\ /Y > nul
125-
- copy cgi\Release\*exe %SDK_PREFIX%\bin\ /Y > nul
126-
- copy util\Release\*exe %SDK_PREFIX%\bin\ /Y > nul
123+
- copy "%SDK_LIB%\apr-1-1.lib" "%SDK_LIB%\apr-1.lib" /Y > nul
124+
- copy "%SDK_LIB%\aprutil-1-1.lib" "%SDK_LIB%\aprutil-1.lib" /Y > nul
125+
- copy "%SDK_BIN%\libapr-1.dll" "%SDK_BIN%\apr-1.dll" /Y > nul
126+
- copy "%SDK_BIN%\libaprutil-1.dll" "%SDK_BIN%\aprutil-1.dll" /Y > nul
127+
- copy "%SDK_BIN%\libfcgi.dll" "%SDK_BIN%\fcgi.dll" /Y > nul
128+
- copy "Release\*dll" "%SDK_BIN%" /Y > nul
129+
- copy "Release\*lib" "%SDK_LIB%" /Y > nul
130+
- copy "cgi\Release\*exe" "%SDK_BIN%" /Y > nul
131+
- copy "util\Release\*exe" "%SDK_BIN%" /Y > nul
127132

128133
after_build:
129-
- cd %SDK_PREFIX%\bin
134+
- cd %SDK_BIN%
130135
- 7z a %APPVEYOR_BUILD_FOLDER%\mapcache.zip libapr*.dll apr*.dll pcre.dll pcreposix.dll mapcache.dll
131136
mapcache.fcgi.exe mapcache_seed.exe %APPVEYOR_BUILD_FOLDER%\mapcache.xml
132137

133138
test_script:
134-
- cd %SDK_PREFIX%\bin
139+
- cd %SDK_BIN%
135140
- set MAPCACHE_CONFIG_FILE=mapcache.xml
136141
- set PATH_INFO="/"
137142
- set REQUEST_METHOD=GET

0 commit comments

Comments
 (0)