doxygen: support 1.9.8

The current test environment is mainly based on Ubuntu
22.04 LTS and doxygen version is 1.9.1.
But when we switch to Ubuntu 24.04, the default Doxygen
version on Ubuntu 24.04 is 1.9.8.
The supported configuration and layout file formats
differ from those in 1.9.1 (Ubuntu 22.04).
In particular, the layout XML file format of 1.9.8 is
incompatible with the older format(1.9.1). Therefore,
to support Doxygen on Ubuntu 24.04, we need to load
different configuration and layout files. (The layout
file is specified using the LAYOUT_FILE parameter in
the configuration file.)

Solution: Provide corresponding configuration and layout
files for different Doxygen versions, distinguished by
the Doxygen version number.

Currently, only Doxygen versions 1.9.1 and above are supported.
If the doxygen version is >= 1.9.1 but < 1.9.8, the 1.9.1
configuration and layout are used by default. If the doxygen
version is >= 1.9.8, the 1.9.8 configuration and layout are used.

Only 1.9.1 and 1.9.8 have been tested, as these are the
default doxygen versions on Ubuntu 22.04 LTS and Ubuntu
24.04. Other versions have not been tested yet. If
necessary, we will change the configuration based on
the same approach in the future.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
This commit is contained in:
Chen Wang
2025-10-09 16:00:54 +08:00
committed by R b b666
parent cc72712173
commit d58958e397
6 changed files with 3184 additions and 5 deletions

View File

@@ -59,8 +59,8 @@ jobs:
shell: bash
run: |
cd documentation
doxygen Doxyfile
cat Doxyfile
doxygen Doxyfile.1.9.1
cat Doxyfile.1.9.1
- name: Upload static files as artifact
id: deployment

View File

@@ -773,7 +773,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
LAYOUT_FILE = DoxygenLayout.xml
LAYOUT_FILE = DoxygenLayout-1.9.1.xml
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
# the reference definitions. This must be a list of .bib files. The .bib

2846
documentation/Doxyfile.1.9.8 Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,265 @@
<?xml version="1.0" encoding="UTF-8"?>
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.9.8 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title="RT-Thread User Guide"/>
<tab type="pages" visible="yes" title="" intro=""/>
<tab type="topics" visible="yes" title="RT-Thread API Guide" intro="This manual describes the API usage of RT-Thread written in the C programming language."/>
<tab type="modules" visible="yes" title="" intro="">
<tab type="modulelist" visible="yes" title="" intro=""/>
<tab type="modulemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="concepts" visible="yes" title="">
</tab>
<tab type="interfaces" visible="yes" title="">
<tab type="interfacelist" visible="yes" title="" intro=""/>
<tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="interfacehierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classlist" visible="yes" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
<tab type="structs" visible="yes" title="">
<tab type="structlist" visible="yes" title="" intro=""/>
<tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/>
</tab>
<tab type="exceptions" visible="yes" title="">
<tab type="exceptionlist" visible="yes" title="" intro=""/>
<tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="exceptionhierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<includes visible="$SHOW_HEADERFILE"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="yes"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<services title=""/>
<interfaces title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="yes"/>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<concepts visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a concept page -->
<concept>
<briefdescription visible="yes"/>
<includes visible="$SHOW_HEADERFILE"/>
<definition visible="yes" title=""/>
<detaileddescription title=""/>
<authorsection visible="yes"/>
</concept>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="yes"/>
<includedbygraph visible="yes"/>
<sourcelink visible="yes"/>
<memberdecl>
<interfaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<structs visible="yes" title=""/>
<exceptions visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<concepts visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="yes"/>
<groupgraph visible="yes"/>
<memberdecl>
<nestedgroups visible="yes" title=""/>
<modules visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<concepts visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a C++20 module page -->
<module>
<briefdescription visible="yes"/>
<exportedmodules visible="yes"/>
<memberdecl>
<concepts visible="yes" title=""/>
<classes visible="yes" title=""/>
<enums title=""/>
<typedefs title=""/>
<functions title=""/>
<variables title=""/>
<membergroups title=""/>
</memberdecl>
<detaileddescription title=""/>
<memberdecl>
<files visible="yes"/>
</memberdecl>
</module>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>

View File

@@ -1,12 +1,80 @@
#!/bin/bash
# Convert version number to comparable numeric value
version_to_number() {
local version="$1"
local IFS='.'
local parts=($version)
# Ensure we have 3 parts
while [ ${#parts[@]} -lt 3 ]; do
parts+=(0)
done
# Extract X,Y,Z
local X=${parts[0]}
local Y=${parts[1]}
local Z=${parts[2]}
# Validate each part is a 1-2 digit number
if ! [[ "$X" =~ ^[0-9]{1,2}$ ]] || ! [[ "$Y" =~ ^[0-9]{1,2}$ ]] || ! [[ "$Z" =~ ^[0-9]{1,2}$ ]]; then
echo "Error: Invalid version format. Expected X.Y.Z where X/Y/Z are 1-2 digit numbers" >&2
return 1
fi
# Format each part as 2-digit numbers and concatenate
local number=$(printf "%02d%02d%02d" "$X" "$Y" "$Z")
# Remove leading zeros to avoid octal interpretation and return the value
echo $((10#$number))
return 0
}
RTT_PATH=$(realpath $(dirname $0)/..)
RTT_DOC_PATH=$RTT_PATH/documentation
rm -rf $RTT_DOC_PATH/html
cd $RTT_DOC_PATH
doxygen ./Doxyfile
doxygen_version=$(doxygen --version 2>/dev/null)
if [ -z "$doxygen_version" ]; then
echo "Error: doxygen command not found. Please ensure doxygen is installed." >&2
exit 1
fi
doxygen_version_number=$(version_to_number "$doxygen_version")
if [ $? -ne 0 ]; then
echo "Error: Failed to convert version to number!" >&2
exit 2
fi
if [ $doxygen_version_number -lt 10901 ]; then
echo "Error: Doxygen version must be at least 1.9.1. Current version is $doxygen_version." >&2
exit 1
fi
if [ $doxygen_version_number -eq 10901 ]; then
echo "Info: Doxygen version is 1.9.1" >&2
config_file="Doxyfile.1.9.1"
elif [ $doxygen_version_number -gt 10901 ] && [ $doxygen_version_number -lt 10908 ]; then
echo "Info: Doxygen version is greater than 1.9.1 but less than 1.9.8, Using configuration for 1.9.1." >&2
config_file="Doxyfile.1.9.1"
elif [ $doxygen_version_number -eq 10908 ]; then
echo "Info: Doxygen version is 1.9.8" >&2
config_file="Doxyfile.1.9.8"
elif [ $doxygen_version_number -gt 10908 ]; then
echo "Warning: Doxygen version is greater than 1.9.8. Using configuration for 1.9.8." >&2
config_file="Doxyfile.1.9.8"
fi
if [ ! -f "$config_file" ]; then
echo "Error: Configuration file $config_file does not exist." >&2
exit 3
fi
echo "Running doxygen $doxygen_version with $config_file..."
doxygen "$config_file"
if [ $? -ne 0 ]; then
echo ""
echo "OOPS: Something error/warning occurred during Doxygen building, please check it out!"
@@ -15,4 +83,4 @@ if [ $? -ne 0 ]; then
fi
pushd $RTT_DOC_PATH/html
python3 -m http.server
python3 -m http.server