MySQL 源代码包含使用 Doxygen 编写的内部文档。生成的 Doxygen 内容可从 https://dev.mysql.com/doc/index-other.html 获取。还可以使用以下过程从 MySQL 源代码分发本地生成此内容:The MySQL source code contains internal documentation written using Doxygen. The generated Doxygen content is available at https://dev.mysql.com/doc/index-other.html. It is also possible to generate this content locally from a MySQL source distribution using the following procedure:
安装 doxygen 1.9.2 或更高版本。发行版可在 http://www.doxygen.nl/ 处获取。Install doxygen 1.9.2 or later. Distributions are available here at http://www.doxygen.nl/.
安装doxygen后,验证版本号:After installing doxygen, verify the version number:
$>
doxygen --version1.9.2在 Windows 上安装 PlantUML(在 Windows 10 上测试)时,您必须以管理员身份至少运行一次,以便它创建注册表项。打开管理员控制台并运行以下命令:When you install PlantUML on Windows (tested on Windows 10), you must run it at least once as administrator so it creates the registry keys. Open an administrator console and run this command:
$>
java -jarpath-to-plantuml.jar该命令应打开 GUI 窗口,并且在控制台上不返回任何错误。The command should open a GUI window and return no errors on the console.
将
PLANTUML_JAR_PATH环境设置为安装 PlantUML 的位置。例如:Set thePLANTUML_JAR_PATHenvironment to the location where you installed PlantUML. For example:$>
export PLANTUML_JAR_PATH=path-to-plantuml.jar安装 Graphviz dot 命令。Install the Graphviz dot command.
安装 Graphviz 后,验证 dot 可用性。例如:After installing Graphviz, verify dot availability. For example:
$>
which dot/usr/bin/dot $>dot -Vdot - graphviz version 2.40.1 (20161225.0304)将位置更改为 MySQL 源代码分发的顶级目录,然后执行以下操作:Change location to the top-level directory of your MySQL source distribution and do the following:
首先,执行 cmake:First, execute cmake:
$>
cd$>mysql-source-directorymkdir build$>cd build$>cmake ..接下来,生成 doxygen 文档:Next, generate the doxygen documentation:
$>
make doxygen检查错误日志,
doxyerror.log日志可在顶层目录的文件中查看。假设构建成功执行,使用浏览器查看生成的输出。例如:Inspect the error log, which is available in thedoxyerror.logfile in the top-level directory. Assuming that the build executed successfully, view the generated output using a browser. For example:$>
firefox doxygen/html/index.html