compile.bat 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 IS7zDec.c
  8. setlocal
  9. cd /d %~dp0
  10. if "%1"=="x86" goto archfound
  11. if "%1"=="x64" goto archfound
  12. echo Architecture parameter is missing or invalid. Must be "x86" or "x64".
  13. goto failed2
  14. :archfound
  15. if exist compilesettings.bat goto compilesettingsfound
  16. :compilesettingserror
  17. echo compilesettings.bat is missing or incomplete. It needs to be created
  18. echo with the following line, adjusted for your system:
  19. echo.
  20. echo set VSTOOLSROOT=C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools
  21. goto failed2
  22. :compilesettingsfound
  23. set VSTOOLSROOT=
  24. call .\compilesettings.bat
  25. if "%VSTOOLSROOT%"=="" goto compilesettingserror
  26. rem -------------------------------------------------------------------------
  27. set __VSCMD_ARG_NO_LOGO=1
  28. set VSCMD_SKIP_SENDTELEMETRY=1
  29. echo - Calling VsDevCmd.bat -arch=%1
  30. call "%VSTOOLSROOT%\VsDevCmd.bat" -arch=%1
  31. if errorlevel 1 goto exit
  32. echo.
  33. echo - Compiling IS7zDec.c
  34. cl.exe /c /O2 /GS- IS7zDec.c /FoIS7zDec-%1.obj
  35. if errorlevel 1 goto failed
  36. echo Success!
  37. goto exit
  38. :failed
  39. echo *** FAILED ***
  40. :failed2
  41. exit /b 1
  42. :exit