File: regen.bat

package info (click to toggle)
wxwidgets3.2 3.2.8%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 179,460 kB
  • sloc: cpp: 992,335; ansic: 102,143; makefile: 51,623; sh: 11,572; python: 5,590; perl: 1,563; php: 326; xml: 200; javascript: 181
file content (115 lines) | stat: -rw-r--r-- 3,223 bytes parent folder | download | duplicates (4)
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
@echo off

REM This batch script is used to regenerate the CHM doxygen version of the
REM wxWidgets manual.

where /q doxygen
if %ERRORLEVEL% neq 0 (
    echo Error: Doxygen was not found in your PATH.
    exit /b 1
)

if not exist out (mkdir out)
if not exist out\html (mkdir out\html)
if not exist out\html\generic (mkdir out\html\generic)

REM These not automatically copied by Doxygen because they're not
REM used in doxygen documentation, only in our html footer and by our
REM custom aliases
copy images\generic\*.png out\html\generic 2>&1 >NUL

pushd ..\..
set WXWIDGETS=%CD%
popd

REM SVG is not supported by CHM and we can't/don't need to use custom JS with it.
set HTML_HEADER=custom_header_simple.html
set DOT_IMAGE_FORMAT=png

REM Defaults for settings controlled by this script
set GENERATE_DOCSET=NO
set GENERATE_HTML=NO
set GENERATE_HTMLHELP=NO
set GENERATE_LATEX=NO
set GENERATE_QHP=NO
set GENERATE_XML=NO
set SEARCHENGINE=NO
set SERVER_BASED_SEARCH=NO

IF "%1" == "all" (
  set GENERATE_HTML=YES
  set GENERATE_HTMLHELP=YES
  set GENERATE_XML=YES
) ELSE (
  IF "%1" == "chm" (
    set GENERATE_HTML=YES
    set GENERATE_HTMLHELP=YES
  ) ELSE (
    IF "%1" == "docset" (
      set GENERATE_DOCSET=YES
      set GENERATE_HTML=YES
    ) ELSE (
      IF "%1" == "latex" (
        set GENERATE_LATEX=YES
      ) ELSE (
        IF "%1" == "php" (
          set GENERATE_HTML=YES
          set SEARCHENGINE=YES
          set SERVER_BASED_SEARCH=YES
        ) ELSE (
          IF "%1" == "qch" (
            set GENERATE_HTML=YES
            set GENERATE_QHP=YES
          ) ELSE (
            IF "%1" == "xml" (
              set GENERATE_XML=YES
            ) ELSE (
              REM Default to HTML format.
              set GENERATE_HTML=YES
              set SEARCHENGINE=YES
            )
          )
        )
      )
    )
  )
)

REM Check for Graphviz (its location should be in %PATH%).
REM
REM NB: Always do this check because it looks like errorlevel is not set
REM     when the test is done inside the IF block.
dot <NUL >NUL 2>&1
IF %GENERATE_HTML%==YES (
    IF NOT %errorlevel%==0 (
        IF %errorlevel%==9009 (
            echo Error: dot was not found in PATH, please install Graphviz!
        ) ELSE (
            echo Error: %errorlevel% error code when running dot, please check Graphviz installation.
        )

        EXIT /B
    )
)

REM
REM NOW RUN DOXYGEN
REM
REM NB: we do this _after_ copying the required files to the output folders
REM     otherwise when generating the CHM file with Doxygen, those files are
REM     not included!
REM
set PATH=%PATH%;%HHC_PATH%
doxygen Doxyfile
if %errorlevel% neq 0 exit /b %errorlevel%

REM Check that class inheritance diagram images are present for html/chm docs.
REM
REM NB: Set the file to check outside the IF block,
REM     otherwise the second check does not always pick its value.
set filetofind=out\html\classwx_app_console__inherit__graph.png
IF %GENERATE_HTML%==YES (
    IF NOT EXIST %~dp0%filetofind% (
        echo Warning: Class inheritance diagram images are missing, please check Graphviz installation.
    )
)