From 88e4e49663f3692b1d4f0f698f0e10c6ca06eef2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 29 Oct 2013 12:17:30 +0000 Subject: [PATCH] Check for dot being available when building HTML documentation. This helps with ensuring that the generated CHM always has the inheritance diagrams as by default Doxygen creates it successfully even if dot is not found -- but without any graphs. Closes #15620. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/doxygen/regen.bat | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/docs/doxygen/regen.bat b/docs/doxygen/regen.bat index 57550b5242..4d23ea5472 100644 --- a/docs/doxygen/regen.bat +++ b/docs/doxygen/regen.bat @@ -66,6 +66,23 @@ IF "%1" == "all" ( ) ) +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 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 @@ -74,4 +91,15 @@ REM otherwise when generating the CHM file with Doxygen, those files are REM not included! REM set PATH=%PATH%;%HHC_PATH% -doxygen Doxyfile +rem doxygen Doxyfile + +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. + ) +)