]> SALOME platform Git repositories - tools/yacsgen.git/commitdiff
Salome HOME
Examples in sessionless mode. V9_9_0a1 V9_9_0a2 V9_9_0b1
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Wed, 9 Mar 2022 15:27:03 +0000 (16:27 +0100)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Wed, 9 Mar 2022 15:27:03 +0000 (16:27 +0100)
14 files changed:
Examples/README.txt
Examples/build.sh
Examples/calcium1/build.sh
Examples/calcium2/build.sh
Examples/context.py
Examples/cpp1/build.sh
Examples/cpp2/build.sh
Examples/exec.sh
Examples/fort1/build.sh
Examples/fort2/build.sh
Examples/pyth1/build.sh
Examples/pyth2/build.sh
Examples/salome_env_exec.sh [new file with mode: 0644]
Examples/types1/build.sh

index 415d0423da771655a6f6312205bc0bff71486be2..2b0183c71f309faf0d98118421d45c514948ac79 100644 (file)
@@ -1,7 +1,7 @@
 Here you find examples of use of YACSGEN for every type of component.
 
 In order to build and test the examples, you have to:
-- change the SALOME installation directory in exec.sh (SALOME_DIR)
+- change the SALOME installation directory in exec.sh (SALOME_APPLI_PATH)
 - run "build.sh"
 
 Every example contains a "build.sh" script which shows you how to build and
index b002ccd9e76ddb268c530ebd8885ef75f86b4bc3..858f90292fecd3c5f6f5970b475ea74f7c20292a 100755 (executable)
@@ -9,7 +9,7 @@ script_dir=`dirname $0`
 #set -e
 
 cd $script_dir
-
+$script_dir/clean.sh
 list_dirs="calcium1 calcium2 cpp1 cpp2 cppgui1 fort1 fort2 pydoc1 pygui1 pyth1 pyth2 types1"
 #" mpi1 parahxx1 hxx1"
 for dir in $list_dirs ; do
index f0eb4f5f152cc0a595eee38d79b183c54ae50b0f..324e6ae250ca56f2ab6858f369490665f7ec13b8 100755 (executable)
@@ -2,6 +2,4 @@
 ../exec.sh python components.py
 
 # test
-appli/salome -t
 appli/salome shell ../test_compo.py
-appli/salome killall
index f0eb4f5f152cc0a595eee38d79b183c54ae50b0f..324e6ae250ca56f2ab6858f369490665f7ec13b8 100755 (executable)
@@ -2,6 +2,4 @@
 ../exec.sh python components.py
 
 # test
-appli/salome -t
 appli/salome shell ../test_compo.py
-appli/salome killall
index ec4c15c89a24d183dbb5a9bde12db101f7af2563..3379628e8795b60f9a18f2f9d624982f39325f7f 100644 (file)
 
 import os,sys
 
-SALOME_ROOT=os.getenv("SALOME_DIR")
-SALOME_PACKAGES=os.getenv("SALOME_DIR")
-SALOME_PREREQ=os.path.join(SALOME_PACKAGES, "salome_prerequisites.sh")
-#SALOME_PREREQ=os.path.join(SALOME_ROOT, "salome_prerequisites_appli.sh")
+SALOME_ROOT=os.getenv("ROOT_SALOME_INSTALL")
+SALOME_PREREQ=os.path.join(SALOME_ROOT, "env.d", "envProducts.sh")
 
 KERNEL_ROOT_DIR=os.getenv("KERNEL_ROOT_DIR","")
 GUI_ROOT_DIR=os.getenv("GUI_ROOT_DIR","")
@@ -37,4 +35,6 @@ context={'update':1,
          "geom":GEOM_ROOT_DIR,
         }
 
-SYS_MODULES=[]
+sys.path.insert(0, SALOME_ROOT)
+import salome_common
+SYS_MODULES=salome_common.MODULES
index b3393d20d26fd072e793eb12fdcad7492cba8a35..643ad6db2b25cda2d9c01c81529f360cce8ee877 100755 (executable)
@@ -1,6 +1,4 @@
 ../exec.sh python components.py
 
 # test
-appli/salome -t
 appli/salome shell ../test_compo.py
-appli/salome killall
index fb9970b4ad131f8a6ece48c92f17b336dd7b27ef..48d171b1049b40db5530ce6cffb53886cfa7b125 100755 (executable)
@@ -2,6 +2,4 @@
 ../exec.sh make
 
 # test
-appli/salome -t
 appli/salome shell ../test_compo.py
-appli/salome killall
index 8a3d149ef6c2f6101a25b6c04124b577e751284b..b8d1ca13df0081ce62b6f31f0e3c56934c3990ad 100755 (executable)
@@ -2,14 +2,8 @@
 # execute a command within SALOME environment 
 
 com=$*
+SCRIPT_DIR=`dirname $0`
 
-# Modify to your SALOME installation
-export SALOME_DIR=__YACSGEN_INSTALL_PATH__
-export SALOME_PACKAGES=__YACSGEN_INSTALL_PATH__
-
-source $SALOME_PACKAGES/salome_prerequisites.sh
-source $SALOME_PACKAGES/salome_modules.sh
-
-echo execution: $com
-$com
-
+SALOME_APPLI_PATH=/home/I35256/salome/base/appli_DEV_package
+$SALOME_APPLI_PATH/salome shell -- bash $SCRIPT_DIR/salome_env_exec.sh $com
+exit $?
index f0eb4f5f152cc0a595eee38d79b183c54ae50b0f..324e6ae250ca56f2ab6858f369490665f7ec13b8 100755 (executable)
@@ -2,6 +2,4 @@
 ../exec.sh python components.py
 
 # test
-appli/salome -t
 appli/salome shell ../test_compo.py
-appli/salome killall
index fb9970b4ad131f8a6ece48c92f17b336dd7b27ef..48d171b1049b40db5530ce6cffb53886cfa7b125 100755 (executable)
@@ -2,6 +2,4 @@
 ../exec.sh make
 
 # test
-appli/salome -t
 appli/salome shell ../test_compo.py
-appli/salome killall
index b3393d20d26fd072e793eb12fdcad7492cba8a35..643ad6db2b25cda2d9c01c81529f360cce8ee877 100755 (executable)
@@ -1,6 +1,4 @@
 ../exec.sh python components.py
 
 # test
-appli/salome -t
 appli/salome shell ../test_compo.py
-appli/salome killall
index b3393d20d26fd072e793eb12fdcad7492cba8a35..643ad6db2b25cda2d9c01c81529f360cce8ee877 100755 (executable)
@@ -1,6 +1,4 @@
 ../exec.sh python components.py
 
 # test
-appli/salome -t
 appli/salome shell ../test_compo.py
-appli/salome killall
diff --git a/Examples/salome_env_exec.sh b/Examples/salome_env_exec.sh
new file mode 100644 (file)
index 0000000..cae5d14
--- /dev/null
@@ -0,0 +1,4 @@
+com=$*
+
+source $ROOT_SALOME/salome_modules.sh
+$com
index b3393d20d26fd072e793eb12fdcad7492cba8a35..643ad6db2b25cda2d9c01c81529f360cce8ee877 100755 (executable)
@@ -1,6 +1,4 @@
 ../exec.sh python components.py
 
 # test
-appli/salome -t
 appli/salome shell ../test_compo.py
-appli/salome killall