X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0e5edf5486ad19e1bb135851924ae4791e3b5d2..704c084ad7e5778db9902abf9cae953832a6ec14:/docs/doxygen/regen.sh?ds=inline diff --git a/docs/doxygen/regen.sh b/docs/doxygen/regen.sh index b29e1a522b..1a5d7f067e 100755 --- a/docs/doxygen/regen.sh +++ b/docs/doxygen/regen.sh @@ -20,35 +20,91 @@ me=$(basename $0) path=${0%%/$me} # path from which the script has been launched current=$(pwd) cd $path -if [ "$WXWIDGETS" = "" ]; then - export WXWIDGETS=`cd ../.. && pwd` +if [[ -z "$WXWIDGETS" ]]; then + # Notice the use of -P to ensure we get the canonical path even if there + # are symlinks in the current path. This is important because Doxygen + # strips this string from the paths in the generated files textually and it + # wouldn't work if it contained symlinks. + WXWIDGETS=`cd ../.. && pwd -P` if [ "$OSTYPE" = "cygwin" ]; then - export WXWIDGETS=`cygpath -w $WXWIDGETS` + WXWIDGETS=`cygpath -w $WXWIDGETS` + fi + export WXWIDGETS +fi + +if [ "$DOXYGEN" = "" ]; then + DOXYGEN=doxygen +fi + +# Check that doxygen has the correct version as different versions of it are +# unfortunately not always (in fact, practically never) compatible. +# +# Still allow using incompatible version for some quick local testing if really +# needed and 1.8.2 can't be installed for whatever reason. +if [[ -z $WX_SKIP_DOXYGEN_VERSION_CHECK ]]; then + doxygen_version=`$DOXYGEN --version` + doxygen_version_required=1.8.2 + if [[ $doxygen_version != $doxygen_version_required ]]; then + echo "Doxygen version $doxygen_version is not supported." + echo "Please use Doxygen $doxygen_version_required or export WX_SKIP_DOXYGEN_VERSION_CHECK." + exit 1 fi fi # prepare folders for the cp commands below mkdir -p out/html # we need to copy files in this folder below -mkdir -p out/html/generic out/html/wxmsw out/html/wxgtk out/html/wxmac +mkdir -p out/html/generic # These are not automatically copied by Doxygen because they're not # used in doxygen documentation, only in our html footer and by our # custom aliases -cp images/powered-by-wxwidgets.png out/html -cp images/logo_*.png out/html -cp images/tab_*.gif out/html -cp images/wxmsw/*png out/html/wxmsw -cp images/wxmac/*png out/html/wxmac -cp images/wxgtk/*png out/html/wxgtk cp images/generic/*png out/html/generic -cp wxwidgets.js out/html -# which configuration should we use? -if [[ -z "$1" ]]; then - cfgfile="Doxyfile_all" -else - cfgfile="Doxyfile_$1" -fi +# Defaults for settings controlled by this script +export GENERATE_DOCSET="NO"; +export GENERATE_HTML="NO"; +export GENERATE_HTMLHELP="NO"; +export GENERATE_LATEX="NO"; +export GENERATE_QHP="NO"; +export GENERATE_XML="NO"; +export SEARCHENGINE="NO"; +export SERVER_BASED_SEARCH="NO"; + +# Which format should we generate during this run? +case "$1" in + all) # All *main* formats, not all formats, here for backwards compat. + export GENERATE_HTML="YES"; + export GENERATE_HTMLHELP="YES"; + export GENERATE_XML="YES"; + ;; + chm) + export GENERATE_HTML="YES"; + export GENERATE_HTMLHELP="YES"; + ;; + docset) + export GENERATE_DOCSET="YES"; + export GENERATE_HTML="YES"; + ;; + latex) + export GENERATE_LATEX="YES"; + ;; + php) # HTML, but with PHP Search Engine + export GENERATE_HTML="YES"; + export SEARCHENGINE="YES"; + export SERVER_BASED_SEARCH="YES"; + ;; + qch) + export GENERATE_HTML="YES"; + export GENERATE_QHP="YES"; + ;; + xml) + export GENERATE_XML="YES"; + ;; + *) # Default to HTML only + export GENERATE_HTML="YES"; + export SEARCHENGINE="YES"; + ;; +esac # # NOW RUN DOXYGEN @@ -57,7 +113,7 @@ fi # otherwise when generating the CHM file with Doxygen, those files are # not included! # -doxygen $cfgfile +$DOXYGEN Doxyfile if [[ "$1" = "qch" ]]; then # we need to add missing files to the .qhp @@ -115,11 +171,6 @@ if [[ "$1" = "docset" ]]; then XARDIR="http://docs.wxwidgets.org/docsets" XCODE_INSTALL=`sh xcode-select -print-path` - cp wxdocsettabs.css out/html/wxtabs.css - cp wxdocsetwidgets.css out/html/wxwidgets.css - cp img_downArrow.png out/html - cp background_navigation.png out/html - cd out/html DESTINATIONDIR=`pwd` @@ -134,7 +185,7 @@ if [[ "$1" = "docset" ]]; then defaults write $DESTINATIONDIR/$DOCSETNAME/Contents/Info DocSetFeedURL $ATOMDIR/$ATOM defaults write $DESTINATIONDIR/$DOCSETNAME/Contents/Info DocSetFallbackURL http://docs.wxwidgets.org defaults write $DESTINATIONDIR/$DOCSETNAME/Contents/Info DocSetDescription "API reference and conceptual documentation for wxWidgets 2.9" - defaults write $DESTINATIONDIR/$DOCSETNAME/Contents/Info NSHumanReadableCopyright "Copyright 1992-2011 wxWidgets team, Portions 1996 Artificial Intelligence Applications Institute" + defaults write $DESTINATIONDIR/$DOCSETNAME/Contents/Info NSHumanReadableCopyright "Copyright 1992-2012 wxWidgets team, Portions 1996 Artificial Intelligence Applications Institute" $XCODE_INSTALL/usr/bin/docsetutil package -atom $DESTINATIONDIR/$ATOM -download-url $XARDIR/$XAR -output $DESTINATIONDIR/$XAR $DESTINATIONDIR/$DOCSETNAME