build_expat_iss.bat 3.9 KB

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