From 8dc1a2eea70e8332e351cba4e4233afba219c672 Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Wed, 27 Mar 2019 14:23:24 +0100 Subject: [PATCH] Fix ADAO documentation, resources and prefs install --- doc/en/CMakeLists.txt | 35 +++++++++++------------------------ doc/fr/CMakeLists.txt | 35 +++++++++++------------------------ resources/CMakeLists.txt | 12 +++++++++++- src/daEficas/prefs_ADAO.py.in | 2 +- src/daSalome/CMakeLists.txt | 3 ++- 5 files changed, 36 insertions(+), 51 deletions(-) diff --git a/doc/en/CMakeLists.txt b/doc/en/CMakeLists.txt index ba75343..e42673a 100644 --- a/doc/en/CMakeLists.txt +++ b/doc/en/CMakeLists.txt @@ -16,31 +16,18 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# Author: Anthony Geay, anthony.geay@edf.fr, EDF R&D +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D -set(DOCLANG en) -set(DOC_DESTINATION "share/doc/gui/ADAO/${DOCLANG}") +set(DOC_LANG en) +set(DOC_DESTINATION "share/doc/gui/ADAO") -file(GLOB_RECURSE BEAUTIFUL_PNGS "${CMAKE_SOURCE_DIR}/doc/${DOCLANG}/*.png") -install(FILES ${BEAUTIFUL_PNGS} DESTINATION ${ADAO_RES}) -file(COPY conf.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -file(COPY ${CMAKE_SOURCE_DIR}/bin/module_version.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -file(GLOB_RECURSE RST_FILES "${CMAKE_SOURCE_DIR}/doc/${DOCLANG}/*.rst") -file(COPY ${RST_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -file(COPY resources snippets images DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +file(COPY ../${DOC_LANG} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +file(COPY ${CMAKE_SOURCE_DIR}/bin/module_version.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${DOC_LANG}) -set(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees -D latex_paper_size=a4 ${CMAKE_CURRENT_BINARY_DIR} html) -SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${CMAKE_CURRENT_BINARY_DIR}) # for module_version.py for conf.py for sphinx -SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cmd_options}") -add_custom_target(en_tutorial_doc COMMAND ${_cmd}) -install(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target en_tutorial_doc)") +set(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR}/${DOC_LANG} -b html -d doctrees ${CMAKE_CURRENT_BINARY_DIR}/${DOC_LANG} html/${DOC_LANG}) +SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${CMAKE_CURRENT_BINARY_DIR}/${DOC_LANG}/${DOC_LANG}) # for module_version.py for conf.py for sphinx +SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cmd_options}") +add_custom_target(${DOC_LANG}_doc COMMAND ${_cmd}) +install(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target ${DOC_LANG}_doc)") -file(GLOB_RECURSE BEAUTIFUL_PNGS2 "${CMAKE_SOURCE_DIR}/doc/${DOCLANG}/images/*.png") -INSTALL(CODE "file(GLOB BEAUTIFUL_HTML \"${CMAKE_CURRENT_BINARY_DIR}/html/*.html\") -file(COPY \${BEAUTIFUL_HTML} DESTINATION ${CMAKE_INSTALL_PREFIX}/${DOC_DESTINATION})") -install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/_static" DESTINATION ${DOC_DESTINATION}) -install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/snippets" DESTINATION ${DOC_DESTINATION}) -install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/_sources" DESTINATION ${DOC_DESTINATION}) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/html/searchindex.js" DESTINATION ${DOC_DESTINATION}) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/html/objects.inv" DESTINATION ${DOC_DESTINATION}) -install(FILES ${BEAUTIFUL_PNGS2} DESTINATION ${DOC_DESTINATION}/_images) +install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/${DOC_LANG}" DESTINATION ${DOC_DESTINATION}) diff --git a/doc/fr/CMakeLists.txt b/doc/fr/CMakeLists.txt index 06adef6..74f897b 100644 --- a/doc/fr/CMakeLists.txt +++ b/doc/fr/CMakeLists.txt @@ -16,31 +16,18 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# Author: Anthony Geay, anthony.geay@edf.fr, EDF R&D +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D -set(DOCLANG fr) -set(DOC_DESTINATION "share/doc/gui/ADAO/${DOCLANG}") +set(DOC_LANG fr) +set(DOC_DESTINATION "share/doc/gui/ADAO") -file(GLOB_RECURSE BEAUTIFUL_PNGS "${CMAKE_SOURCE_DIR}/doc/${DOCLANG}/*.png") -install(FILES ${BEAUTIFUL_PNGS} DESTINATION ${ADAO_RES}) -file(COPY conf.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -file(COPY ${CMAKE_SOURCE_DIR}/bin/module_version.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -file(GLOB_RECURSE RST_FILES "${CMAKE_SOURCE_DIR}/doc/${DOCLANG}/*.rst") -file(COPY ${RST_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -file(COPY resources snippets images DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +file(COPY ../${DOC_LANG} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +file(COPY ${CMAKE_SOURCE_DIR}/bin/module_version.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${DOC_LANG}) -set(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees -D latex_paper_size=a4 ${CMAKE_CURRENT_BINARY_DIR} html) -SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${CMAKE_CURRENT_BINARY_DIR}) # for module_version.py for conf.py for sphinx -SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cmd_options}") -add_custom_target(fr_tutorial_doc COMMAND ${_cmd}) -install(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target fr_tutorial_doc)") +set(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR}/${DOC_LANG} -b html -d doctrees ${CMAKE_CURRENT_BINARY_DIR}/${DOC_LANG} html/${DOC_LANG}) +SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${CMAKE_CURRENT_BINARY_DIR}/${DOC_LANG}/${DOC_LANG}) # for module_version.py for conf.py for sphinx +SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cmd_options}") +add_custom_target(${DOC_LANG}_doc COMMAND ${_cmd}) +install(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target ${DOC_LANG}_doc)") -file(GLOB_RECURSE BEAUTIFUL_PNGS2 "${CMAKE_SOURCE_DIR}/doc/${DOCLANG}/images/*.png") -INSTALL(CODE "file(GLOB BEAUTIFUL_HTML \"${CMAKE_CURRENT_BINARY_DIR}/html/*.html\") -file(COPY \${BEAUTIFUL_HTML} DESTINATION ${CMAKE_INSTALL_PREFIX}/${DOC_DESTINATION})") -install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/_static" DESTINATION ${DOC_DESTINATION}) -install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/snippets" DESTINATION ${DOC_DESTINATION}) -install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/_sources" DESTINATION ${DOC_DESTINATION}) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/html/searchindex.js" DESTINATION ${DOC_DESTINATION}) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/html/objects.inv" DESTINATION ${DOC_DESTINATION}) -install(FILES ${BEAUTIFUL_PNGS2} DESTINATION ${DOC_DESTINATION}/_images) +install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/${DOC_LANG}" DESTINATION ${DOC_DESTINATION}) diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt index 8b590ed..5f4feb2 100644 --- a/resources/CMakeLists.txt +++ b/resources/CMakeLists.txt @@ -16,10 +16,20 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# Author: Anthony Geay, anthony.geay@edf.fr, EDF R&D +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D if(ADAO_SALOME_MODULE) + install(FILES SalomeApp.xml ADAOCatalog.xml DESTINATION ${ADAO_RES_SALOME}) + else(ADAO_SALOME_MODULE) + install(FILES ADAOSchemaCatalog.xml DESTINATION ${ADAO_RES}) + file(GLOB_RECURSE BUTTONS1 "${CMAKE_SOURCE_DIR}/doc/fr/resources/*.png") + install(FILES ${BUTTONS1} DESTINATION ${ADAO_RES}) + file(GLOB_RECURSE BUTTONS2 "${CMAKE_SOURCE_DIR}/doc/fr/images/eficas*.png") + install(FILES ${BUTTONS2} DESTINATION ${ADAO_RES}) + file(GLOB_RECURSE BUTTONS3 "${CMAKE_SOURCE_DIR}/doc/en/images/eficas*.png") + install(FILES ${BUTTONS3} DESTINATION ${ADAO_RES}) + endif(ADAO_SALOME_MODULE) diff --git a/src/daEficas/prefs_ADAO.py.in b/src/daEficas/prefs_ADAO.py.in index 108d1b6..188d017 100644 --- a/src/daEficas/prefs_ADAO.py.in +++ b/src/daEficas/prefs_ADAO.py.in @@ -62,7 +62,7 @@ if sys.version.split()[0] < '3': # Indique la langue du catalogue utilisee pour les chaines d'aide : fr ou ang # lang = 'fr' # Traduction des labels de boutons ou autres -translatorFichier = os.environ["ADAO_ROOT_DIR"] + "/share/resources/adao/adao" # Ce nom sera complete par EFICAS avec _.qm +translatorFichier = os.environ["ADAO_ENGINE_ROOT_DIR"] + "/share/resources/adao/adao" # Ce nom sera complete par EFICAS avec _.qm # # Pilotage des sous-fenetres d'EFICAS closeAutreCommande = True diff --git a/src/daSalome/CMakeLists.txt b/src/daSalome/CMakeLists.txt index c7e8dbd..b76e30c 100644 --- a/src/daSalome/CMakeLists.txt +++ b/src/daSalome/CMakeLists.txt @@ -21,7 +21,8 @@ add_subdirectory(daGUI) if( NOT ADAO_SALOME_MODULE) + install(DIRECTORY daYacsSchemaCreator daYacsIntegration DESTINATION "${ADAO_SCRIPT_PYTHON}/adao") install(FILES __init__.py adaoBuilder.py DESTINATION "${ADAO_SCRIPT_PYTHON}/adao") -endif(ADAO_SALOME_MODULE) +endif(NOT ADAO_SALOME_MODULE) -- 2.39.2