compile.bat 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 compile Inno Setup
  8. setlocal
  9. cd /d %~dp0
  10. if exist compilesettings.bat goto compilesettingsfound
  11. :compilesettingserror
  12. echo compilesettings.bat is missing or incomplete. It needs to contain
  13. echo the following line, adjusted for your system:
  14. echo.
  15. echo set DELPHIXEROOT=C:\Program Files\Embarcadero\RAD Studio\20.0 [Path to Delphi 10.4 Sydney (or later)]
  16. goto failed2
  17. :compilesettingsfound
  18. set DELPHIXEROOT=
  19. call .\compilesettings.bat
  20. if "%DELPHIXEROOT%"=="" goto compilesettingserror
  21. rem -------------------------------------------------------------------------
  22. call "%DELPHIXEROOT%\bin\rsvars.bat"
  23. if errorlevel 1 goto failed
  24. cd Projects
  25. if errorlevel 1 goto failed
  26. set EnvOptionsWarn=false
  27. if /I "%1"=="ishelpgen" (
  28. echo - ISHelpGen.exe
  29. msbuild.exe ..\ISHelp\ISHelpGen\ISHelpGen.dproj /t:Build /p:Config=Release;Platform=Win64 /nologo
  30. ) else if /I "%1"=="issigtool" (
  31. echo - ISSigTool.exe
  32. msbuild.exe ISSigTool.dproj /t:Build /p:Config=Release;Platform=Win32 /nologo
  33. ) else (
  34. echo - Projects.groupproj - Release build group
  35. rem This emits warning MSB4056, but that's ok since the build doesn't use COM. Modern MSBuild supports
  36. rem /noWarn:MSB4056, but the version targeted by Delphi 12.3's rsvars.bat does not. Additionally Delphi's
  37. rem implementation of build groups does not seem to pass through additional parameters, so even with a
  38. rem modern MSBuild you cannot suppress the warning. Likewise, using /nologo or /v:q has no effect.
  39. msbuild.exe Projects.groupproj /t:Build /p:BuildGroup=Release
  40. )
  41. if errorlevel 1 goto failed
  42. cd ..
  43. if errorlevel 1 goto failed
  44. echo Success!
  45. if not "%1"=="" goto exit
  46. rem Sign using user's private key - will be overwritten if called by build.bat
  47. call .\issig.bat sign Files\ISCmplr.dll Files\ISPP.dll Files\Setup.e32 Files\SetupCustomStyle.e32 Files\SetupLdr.e32 Files\SetupLdr.e64
  48. if errorlevel 1 goto failed
  49. echo ISSigTool sign done
  50. goto exit
  51. :failed
  52. echo *** FAILED ***
  53. cd ..
  54. :failed2
  55. exit /b 1
  56. :exit