From f6ce73bc9fabee28145cde13f16846c7c5c1dec0 Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 5 May 2014 18:32:58 +0400 Subject: [PATCH] Launch application in SALOME environment on Linux --- .gitignore | 4 +++- eclipse_salome.sh | 17 +++++++++++++++++ linux_env.sh | 5 ++++- salome_env.sh | 25 +++++++++++++++++++++++++ salome_run.sh | 12 ++++++++++++ 5 files changed, 61 insertions(+), 2 deletions(-) create mode 100755 eclipse_salome.sh create mode 100644 salome_env.sh create mode 100755 salome_run.sh diff --git a/.gitignore b/.gitignore index bffde48c5..25d046ae1 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,6 @@ resources doc/html *_log.txt start.bat -*.orig \ No newline at end of file +*.orig +*~ +/.project diff --git a/eclipse_salome.sh b/eclipse_salome.sh new file mode 100755 index 000000000..103982b80 --- /dev/null +++ b/eclipse_salome.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +source salome_env.sh + +mkdir -p ${ROOT_DIR}/build +cd ${ROOT_DIR}/build + +CMAKE_ARGS="-D_ECLIPSE_VERSION=4.3" +CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Debug" +CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=ON" +CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${ROOT_DIR}/install" +CMAKE_ARGS="${CMAKE_ARGS} ${SRC_DIR}" + + +cmake -G "Eclipse CDT4 - Unix Makefiles" ${CMAKE_ARGS} + +/misc/dn48/newgeom/common/eclipse-4.3.0/eclipse -Dosgi.locking=none & diff --git a/linux_env.sh b/linux_env.sh index 37ae41508..170f3bf3d 100644 --- a/linux_env.sh +++ b/linux_env.sh @@ -1,9 +1,12 @@ #------ Setting products installation directory ------ +if [ "${PDIR}" = "" ] ; then + export PDIR=/dn48/newgeom/common/products +fi + # Find absolute path to ROOT_DIR export ROOT_DIR=$(pwd)/.. export ROOT_DIR=`cd "${ROOT_DIR}";pwd` -export PDIR=/dn48/newgeom/common/products #------ Python ------ export PYTHON_ROOT_DIR=${PDIR}/Python-2.7.3 diff --git a/salome_env.sh b/salome_env.sh new file mode 100644 index 000000000..83ce4e2e6 --- /dev/null +++ b/salome_env.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +if [ "${INST_ROOT}" = "" ] ; then + source /dn47/SALOME/PRODUCTS/7x/opt/CentOS.6.3.64/7.3.0/env_products.sh + source /dn47/SALOME/stable/V7_3_0/start.sh +else + source ${INST_ROOT}/env_products.sh +fi + + +export ROOT_DIR=$(pwd)/.. +export ROOT_DIR=`cd "${ROOT_DIR}";pwd` + +SRC_DIR=${ROOT_DIR}/sources + +export LIB=${LD_LIBRARY_PATH} +export PATH=${CASROOT}:${PATH} +export PYTHON_INC_DIR=${PYTHON_INCLUDE} +export PYTHON_LIB_DIR=${PYTHON_ROOT_DIR}/lib + +#------ NewGEOM ------ +export INST_DIR=${ROOT_DIR}/install +export PATH=${INST_DIR}/bin:${INST_DIR}/plugins:${PATH} +export LD_LIBRARY_PATH=${INST_DIR}/bin:${INST_DIR}/swig:${INST_DIR}/plugins:${PATH}${LD_LIBRARY_PATH} +export NEW_GEOM_CONFIG_FILE=${INST_DIR}/plugins diff --git a/salome_run.sh b/salome_run.sh new file mode 100755 index 000000000..e4dc6bd95 --- /dev/null +++ b/salome_run.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +export ROOT_DIR=$(pwd)/.. + +source ${ROOT_DIR}/sources/salome_env.sh + +# Correcting path which defined with error +export LD_LIBRARY_PATH=${KERNEL_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH} + +export LightAppConfig=${ROOT_DIR}/install/share/salome/resources/newgeom:${GUI_ROOT_DIR}/share/salome/resources/gui + +SUITApp LightApp -style salome --modules=NewGeom --uselicense --noexcepthandling \ No newline at end of file -- 2.39.2