2 :: Licensed under the Apache License
, Version
2.0 (the
"License");
3 :: you may
not use this file except in compliance with the License.
4 :: You may obtain a
copy of the License at
6 :: http
://www.apache.org
/licenses
/LICENSE
-2.0
8 :: Unless required by applicable law or agreed to in writing
, software
9 :: distributed under the License is distributed on an
"AS IS" BASIS
,
10 :: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
, either express or implied.
11 :: See the License
for the specific language governing permissions and
12 :: limitations under the License.
15 SETLOCAL EnableDelayedExpansion
17 SET PACKAGE
=zlib
-%ZLIB_VERSION%
18 SET BUILDDIR
=%WIN3P%\zlib
-build
19 SET INSTDIR
=%WIN3P%\zlib
-inst
20 SET SRCDIR
=%WIN3P%\
%PACKAGE%
21 SET URLFILE
=%PACKAGE%.tar.gz
23 :: This allows us to tolerate
when the current version is archived
24 SET URL
=http
://zlib.
net/%URLFILE%
25 SET FURL
=http
://zlib.
net/fossils
/%URLFILE%
27 :: Download
- support running a local build or a build in appveyor
28 CD "%WIN3P%" ||
EXIT /B
29 IF "%APPVEYOR_BUILD_ID%" == "" (
30 curl
-L
-f
-o
"%URLFILE%" "%URL%"
32 curl
-L
-f
-o
"%URLFILE%" "%FURL%"
35 appveyor DownloadFile
"%URL%"
37 appveyor DownloadFile
"%FURL%" ||
EXIT /B
40 7z x
"%URLFILE%" -so |
7z x
-si
-ttar
> nul ||
EXIT /B
43 MKDIR "%BUILDDIR%" ||
EXIT /B
44 CD "%BUILDDIR%" ||
EXIT /B
47 -DCMAKE_INSTALL_PREFIX
="%INSTDIR%" ^
48 -DCMAKE_BUILD_TYPE
="%CONFIGURATION%" ||
EXIT /B
51 nmake
/fMakefile install ||
EXIT /B
52 IF "%CONFIGURATION%" == "Debug" (
53 COPY "%BUILDDIR%\zlibd.pdb" "%INSTDIR%\bin\" || EXIT /B