3 setlocal enabledelayedexpansion
7 set docbook_inputfile=JP\Index.xml
8 set docbook_use_stylesheet=JP\xsl\htmlhelp.xsl
9 set docbook_outputdir=htmlhelp
10 set docbook_outputdir_final=%docbook_build_path%\%docbook_outputdir%
12 if not exist "%docbook_outputdir%" mkdir "%docbook_outputdir%"
13 if not exist "%docbook_outputdir_final%" mkdir "%docbook_outputdir_final%"
16 if exist "%docbook_outputdir_final%\WinMergeJapanese.chm" (
17 copy "%docbook_outputdir_final%\WinMergeJapanese.chm" JP\WinMergeJapanese.chm 2> NUL > NUL
19 for /f "tokens=*" %%i in ('dir /a:-d /b /o:d /t:w JP') do set NEWEST=%%~nxi
20 del JP\WinMergeJapanese.chm 2> NUL
21 if "!NEWEST!" == "WinMergeJapanese.chm" goto end
22 ) else if "%1" == "/clean" (
23 del "%docbook_outputdir_final%\WinMergeJapanese.chm"
28 if not exist "%docbook_outputdir%\images" mkdir "%docbook_outputdir%\images"
29 copy "Shared\images\*.gif" "%docbook_outputdir%\images\."
30 copy "Shared\images\*.png" "%docbook_outputdir%\images\."
32 echo Copy screenshots...
33 if not exist "%docbook_outputdir%\screenshots" mkdir "%docbook_outputdir%\screenshots"
34 copy "JP\screenshots\*.*" "%docbook_outputdir%\screenshots\."
36 echo Copy stylesheets...
37 if not exist "%docbook_outputdir%\css" mkdir "%docbook_outputdir%\css"
38 copy "Shared\css\*.css" "%docbook_outputdir%\css\."
40 echo Create HTML files...
41 %docbook_xsltproc% --xinclude --nonet --stringparam base.dir %docbook_outputdir%/ --path .. %docbook_use_stylesheet% %docbook_inputfile%
42 if exist "htmlhelp.hhp" goto compile
45 echo Compile HTML Help...
46 Tools\SBAppLocale.exe 1041 %docbook_hhc_exe% "htmlhelp.hhp"
47 move "htmlhelp.chm" "%docbook_outputdir_final%\WinMergeJapanese.chm"
51 del "%docbook_outputdir%\*.html"
55 rd /S /Q "%docbook_outputdir%\images"
56 rd /S /Q "%docbook_outputdir%\screenshots"
57 rd /S /Q "%docbook_outputdir%\css"
58 if not "%docbook_build_path%" == "." rd /S /Q "%docbook_outputdir%"
68 setlocal disabledelayedexpansion