From 2521ed5259babaf415e86c5d21ce73d72f3fcbe9 Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 31 Aug 2018 17:00:47 +0300 Subject: [PATCH] Activate help system --- CMakeLists.txt | 2 +- doc/gui/CMakeLists.txt | 54 +++++++++++++++++++------------------- src/XGUI/XGUI_Workshop.cpp | 1 + 3 files changed, 29 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b6a431d9..dd2b1bdee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ ENDIF(WIN32) SET (SHAPER_Version 9.1.0RC1) SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeCommon" ${CMAKE_MODULE_PATH}) -OPTION(SHAPER_BUILD_DOC "Generate SHAPER documentation" OFF) +OPTION(SHAPER_BUILD_DOC "Generate SHAPER documentation" ON) INCLUDE(SalomeMacros) diff --git a/doc/gui/CMakeLists.txt b/doc/gui/CMakeLists.txt index 79e7b2d47..f66b3e2c8 100644 --- a/doc/gui/CMakeLists.txt +++ b/doc/gui/CMakeLists.txt @@ -26,30 +26,30 @@ CONFIGURE_FILE(${input} ${output}) #sphinx-build -b html -c doc -D latex_paper_size=a4 -d doc/doctree /dn23/PPGP/vsv/SALOME730/SOURCES/PPGP_SRC/doc doc/html -# INSTALL(CODE " -# EXECUTE_PROCESS( -# COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build_index.py ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} -# ) -# ") - - -# INSTALL(CODE " -# EXECUTE_PROCESS( -# COMMAND ${SPHINX_EXECUTABLE} -Q -b html -c ${CMAKE_CURRENT_BINARY_DIR} -d doctree ${CMAKE_CURRENT_BINARY_DIR} html -# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} -# )" -# ) - -# IF(${HAVE_SALOME}) - # INSTALL(CODE " - # EXECUTE_PROCESS( - # COMMAND ${PYTHON_EXECUTABLE} -c \"import shutil;shutil.rmtree('${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SHAPER', True);shutil.copytree('${CMAKE_CURRENT_BINARY_DIR}/html', '${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SHAPER')\" - # ) - # ") -# ELSE(${HAVE_SALOME}) - # INSTALL(CODE " - # EXECUTE_PROCESS( - # COMMAND ${PYTHON_EXECUTABLE} -c \"import shutil;shutil.rmtree('${CMAKE_INSTALL_PREFIX}/doc/gui', True);shutil.copytree('${CMAKE_CURRENT_BINARY_DIR}/html', '${CMAKE_INSTALL_PREFIX}/doc/gui')\" - # ) - # ") -# ENDIF(${HAVE_SALOME}) +INSTALL(CODE " +EXECUTE_PROCESS( +COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build_index.py ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} +) +") + + +INSTALL(CODE " +EXECUTE_PROCESS( +COMMAND ${SPHINX_EXECUTABLE} -Q -b html -c ${CMAKE_CURRENT_BINARY_DIR} -d doctree ${CMAKE_CURRENT_BINARY_DIR} html +WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +)" +) + +IF(${HAVE_SALOME}) + INSTALL(CODE " + EXECUTE_PROCESS( + COMMAND ${PYTHON_EXECUTABLE} -c \"import shutil;shutil.rmtree('${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SHAPER', True);shutil.copytree('${CMAKE_CURRENT_BINARY_DIR}/html', '${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SHAPER')\" + ) + ") +ELSE(${HAVE_SALOME}) + INSTALL(CODE " + EXECUTE_PROCESS( + COMMAND ${PYTHON_EXECUTABLE} -c \"import shutil;shutil.rmtree('${CMAKE_INSTALL_PREFIX}/doc/gui', True);shutil.copytree('${CMAKE_CURRENT_BINARY_DIR}/html', '${CMAKE_INSTALL_PREFIX}/doc/gui')\" + ) + ") +ENDIF(${HAVE_SALOME}) diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 27f496e32..a1ae91d19 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -596,6 +596,7 @@ void XGUI_Workshop::onHelpActionClicked() #endif QStringList aParams; aParams << aDocDir + aSep + aHelpPage; + QProcess::startDetached(aBrowserName, aParams); } } } -- 2.39.2