Welcome to mirror list, hosted at ThFree Co, Russian Federation.

buildhelp.cmd « wdshelp - github.com/windirstat/windirstat.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e05e69e462b7af2ee191111e45963c80a073db0a (plain)
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
@echo off
:: #######################################################################
:: ## Small NT script build all the HTML help files at once or clean them
:: ##
:: ## $Id$
:: #######################################################################
pushd .\
setlocal
for /f "tokens=*" %%j in ('cd') do @set CURRDIR=%%j
set HELPDIR=..\..\help
set ACTION=%1
set HELPPROJECT=windirstat.hhp

if /i {%ACTION%}=={BUILD} goto :buildhelp
if /i {%ACTION%}=={CLEAN} goto :cleanhelp
goto :wrongparam

:buildhelp
echo Building help files
:: Create the directory for help files
if not exist "%HELPDIR%" md "%HELPDIR%"
:: Tell the HTML Help Compiler to do its job
for /d %%i in (*) do @(
  if exist "%CURRDIR%\%%i\%HELPPROJECT%" echo. & echo .\%%i\%HELPPROJECT% & hhc "%CURRDIR%\%%i\%HELPPROJECT%" || cd .
)
:: Return
set errorlevel=0
goto :endofscript

:cleanhelp
echo Cleaning help files
:: Delete the HTML help files
for /f %%i in ('dir /b "%HELPDIR%\*.chm"') do @(
  echo.
  echo Deleting %%i
  del /f /q "%HELPDIR%\%%i"
)
del /f /q "%HELPDIR%\BuildLog.htm"
:: Return
set errorlevel=0
goto :endofscript

:wrongparam
:: Tell the developer something went wrong
echo Please check the parameters. Something is wrong, valid options are ^"build^" and ^"clean^"
set errorlevel=1

:endofscript
endlocal
popd