build.bat 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. @echo off
  2. rem Inno Setup
  3. rem Copyright (C) 1997-2024 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, else creates setup.exe without signing
  10. rem
  11. rem This batch files does the following things:
  12. rem -Compile ISHelpGen
  13. rem -Compile ISetup*.chm
  14. rem -Compile Inno Setup
  15. rem -Create Inno Setup installer
  16. rem
  17. rem Once done the installer can be found in Output
  18. setlocal
  19. set VER=6.4.0-dev
  20. echo Building Inno Setup %VER%...
  21. echo.
  22. cd /d %~dp0
  23. if "%1"=="setup" goto setup
  24. if not "%1"=="" goto failed
  25. cd ishelp\ishelpgen
  26. if errorlevel 1 goto failed
  27. call .\compile.bat
  28. if errorlevel 1 goto failed
  29. cd ..\..
  30. if errorlevel 1 goto failed
  31. echo Compiling ISHelpGen done
  32. pause
  33. cd ishelp
  34. if errorlevel 1 goto failed
  35. call .\compile.bat
  36. if errorlevel 1 goto failed
  37. cd ..
  38. if errorlevel 1 goto failed
  39. echo Compiling ISetup*.chm done
  40. pause
  41. call .\compile.bat
  42. if errorlevel 1 goto failed
  43. echo Compiling Inno Setup done
  44. pause
  45. :setup
  46. echo - Setup.exe
  47. if exist .\setup-sign.bat (
  48. call .\setup-sign.bat
  49. ) else (
  50. files\iscc setup.iss
  51. )
  52. if errorlevel 1 goto failed
  53. echo - Renaming files
  54. cd output
  55. if errorlevel 1 goto failed
  56. move /y mysetup.exe innosetup-%VER%.exe
  57. if errorlevel 1 goto failed
  58. cd ..
  59. if errorlevel 1 goto failed
  60. echo Creating Inno Setup installer done
  61. powershell.exe -Command "Write-Host -NoNewline 'SHA256 hash: '; (Get-FileHash -Algorithm SHA256 -Path output\innosetup-%VER%.exe).Hash.ToLower()"
  62. echo All done!
  63. pause
  64. exit /b 0
  65. :failed
  66. echo *** FAILED ***
  67. pause
  68. exit /b 1