From 34619ae1d417bfe431f5e2086730d9aa411f86a7 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Tue, 26 Mar 2019 14:12:33 +0100 Subject: [PATCH] remove salome in tool path --- CMakeLists.txt | 7 ++++--- bin/AdaoYacsSchemaCreator.py | 4 ++-- bin/qtEficas_adao_study.py.in | 2 +- doc/en/CMakeLists.txt | 2 +- doc/en/advanced.rst | 2 +- doc/fr/CMakeLists.txt | 2 +- doc/fr/advanced.rst | 2 +- examples/CMakeLists.txt | 4 ++-- examples/daSalome/test003_ADAO_JDC_using_scripts.comm.in | 2 +- examples/daSalome/test003_ADAO_JDC_using_scripts.py.in | 2 +- .../test003_bis_ADAO_JDC_using_user_data_init.comm.in | 2 +- .../test003_bis_ADAO_JDC_using_user_data_init.py.in | 2 +- examples/daSalome/test004_ADAO_JDC_using_scripts.comm.in | 2 +- examples/daSalome/test004_ADAO_JDC_using_scripts.py.in | 2 +- examples/daSalome/test005_ADAO_Operators.comm.in | 2 +- examples/daSalome/test005_ADAO_Operators.py.in | 2 +- examples/daSalome/test006_Observers.comm.in | 2 +- examples/daSalome/test006_Observers.py.in | 2 +- .../External_data_definition_by_scripts/ADAO_Case.comm.in | 2 +- .../External_data_definition_by_scripts/ADAO_Case.py.in | 2 +- resources/CMakeLists.txt | 2 +- resources/SalomeApp.xml | 6 +++--- src/daEficas/prefs_ADAO.py.in | 2 +- src/daSalome/daGUI/daGuiImpl/adaoCase.py | 2 +- src/daSalome/daYacsSchemaCreator/methods.py | 2 +- 25 files changed, 32 insertions(+), 31 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 68ff208..d1f2b5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,9 +40,10 @@ endif(NOT PYTHONINTERP_FOUND) set(ADAO_SCRIPT_PYTHON "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages") set(ADAO_SCRIPT_PYTHON_SALOME "${ADAO_SCRIPT_PYTHON}/salome") set(ADAO_LIB "lib/salome") -set(ADAO_RES "share/salome/resources/adao") -set(ADAO_BIN "bin/salome") -set(ADAO_BIN_TEST "bin/salome/test") +set(ADAO_RES "share/resources/adao") +set(ADAO_RES_SALOME "share/salome/resources/adao") +set(ADAO_BIN "bin") +set(ADAO_BIN_TEST "bin/test") set(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files") if(EXISTS ${CONFIGURATION_ROOT_DIR}) diff --git a/bin/AdaoYacsSchemaCreator.py b/bin/AdaoYacsSchemaCreator.py index 2a914d7..b22e594 100644 --- a/bin/AdaoYacsSchemaCreator.py +++ b/bin/AdaoYacsSchemaCreator.py @@ -31,8 +31,8 @@ logging.basicConfig(level=logging.WARNING, format='%(levelname)-8s %(message)s') logging.debug("-- Starting AdaoYacsSchemaCreator --") # Check some basics variables -if "ADAO_ROOT_DIR" not in os.environ: - logging.fatal("You have to define ADAO_ROOT_DIR") +if "ADAO_ENGINE_ROOT_DIR" not in os.environ: + logging.fatal("You have to define ADAO_ENGINE_ROOT_DIR") sys.exit(1) try: diff --git a/bin/qtEficas_adao_study.py.in b/bin/qtEficas_adao_study.py.in index c405979..6f97f41 100644 --- a/bin/qtEficas_adao_study.py.in +++ b/bin/qtEficas_adao_study.py.in @@ -30,7 +30,7 @@ import sys # Configuration de l'installation INSTALLDIR = "@EFICAS_DIR@" sys.path.insert(0,INSTALLDIR) -ADAO_INSTALL_DIR = "@PYTHON_SITE@/salome/adao/daEficas" +ADAO_INSTALL_DIR = "@PYTHON_SITE@/adao/daEficas" sys.path.insert(0,ADAO_INSTALL_DIR) # Configuration diff --git a/doc/en/CMakeLists.txt b/doc/en/CMakeLists.txt index 1a46962..ba75343 100644 --- a/doc/en/CMakeLists.txt +++ b/doc/en/CMakeLists.txt @@ -19,7 +19,7 @@ # Author: Anthony Geay, anthony.geay@edf.fr, EDF R&D set(DOCLANG en) -set(DOC_DESTINATION "share/doc/salome/gui/ADAO/${DOCLANG}") +set(DOC_DESTINATION "share/doc/gui/ADAO/${DOCLANG}") file(GLOB_RECURSE BEAUTIFUL_PNGS "${CMAKE_SOURCE_DIR}/doc/${DOCLANG}/*.png") install(FILES ${BEAUTIFUL_PNGS} DESTINATION ${ADAO_RES}) diff --git a/doc/en/advanced.rst b/doc/en/advanced.rst index d4e31fa..1a9adaf 100644 --- a/doc/en/advanced.rst +++ b/doc/en/advanced.rst @@ -120,7 +120,7 @@ following Shell script:: else SALOMEDIR="" $SALOMEDIR/salome start -k -t - $SALOMEDIR/salome shell -- "python $SALOMEDIR/bin/salome/AdaoYacsSchemaCreator.py $USERFILE.py $USERFILE.xml" + $SALOMEDIR/salome shell -- "python $SALOMEDIR/bin/AdaoYacsSchemaCreator.py $USERFILE.py $USERFILE.xml" $SALOMEDIR/salome shell -- "driver $USERFILE.xml" $SALOMEDIR/salome shell killSalome.py rm -f $USERFILE.xml diff --git a/doc/fr/CMakeLists.txt b/doc/fr/CMakeLists.txt index 5e8476e..06adef6 100644 --- a/doc/fr/CMakeLists.txt +++ b/doc/fr/CMakeLists.txt @@ -19,7 +19,7 @@ # Author: Anthony Geay, anthony.geay@edf.fr, EDF R&D set(DOCLANG fr) -set(DOC_DESTINATION "share/doc/salome/gui/ADAO/${DOCLANG}") +set(DOC_DESTINATION "share/doc/gui/ADAO/${DOCLANG}") file(GLOB_RECURSE BEAUTIFUL_PNGS "${CMAKE_SOURCE_DIR}/doc/${DOCLANG}/*.png") install(FILES ${BEAUTIFUL_PNGS} DESTINATION ${ADAO_RES}) diff --git a/doc/fr/advanced.rst b/doc/fr/advanced.rst index c3b056f..d61052f 100644 --- a/doc/fr/advanced.rst +++ b/doc/fr/advanced.rst @@ -126,7 +126,7 @@ SALOME>``, il suffit d'enregistrer le script de commandes Shell suivant:: else SALOMEDIR="" $SALOMEDIR/salome start -k -t - $SALOMEDIR/salome shell -- "python $SALOMEDIR/bin/salome/AdaoYacsSchemaCreator.py $USERFILE.py $USERFILE.xml" + $SALOMEDIR/salome shell -- "python $SALOMEDIR/bin/AdaoYacsSchemaCreator.py $USERFILE.py $USERFILE.xml" $SALOMEDIR/salome shell -- "driver $USERFILE.xml" $SALOMEDIR/salome shell killSalome.py rm -f $USERFILE.xml diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index efa70f4..9644429 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -64,7 +64,7 @@ set(EXAMPLES_FILES_TO_INSTALL daSalome/test010_ADAO_Simple_AdjointTest.py ) -install(FILES ${EXAMPLES_FILES_TO_INSTALL} DESTINATION "share/salome/adao_examples/daSalome") +install(FILES ${EXAMPLES_FILES_TO_INSTALL} DESTINATION "share/adao_examples/daSalome") SALOME_CONFIGURE_FILE(daSkeletons/External_data_definition_by_scripts/ADAO_Case.comm.in ADAO_Case.comm) @@ -81,4 +81,4 @@ set(SKELETON_FILES_TO_INSTALL daSkeletons/External_data_definition_by_scripts/Script_Observation_yo.py ) -install(FILES ${SKELETON_FILES_TO_INSTALL} DESTINATION "share/salome/adao_examples/daSkeletons/External_data_definition_by_scripts") +install(FILES ${SKELETON_FILES_TO_INSTALL} DESTINATION "share/adao_examples/daSkeletons/External_data_definition_by_scripts") diff --git a/examples/daSalome/test003_ADAO_JDC_using_scripts.comm.in b/examples/daSalome/test003_ADAO_JDC_using_scripts.comm.in index 6aa7185..7ab0c5a 100644 --- a/examples/daSalome/test003_ADAO_JDC_using_scripts.comm.in +++ b/examples/daSalome/test003_ADAO_JDC_using_scripts.comm.in @@ -1,6 +1,6 @@ ASSIMILATION_STUDY(StudyName='Test', - StudyRepertory='@prefix@/share/salome/adao_examples/daSalome', + StudyRepertory='@prefix@/share/adao_examples/daSalome', AlgorithmParameters=_F(Algorithm='3DVAR',), Background=_F(INPUT_TYPE='Vector', data=_F(FROM='Script', diff --git a/examples/daSalome/test003_ADAO_JDC_using_scripts.py.in b/examples/daSalome/test003_ADAO_JDC_using_scripts.py.in index 76ec3aa..09792ad 100644 --- a/examples/daSalome/test003_ADAO_JDC_using_scripts.py.in +++ b/examples/daSalome/test003_ADAO_JDC_using_scripts.py.in @@ -37,7 +37,7 @@ outputvariables_config = {} outputvariables_config['Order'] = ['adao_default'] outputvariables_config['adao_default'] = -1 study_config['OutputVariables'] = outputvariables_config -study_config['Repertory'] = '@prefix@/share/salome/adao_examples/daSalome' +study_config['Repertory'] = '@prefix@/share/adao_examples/daSalome' Analysis_config = {} Analysis_config['From'] = 'String' Analysis_config['Data'] = """import numpy diff --git a/examples/daSalome/test003_bis_ADAO_JDC_using_user_data_init.comm.in b/examples/daSalome/test003_bis_ADAO_JDC_using_user_data_init.comm.in index 04e4f70..e6fa6fb 100644 --- a/examples/daSalome/test003_bis_ADAO_JDC_using_user_data_init.comm.in +++ b/examples/daSalome/test003_bis_ADAO_JDC_using_user_data_init.comm.in @@ -1,6 +1,6 @@ ASSIMILATION_STUDY(StudyName='Test', - StudyRepertory='@prefix@/share/salome/adao_examples/daSalome', + StudyRepertory='@prefix@/share/adao_examples/daSalome', AlgorithmParameters=_F(Algorithm='3DVAR',), Background=_F(INPUT_TYPE='Vector', data=_F(FROM='Script', diff --git a/examples/daSalome/test003_bis_ADAO_JDC_using_user_data_init.py.in b/examples/daSalome/test003_bis_ADAO_JDC_using_user_data_init.py.in index ee7b68f..803a1bf 100644 --- a/examples/daSalome/test003_bis_ADAO_JDC_using_user_data_init.py.in +++ b/examples/daSalome/test003_bis_ADAO_JDC_using_user_data_init.py.in @@ -37,7 +37,7 @@ outputvariables_config = {} outputvariables_config['Order'] = ['adao_default'] outputvariables_config['adao_default'] = -1 study_config['OutputVariables'] = outputvariables_config -study_config['Repertory'] = '@prefix@/share/salome/adao_examples/daSalome' +study_config['Repertory'] = '@prefix@/share/adao_examples/daSalome' Analysis_config = {} Analysis_config['From'] = 'String' Analysis_config['Data'] = """import numpy diff --git a/examples/daSalome/test004_ADAO_JDC_using_scripts.comm.in b/examples/daSalome/test004_ADAO_JDC_using_scripts.comm.in index d439370..761c96b 100644 --- a/examples/daSalome/test004_ADAO_JDC_using_scripts.comm.in +++ b/examples/daSalome/test004_ADAO_JDC_using_scripts.comm.in @@ -1,6 +1,6 @@ ASSIMILATION_STUDY(StudyName='Test', - StudyRepertory='@prefix@/share/salome/adao_examples/daSalome', + StudyRepertory='@prefix@/share/adao_examples/daSalome', AlgorithmParameters=_F(Algorithm='Blue',), Background=_F(INPUT_TYPE='Vector', data=_F(FROM='Script', diff --git a/examples/daSalome/test004_ADAO_JDC_using_scripts.py.in b/examples/daSalome/test004_ADAO_JDC_using_scripts.py.in index e164ff8..6d3dcd9 100644 --- a/examples/daSalome/test004_ADAO_JDC_using_scripts.py.in +++ b/examples/daSalome/test004_ADAO_JDC_using_scripts.py.in @@ -37,7 +37,7 @@ outputvariables_config = {} outputvariables_config['Order'] = ['adao_default'] outputvariables_config['adao_default'] = -1 study_config['OutputVariables'] = outputvariables_config -study_config['Repertory'] = '@prefix@/share/salome/adao_examples/daSalome' +study_config['Repertory'] = '@prefix@/share/adao_examples/daSalome' Analysis_config = {} Analysis_config['From'] = 'String' Analysis_config['Data'] = """import numpy diff --git a/examples/daSalome/test005_ADAO_Operators.comm.in b/examples/daSalome/test005_ADAO_Operators.comm.in index 06b365c..45ceacb 100644 --- a/examples/daSalome/test005_ADAO_Operators.comm.in +++ b/examples/daSalome/test005_ADAO_Operators.comm.in @@ -1,6 +1,6 @@ ASSIMILATION_STUDY(StudyName='Test', - StudyRepertory='@prefix@/share/salome/adao_examples/daSalome', + StudyRepertory='@prefix@/share/adao_examples/daSalome', AlgorithmParameters=_F(Algorithm='3DVAR',), Background=_F(Stored=1, INPUT_TYPE='Vector', diff --git a/examples/daSalome/test005_ADAO_Operators.py.in b/examples/daSalome/test005_ADAO_Operators.py.in index abd80e7..641a755 100644 --- a/examples/daSalome/test005_ADAO_Operators.py.in +++ b/examples/daSalome/test005_ADAO_Operators.py.in @@ -47,7 +47,7 @@ outputvariables_config = {} outputvariables_config['Order'] = ['adao_default'] outputvariables_config['adao_default'] = -1 study_config['OutputVariables'] = outputvariables_config -study_config['Repertory'] = '@prefix@/share/salome/adao_examples/daSalome' +study_config['Repertory'] = '@prefix@/share/adao_examples/daSalome' Analysis_config = {} Analysis_config['From'] = 'String' Analysis_config['Data'] = """import numpy diff --git a/examples/daSalome/test006_Observers.comm.in b/examples/daSalome/test006_Observers.comm.in index cb97907..976f34b 100644 --- a/examples/daSalome/test006_Observers.comm.in +++ b/examples/daSalome/test006_Observers.comm.in @@ -1,6 +1,6 @@ ASSIMILATION_STUDY(StudyName='test_observers', - StudyRepertory='@prefix@/share/salome/adao_examples/daSalome', + StudyRepertory='@prefix@/share/adao_examples/daSalome', AlgorithmParameters=_F(Algorithm='3DVAR', Parameters='Dict', data=_F(FROM='Script', diff --git a/examples/daSalome/test006_Observers.py.in b/examples/daSalome/test006_Observers.py.in index fb7aaaf..b27603c 100644 --- a/examples/daSalome/test006_Observers.py.in +++ b/examples/daSalome/test006_Observers.py.in @@ -48,7 +48,7 @@ outputvariables_config = {} outputvariables_config['Order'] = ['adao_default'] outputvariables_config['adao_default'] = -1 study_config['OutputVariables'] = outputvariables_config -study_config['Repertory'] = '@prefix@/share/salome/adao_examples/daSalome' +study_config['Repertory'] = '@prefix@/share/adao_examples/daSalome' Analysis_config = {} Analysis_config['From'] = 'String' Analysis_config['Data'] = """import numpy diff --git a/examples/daSkeletons/External_data_definition_by_scripts/ADAO_Case.comm.in b/examples/daSkeletons/External_data_definition_by_scripts/ADAO_Case.comm.in index 0cb2e12..bc02c78 100644 --- a/examples/daSkeletons/External_data_definition_by_scripts/ADAO_Case.comm.in +++ b/examples/daSkeletons/External_data_definition_by_scripts/ADAO_Case.comm.in @@ -1,6 +1,6 @@ ASSIMILATION_STUDY(StudyName='ADAO skeleton case', - StudyRepertory='@prefix@/share/salome/adao_examples/daSkeletons/External_data_definition_by_scripts', + StudyRepertory='@prefix@/share/adao_examples/daSkeletons/External_data_definition_by_scripts', AlgorithmParameters=_F(Algorithm='3DVAR', Parameters='Dict', data=_F(FROM='Script', diff --git a/examples/daSkeletons/External_data_definition_by_scripts/ADAO_Case.py.in b/examples/daSkeletons/External_data_definition_by_scripts/ADAO_Case.py.in index 223111b..23d9445 100644 --- a/examples/daSkeletons/External_data_definition_by_scripts/ADAO_Case.py.in +++ b/examples/daSkeletons/External_data_definition_by_scripts/ADAO_Case.py.in @@ -52,7 +52,7 @@ outputvariables_config = {} outputvariables_config['Order'] = ['adao_default'] outputvariables_config['adao_default'] = -1 study_config['OutputVariables'] = outputvariables_config -study_config['Repertory'] = '@prefix@/share/salome/adao_examples/daSkeletons/External_data_definition_by_scripts' +study_config['Repertory'] = '@prefix@/share/adao_examples/daSkeletons/External_data_definition_by_scripts' Analysis_config = {} Analysis_config['From'] = 'Script' Analysis_config['Data'] = 'Script_UserPostAnalysis.py' diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt index 7961ad3..8b590ed 100644 --- a/resources/CMakeLists.txt +++ b/resources/CMakeLists.txt @@ -19,7 +19,7 @@ # Author: Anthony Geay, anthony.geay@edf.fr, EDF R&D if(ADAO_SALOME_MODULE) - install(FILES SalomeApp.xml ADAOCatalog.xml DESTINATION ${ADAO_RES}) + install(FILES SalomeApp.xml ADAOCatalog.xml DESTINATION ${ADAO_RES_SALOME}) else(ADAO_SALOME_MODULE) install(FILES ADAOSchemaCatalog.xml DESTINATION ${ADAO_RES}) endif(ADAO_SALOME_MODULE) diff --git a/resources/SalomeApp.xml b/resources/SalomeApp.xml index 9ec5610..f7c2917 100644 --- a/resources/SalomeApp.xml +++ b/resources/SalomeApp.xml @@ -32,10 +32,10 @@
- +
- - + +
diff --git a/src/daEficas/prefs_ADAO.py.in b/src/daEficas/prefs_ADAO.py.in index e52a33b..108d1b6 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/salome/resources/adao/adao" # Ce nom sera complete par EFICAS avec _.qm +translatorFichier = os.environ["ADAO_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/daGUI/daGuiImpl/adaoCase.py b/src/daSalome/daGUI/daGuiImpl/adaoCase.py index 82afbff..54c1f4f 100644 --- a/src/daSalome/daGUI/daGuiImpl/adaoCase.py +++ b/src/daSalome/daGUI/daGuiImpl/adaoCase.py @@ -87,7 +87,7 @@ class AdaoCase: return "Please add ADAO_ENGINE_ROOT_DIR to your environnement." adao_path = os.environ["ADAO_ENGINE_ROOT_DIR"] - adao_exe = adao_path + "/bin/salome/AdaoYacsSchemaCreator.py" + adao_exe = adao_path + "/bin/AdaoYacsSchemaCreator.py" args = ["python", adao_exe, filename, self.yacs_filename] p = subprocess.Popen(args) (stdoutdata, stderrdata) = p.communicate() diff --git a/src/daSalome/daYacsSchemaCreator/methods.py b/src/daSalome/daYacsSchemaCreator/methods.py index 09e79f6..b940789 100644 --- a/src/daSalome/daYacsSchemaCreator/methods.py +++ b/src/daSalome/daYacsSchemaCreator/methods.py @@ -56,7 +56,7 @@ def create_yacs_proc(study_config): l.registerProcCataLoader() runtime = pilot.getRuntime() try: - catalogAd = runtime.loadCatalog("proc", os.environ["ADAO_ENGINE_ROOT_DIR"] + "/share/salome/resources/adao/ADAOSchemaCatalog.xml") + catalogAd = runtime.loadCatalog("proc", os.environ["ADAO_ENGINE_ROOT_DIR"] + "/share/resources/adao/ADAOSchemaCatalog.xml") runtime.addCatalog(catalogAd) except: raise ValueError("Exception in loading ADAO YACS Schema catalog") -- 2.39.2