build.bat 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. @echo off
  2. rem Inno Setup
  3. rem Copyright (C) 1997-2025 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 Inno Setup installer
  17. rem
  18. rem Once done the installer can be found in Output
  19. setlocal
  20. set VER=6.4.3
  21. echo Building Inno Setup %VER%...
  22. echo.
  23. cd /d %~dp0
  24. if "%1"=="setup" goto setup
  25. if not "%1"=="" goto failed
  26. cd ishelp\ishelpgen
  27. if errorlevel 1 goto failed
  28. call .\compile.bat
  29. if errorlevel 1 goto failed
  30. cd ..\..
  31. if errorlevel 1 goto failed
  32. echo Compiling ISHelpGen done
  33. pause
  34. cd ishelp
  35. if errorlevel 1 goto failed
  36. call .\compile.bat
  37. if errorlevel 1 goto failed
  38. cd ..
  39. if errorlevel 1 goto failed
  40. echo Compiling ISetup*.chm done
  41. pause
  42. if not exist files\issigtool.exe (
  43. echo Missing ISSigTool
  44. call .\compile.bat issigtool
  45. if errorlevel 1 goto failed
  46. echo Compiling ISSigTool done
  47. )
  48. call .\issig.bat embed
  49. if errorlevel 1 goto failed
  50. echo ISSigTool embed done
  51. call .\compile.bat
  52. if errorlevel 1 goto failed
  53. echo Compiling Inno Setup done
  54. if exist .\setup-presign.bat (
  55. call .\setup-presign.bat Files\ISCC.exe Files\ISCmplr.dll Files\ISPP.dll
  56. )
  57. call .\issig.bat sign
  58. if errorlevel 1 goto failed
  59. echo ISSigTool sign done
  60. pause
  61. :setup
  62. echo - Setup.exe
  63. if exist .\setup-sign.bat (
  64. call .\setup-sign.bat
  65. ) else (
  66. files\iscc setup.iss
  67. )
  68. if errorlevel 1 goto failed
  69. echo - Renaming files
  70. cd output
  71. if errorlevel 1 goto failed
  72. move /y mysetup.exe innosetup-%VER%.exe
  73. if errorlevel 1 goto failed
  74. cd ..
  75. if errorlevel 1 goto failed
  76. echo Creating Inno Setup installer done
  77. powershell.exe -NoProfile -Command "Write-Host -NoNewline 'SHA256 hash: '; (Get-FileHash -Algorithm SHA256 -Path output\innosetup-%VER%.exe).Hash.ToLower()"
  78. echo All done!
  79. pause
  80. exit /b 0
  81. :failed
  82. echo *** FAILED ***
  83. pause
  84. exit /b 1