11environment :
22 global :
3- BZIP2_VER : 1.0.6
3+ BZIP2_VER : 1.0.8.0
44 EXPAT_VER : 2.2.5
55 PROJ4_VER : 4.9.3
66 ZLIB_VER : 1.2.11
@@ -11,6 +11,8 @@ environment:
1111 WINGETOPT_VER : v0.95
1212 GETOPT_INCLUDE_DIR : C:\wingetopt\src
1313 GETOPT_LIBRARY : C:\wingetopt\build\wingetopt.lib
14+ BZIP2_INCLUDE_DIR : C:\bzip2\dev
15+ BZIP2_LIBRARY : C:\bzip2\dll
1416 BOOST_PATH : C:\Libraries\boost_1_63_0
1517 POSTGRESQL_VER : 9.6.6
1618 TESTS_POSTGRESQL_ROOT : C:\Progra~1\PostgreSQL\9.6
@@ -33,6 +35,8 @@ clone_depth: 1
3335
3436init :
3537 - git config --global core.autocrlf input
38+ - set bz2_dll_url=https://github.com/philr/bzip2-windows/releases/download/v%BZIP2_VER%/bzip2-dll-%BZIP2_VER%-win-%arch%.zip
39+ - set bz2_dev_url=https://github.com/philr/bzip2-windows/releases/download/v%BZIP2_VER%/bzip2-dev-%BZIP2_VER%-win-%arch%.zip
3640 - if "%arch%"=="x86" (
3741 set vcvarsall_arg=x86&&
3842 set conda_path=C:\Miniconda36\Scripts&&
@@ -53,7 +57,11 @@ install:
5357 - conda config --set always_yes yes
5458 - conda create --name osm2pgsql
5559 - activate osm2pgsql
56- - conda install bzip2=%BZIP2_VER% expat=%EXPAT_VER% proj4=%PROJ4_VER% zlib=%ZLIB_VER% postgresql=%POSTGRESQL_VER%
60+ - conda install expat=%EXPAT_VER% proj4=%PROJ4_VER% zlib=%ZLIB_VER% postgresql=%POSTGRESQL_VER%
61+ - ps : if (!(Test-Path "C:\bzip2_dll_$env:arch.zip")){(new-object net.webclient).DownloadFile($env:bz2_dll_url, "C:\bzip2_dll_$env:arch.zip")}
62+ - 7z x -y C:\bzip2_dll_%arch%.zip -o%BZIP2_LIBRARY%
63+ - ps : if (!(Test-Path "C:\bzip2_dev_$env:arch.zip")){(new-object net.webclient).DownloadFile($env:bz2_dev_url, "C:\bzip2_dev_$env:arch.zip")}
64+ - 7z x -y C:\bzip2_dev_%arch%.zip -o%BZIP2_INCLUDE_DIR%
5765 - ps : if (!(Test-Path "C:\lua_$env:arch.zip")){(new-object net.webclient).DownloadFile($env:lua_url, "C:\lua_$env:arch.zip")}
5866 - 7z x -y C:\lua_%arch%.zip -oC:\lua
5967 - ps : if (!(Test-Path "C:\postgis.zip")){(new-object net.webclient).DownloadFile($env:POSTGIS_URL, "C:\postgis.zip")}
@@ -78,6 +86,8 @@ build_script:
7886 -DLUA_INCLUDE_DIR=%LUA_INCLUDE_DIR% -DLUA_LIBRARIES=%LUA_LIBRARIES%
7987 -DGETOPT_INCLUDE_DIR=%GETOPT_INCLUDE_DIR% -DGETOPT_LIBRARY=%GETOPT_LIBRARY%
8088 -DBOOST_ROOT=%BOOST_PATH% -DBoost_USE_STATIC_LIBS=ON
89+ -DBZIP2_INCLUDE_DIR=%BZIP2_INCLUDE_DIR%
90+ -DBZIP2_LIBRARIES=%BZIP2_INCLUDE_DIR%\libbz2.lib
8191 - nmake
8292
8393after_build :
@@ -90,7 +100,7 @@ after_build:
90100 - copy /y %conda_library_path%\bin\ssleay32.dll osm2pgsql-bin
91101 - copy /y %conda_library_path%\bin\zlib.dll osm2pgsql-bin
92102 - copy /y %conda_library_path%\bin\expat.dll osm2pgsql-bin
93- - copy /y %conda_library_path%\bin \libbz2.dll osm2pgsql-bin
103+ - copy /y %BZIP2_LIBRARY% \libbz2.dll osm2pgsql-bin
94104 - copy /y %LUA_DLL% osm2pgsql-bin
95105 - 7z a c:\osm2pgsql\osm2pgsql_%build_type%_%arch%.zip osm2pgsql-bin -tzip
96106
@@ -114,4 +124,6 @@ artifacts:
114124
115125cache :
116126 - C:\lua_%arch%.zip -> appveyor.yml
127+ - C:\bzip2_dev_%arch%.zip -> appveyor.yml
128+ - C:\bzip2_dll_%arch%.zip -> appveyor.yml
117129 - C:\postgis.zip -> appveyor.yml
0 commit comments