compile.bat 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 compile IS7zDec.c
  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 be created
  13. echo with the following line, adjusted for your system:
  14. echo.
  15. echo set VSTOOLSROOT=C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools
  16. goto failed2
  17. :compilesettingsfound
  18. set VSTOOLSROOT=
  19. call .\compilesettings.bat
  20. if "%VSTOOLSROOT%"=="" goto compilesettingserror
  21. rem -------------------------------------------------------------------------
  22. set __VSCMD_ARG_NO_LOGO=1
  23. set VSCMD_SKIP_SENDTELEMETRY=1
  24. echo - Calling VsDevCmd.bat
  25. call "%VSTOOLSROOT%\VsDevCmd.bat"
  26. if errorlevel 1 goto exit
  27. echo.
  28. echo - Compiling IS7zDec.c
  29. cl.exe /c /O2 /GS- IS7zDec.c
  30. if errorlevel 1 goto failed
  31. echo Success!
  32. goto exit
  33. :failed
  34. echo *** FAILED ***
  35. :failed2
  36. exit /b 1
  37. :exit