X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b15e29d69c4c6f767dc82cf99c158adfa7fe067f..704c084ad7e5778db9902abf9cae953832a6ec14:/docs/doxygen/regen.sh?ds=sidebyside diff --git a/docs/doxygen/regen.sh b/docs/doxygen/regen.sh index b0a0bb42ff..1a5d7f067e 100755 --- a/docs/doxygen/regen.sh +++ b/docs/doxygen/regen.sh @@ -21,14 +21,11 @@ path=${0%%/$me} # path from which the script has been launched current=$(pwd) cd $path if [[ -z "$WXWIDGETS" ]]; then - WXWIDGETS=`cd ../.. && pwd` - # Use the real path in case it's a symlink - if command -v readlink; then - normalized=`readlink -e $WXWIDGETS` - if [[ -n $normalized ]]; then - WXWIDGETS=$normalized - fi - fi + # 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 WXWIDGETS=`cygpath -w $WXWIDGETS` fi @@ -39,6 +36,21 @@ 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