compile-msbuild.bat 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 using MSBuild
  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 "%1"=="issigtool" (
  28. echo - ISSigTool.exe
  29. msbuild.exe ISSigTool.dproj /t:Build /p:Config=Release;Platform=Win32 /nologo
  30. ) else (
  31. echo - Projects.groupproj
  32. rem This emits warning MSB4056, but that's ok since the build doesn't use COM
  33. rem Modern MSBuild supports /noWarn:MSB4056, but the version targeted by Delphi 12.3's rsvars.bat does not
  34. msbuild.exe Projects.groupproj /t:Build /p:BuildGroup=Release /nologo
  35. )
  36. if errorlevel 1 goto failed
  37. cd ..
  38. if errorlevel 1 goto failed
  39. echo Success!
  40. if "%1"=="issigtool" goto exit
  41. rem Sign using user's private key - will be overwritten if called by build.bat
  42. call .\issig.bat sign Files\ISCmplr.dll Files\ISPP.dll Files\Setup.e32 Files\SetupCustomStyle.e32 Files\SetupLdr.e32 Files\SetupLdr.e64
  43. if errorlevel 1 goto failed
  44. echo ISSigTool sign done
  45. goto exit
  46. :failed
  47. echo *** FAILED ***
  48. cd ..
  49. :failed2
  50. exit /b 1
  51. :exit