一、PCL Tutorial是使用SPHINX编译而成的。html
二、安装Python2.7,从官方网站上下载(Portable Python测试未成功,待研究)。python
三、安装setuptools,安装成功会在Scripts目录下找到easy_install.exe。测试
四、安装pyparsing和doxylink:网站
easy_install pyparsing==1.5.7(必须指定版本,由于pyparsing2.0与Python2.7不兼容)。ui
easy_install -U sphinxcontrib-doxylink命令行
不然编译时会出现以下错误:code
Running Sphinx v1.0.1 htm
Extension error:
Could not import extension sphinxcontrib.doxylink.doxylink blog
四、安装Sphinx,在命令行下执行:ip
easy_install -U Sphinx。
五、在Tutorial目录下创建文本文件FindSphinx.cmake,文件内容为:
find_program(SPHINX_EXECUTABLE NAMES sphinx-build
HINTS
$ENV{SPHINX_DIR}
PATH_SUFFIXES bin\r\n DOC "Sphinx documentation generator"
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Sphinx DEFAULT_MSG\r\n SPHINX_EXECUTABLE
)
mark_as_advanced(
SPHINX_EXECUTABLE
)
六、使用CMAKE,并将其Where the source code目录指向Tutorial目录。
确保变量SPHINX_EXECUTABLE指向sphinx-build.exe位置。
确保Sphinx_DIR目录指向Tutoril目录(FindSphinx.cmake所在目录)。
七、Configure成功后,单击Generate,生成工程文件。
八、在Visual Studio中编译。
九、编译成chm文件。
遗留问题:
公式不能正确显示,待解决。
http://sphinx-doc.org/ext/math.html#module-sphinx.ext.pngmath
参考连接:
http://ericscottbarr.com/blog/category/sphinx/
http://help.openerp.com/question/6876/installation-issue-pyparsing-200/