build.bat 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. @echo off
  2. rem Inno Setup
  3. rem Copyright (C) 1997-2026 Jordan Russell
  4. rem Portions by Martijn Laan
  5. rem For conditions of distribution and use, see LICENSE.TXT.
  6. rem
  7. rem Batch file to prepare a release
  8. rem
  9. rem Calls setup-sign.bat if it exists to create a signed build, otherwise creates setup.exe without signing
  10. rem Signed build also require a setup-presign.bat to exist which should sign all files passed to it
  11. rem
  12. rem This batch files does the following things:
  13. rem -Compile ISHelpGen
  14. rem -Compile ISetup*.chm
  15. rem -Compile Inno Setup including ISSigTool
  16. rem -Create 32-bit and 64-bit Inno Setup installers
  17. rem
  18. rem Once done the installer can be found in Output
  19. setlocal
  20. set VER=7.0.0-preview-1
  21. echo Building Inno Setup %VER%...
  22. echo.
  23. cd /d %~dp0
  24. call .\compile.bat x64 issigtool
  25. if errorlevel 1 goto failed
  26. echo Compiling ISSigTool done
  27. rem Verify precompiled binaries which are used during compilation
  28. rem Note: Other precompiled binaries are verified by Setup.iss
  29. call .\issig.bat verify --key-file=def01.ispublickey ^
  30. Projects\Src\Compression.LZMADecompressor\Lzma2Decode\ISLzmaDec-x86.obj ^
  31. Projects\Src\Compression.LZMADecompressor\Lzma2Decode\ISLzmaDec-x64.obj ^
  32. Projects\Src\Compression.LZMA1SmallDecompressor\LzmaDecode\LzmaDecodeInno-x86.obj ^
  33. Projects\Src\Compression.LZMA1SmallDecompressor\LzmaDecode\LzmaDecodeInno-x64.obj ^
  34. Projects\Src\Compression.SevenZipDecoder\7zDecode\IS7zDec-x86.obj ^
  35. Projects\Src\Compression.SevenZipDecoder\7zDecode\IS7zDec-x64.obj
  36. if errorlevel 1 goto failed
  37. echo ISSigTool verify done
  38. rem Embed user's public key into sources
  39. call .\issig.bat embed
  40. if errorlevel 1 goto failed
  41. echo ISSigTool embed done
  42. call .\compile.bat x64 ishelpgen
  43. if errorlevel 1 goto failed
  44. echo Compiling ISHelpGen done
  45. cd ishelp
  46. if errorlevel 1 goto failed
  47. call .\compile.bat
  48. if errorlevel 1 goto failed
  49. cd ..
  50. if errorlevel 1 goto failed
  51. echo Compiling ISetup*.chm done
  52. pause
  53. call :build x86
  54. if errorlevel 1 goto failed
  55. echo Cleaning output of previous build
  56. del Files\ISCmplr.dll Files\ISPP.dll Files\Setup.e32 Files\Setup.e64 Files\SetupCustomStyle.e32 Files\SetupCustomStyle.e64 Files\SetupLdr.e32 Files\SetupLdr.e64
  57. if errorlevel 1 goto failed
  58. del Files\ISIDE.exe Files\ISCC.exe Files\ISSigTool.exe
  59. if errorlevel 1 goto failed
  60. call :build x64
  61. if errorlevel 1 goto failed
  62. echo All done!
  63. pause
  64. exit /b 0
  65. :failed
  66. echo *** FAILED ***
  67. pause
  68. exit /b 1
  69. :build
  70. call .\compile.bat %~1
  71. if errorlevel 1 exit /b 1
  72. echo Compiling %~1 Inno Setup done
  73. if exist .\setup-presign.bat (
  74. echo - Presigning
  75. call .\setup-presign.bat Files\ISCC.exe Files\ISCmplr.dll Files\ISPP.dll
  76. if errorlevel 1 exit /b 1
  77. echo Presign done
  78. )
  79. rem Sign using user's private key - also see compile.bat
  80. call .\issig.bat sign Files\ISCmplr.dll Files\ISPP.dll Files\Setup.e32 Files\Setup.e64 Files\SetupCustomStyle.e32 Files\SetupCustomStyle.e64 Files\SetupLdr.e32 Files\SetupLdr.e64
  81. if errorlevel 1 exit /b 1
  82. echo ISSigTool sign %~1 done
  83. echo - %~1 Setup.exe
  84. if exist .\setup-sign.bat (
  85. call .\setup-sign.bat /D%~1
  86. ) else (
  87. files\iscc setup.iss /D%~1
  88. )
  89. if errorlevel 1 exit /b 1
  90. echo - Renaming %~1 files
  91. cd output
  92. if errorlevel 1 exit /b 1
  93. move /y mysetup.exe innosetup-%VER%-%~1.exe
  94. if errorlevel 1 exit /b 1
  95. cd ..
  96. if errorlevel 1 exit /b 1
  97. echo Creating %~1 Inno Setup installer done
  98. call .\issig.bat sign output\innosetup-%VER%-%~1.exe
  99. if errorlevel 1 exit /b 1
  100. exit /b