一、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/