1REM Batch script to build Inno Setup installer for libexpat for Windows 2REM Call from parent directory, e.g.: cmd /c win32\build_expat_iss.bat 3REM __ __ _ 4REM ___\ \/ /_ __ __ _| |_ 5REM / _ \\ /| '_ \ / _` | __| 6REM | __// \| |_) | (_| | |_ 7REM \___/_/\_\ .__/ \__,_|\__| 8REM |_| XML parser 9REM 10REM Copyright (c) 2019 Sebastian Pipping <sebastian@pipping.org> 11REM Licensed under the MIT license: 12REM 13REM Permission is hereby granted, free of charge, to any person obtaining 14REM a copy of this software and associated documentation files (the 15REM "Software"), to deal in the Software without restriction, including 16REM without limitation the rights to use, copy, modify, merge, publish, 17REM distribute, sublicense, and/or sell copies of the Software, and to permit 18REM persons to whom the Software is furnished to do so, subject to the 19REM following conditions: 20REM 21REM The above copyright notice and this permission notice shall be included 22REM in all copies or substantial portions of the Software. 23REM 24REM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25REM EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26REM MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 27REM NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 28REM DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 29REM OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 30REM USE OR OTHER DEALINGS IN THE SOFTWARE. 31 32SET GENERATOR=Visual Studio 15 2017 33 34REM Read by msbuild! 35SET CONFIGURATION=RelWithDebInfo 36 37REM Where Inno Setup expects build results 38SET BINDIR=win32\bin\Release 39 40 41MD %BINDIR% || EXIT /b 1 42 43 44MD build_shared_char || EXIT /b 1 45CD build_shared_char || EXIT /b 1 46 cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_MSVC_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF .. || EXIT /b 1 47 msbuild /m expat.sln || EXIT /b 1 48 DIR %CONFIGURATION% || EXIT /b 1 49 CD .. || EXIT /b 1 50COPY build_shared_char\%CONFIGURATION%\libexpat.dll %BINDIR%\ || EXIT /b 1 51COPY build_shared_char\%CONFIGURATION%\libexpat.lib %BINDIR%\ || EXIT /b 1 52 53 54MD build_static_char || EXIT /b 1 55CD build_static_char || EXIT /b 1 56 cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_MSVC_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_SHARED_LIBS=OFF .. || EXIT /b 1 57 msbuild /m expat.sln || EXIT /b 1 58 DIR %CONFIGURATION% || EXIT /b 1 59 CD .. || EXIT /b 1 60COPY build_static_char\%CONFIGURATION%\libexpatMT.lib %BINDIR%\ || EXIT /b 1 61COPY build_static_char\xmlwf\%CONFIGURATION%\xmlwf.exe %BINDIR%\ || EXIT /b 1 62 63 64MD build_shared_wchar_t || EXIT /b 1 65CD build_shared_wchar_t || EXIT /b 1 66 cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_MSVC_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF -DEXPAT_CHAR_TYPE=wchar_t .. || EXIT /b 1 67 msbuild /m expat.sln || EXIT /b 1 68 DIR %CONFIGURATION% || EXIT /b 1 69 CD .. || EXIT /b 1 70COPY build_shared_wchar_t\%CONFIGURATION%\libexpatw.dll %BINDIR%\ || EXIT /b 1 71COPY build_shared_wchar_t\%CONFIGURATION%\libexpatw.lib %BINDIR%\ || EXIT /b 1 72 73 74MD build_static_wchar_t || EXIT /b 1 75CD build_static_wchar_t || EXIT /b 1 76 cmake -G"%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DEXPAT_MSVC_STATIC_CRT=ON -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF -DEXPAT_SHARED_LIBS=OFF -DEXPAT_CHAR_TYPE=wchar_t .. || EXIT /b 1 77 msbuild /m expat.sln || EXIT /b 1 78 DIR %CONFIGURATION% || EXIT /b 1 79 CD .. || EXIT /b 1 80COPY build_static_wchar_t\%CONFIGURATION%\libexpatwMT.lib %BINDIR%\ || EXIT /b 1 81 82 83DIR %BINDIR% || EXIT /b 1 84iscc win32\expat.iss || EXIT /b 1 85