@echo off REM This file is used only on Windows in order to install zlib. REM REM Forward slashes in directory names must be converted to backslash in order REM to work with xcopy. ARGH! REM The first argument is the directory containing the extracted zlib archive. REM The second argument is the directory that contains the prefix we are installing into. REM We will create an "zlib" subdirectory there containing the header files. REM Now convert the paths to use backslash and not forward slash REM See http://www.dostips.com/forum/viewtopic.php?f=3&t=422 SETLOCAL EnableDelayedExpansion REM Unpacking the zlib archive produces this subdirectory which we will copy REM the header files from. set source=%1 set source=!source:/=\! set target=%2 set target=!target:/=\! REM Now that the paths are Kosher, we can finally do what we came here for: REM Install the zlib files. if not exist %target%\include mkdir %target%\include xcopy /s /i /Y %source%\zlib.h %target%\include xcopy /s /i /Y %source%\zconf.h %target%\include if not exist %target%\lib mkdir %target%\lib xcopy /s /i /Y %source%\*.lib %target%\lib if not exist %target%\bin mkdir %target%\bin xcopy /s /i /Y %source%\*.dll %target%\bin