compile.bat 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 the help file
  8. setlocal
  9. cd /d %~dp0
  10. if exist compilesettings.bat goto compilesettingsfound
  11. :compilesettingserror
  12. echo ISHelp\compilesettings.bat is missing or incomplete. It needs to be created
  13. echo with the following lines, adjusted for your system:
  14. echo.
  15. echo set HHCEXE=%%ProgramFiles%%\HTML Help Workshop\hhc.exe [Path to help compiler]
  16. goto failed2
  17. :compilesettingsfound
  18. set HHCEXE=
  19. call .\compilesettings.bat
  20. if "%HHCEXE%"=="" goto compilesettingserror
  21. rem -------------------------------------------------------------------------
  22. echo Synching dark files:
  23. echo.
  24. call synch-darkfiles.bat nopause
  25. if errorlevel 1 goto failed
  26. call :generate_help
  27. if errorlevel 1 goto failed
  28. call :generate_help -dark
  29. if errorlevel 1 goto failed
  30. del /q Staging-dark\topic_*.htm
  31. echo Success!
  32. exit /b 0
  33. :generate_help
  34. echo Generating help files using ISHelpGen:
  35. echo.
  36. ISHelpGen\ISHelpGen.exe . %1
  37. if errorlevel 1 exit /b 1
  38. echo.
  39. echo Running HTML Help Compiler (hhc.exe):
  40. echo.
  41. if exist Staging%1\isetup.chm del Staging%1\isetup.chm
  42. if exist Staging%1\isetup.chm exit /b 1
  43. "%HHCEXE%" Staging%1\hh_project.hhp
  44. if %errorlevel% neq 1 exit /b 1
  45. if not exist Staging%1\isetup.chm exit /b 1
  46. rem HHC leaves behind a temporary file each time it runs...
  47. if exist "%TEMP%\~hh*.tmp" del /q "%TEMP%\~hh*.tmp"
  48. copy Staging%1\isetup.chm ..\Files\ISetup%1.chm
  49. if not exist ..\Files\ISetup%1.chm exit /b 1
  50. exit /b 0
  51. :failed
  52. echo *** FAILED ***
  53. :failed2
  54. exit /b 1