forked from jrsoftware/issrc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile.bat
70 lines (54 loc) · 1.67 KB
/
compile.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@echo off
rem Inno Setup
rem Copyright (C) 1997-2024 Jordan Russell
rem Portions by Martijn Laan
rem For conditions of distribution and use, see LICENSE.TXT.
rem
rem Batch file to compile the help file
setlocal
cd /d %~dp0
if exist compilesettings.bat goto compilesettingsfound
:compilesettingserror
echo ISHelp\compilesettings.bat is missing or incomplete. It needs to be created
echo with the following lines, adjusted for your system:
echo.
echo set HHCEXE=%%ProgramFiles%%\HTML Help Workshop\hhc.exe [Path to help compiler]
goto failed2
:compilesettingsfound
set HHCEXE=
call .\compilesettings.bat
if "%HHCEXE%"=="" goto compilesettingserror
rem -------------------------------------------------------------------------
echo Synching dark files:
echo.
call synch-darkfiles.bat nopause
if errorlevel 1 goto failed
call :generate_help
if errorlevel 1 goto failed
call :generate_help -dark
if errorlevel 1 goto failed
del /q Staging-dark\topic_*.htm
echo Success!
exit /b 0
:generate_help
echo Generating help files using ISHelpGen:
echo.
ISHelpGen\ISHelpGen.exe . %1
if errorlevel 1 exit /b 1
echo.
echo Running HTML Help Compiler (hhc.exe):
echo.
if exist Staging%1\isetup.chm del Staging%1\isetup.chm
if exist Staging%1\isetup.chm exit /b 1
"%HHCEXE%" Staging%1\hh_project.hhp
if %errorlevel% neq 1 exit /b 1
if not exist Staging%1\isetup.chm exit /b 1
rem HHC leaves behind a temporary file each time it runs...
if exist "%TEMP%\~hh*.tmp" del /q "%TEMP%\~hh*.tmp"
copy Staging%1\isetup.chm ..\Files\ISetup%1.chm
if not exist ..\Files\ISetup%1.chm exit /b 1
exit /b 0
:failed
echo *** FAILED ***
:failed2
exit /b 1