Salome HOME
Improve project generation files for linux
authorSergey POKHODENKO <sergey.pokhodenko@opencascade.com>
Fri, 8 May 2015 07:13:18 +0000 (10:13 +0300)
committerSergey POKHODENKO <sergey.pokhodenko@opencascade.com>
Thu, 28 May 2015 08:30:23 +0000 (11:30 +0300)
22 files changed:
README
eclipse.sh
eclipse_centos.sh
eclipse_d6.sh [new file with mode: 0755]
eclipse_d8.sh [new file with mode: 0755]
eclipse_debian.sh [deleted file]
launcher_env.sh [new file with mode: 0755]
linux_env.sh
linux_run.sh
linux_run_centos.sh [new file with mode: 0755]
linux_run_d6.sh [new file with mode: 0755]
make.sh
make_centos.sh
make_d6.sh [new file with mode: 0755]
make_debian.sh [deleted file]
salome_env.sh [new file with mode: 0644]
salome_kill.sh
salome_kill_centos.sh [new file with mode: 0755]
salome_kill_d6.sh [new file with mode: 0755]
salome_run.sh
salome_run_centos.sh [new file with mode: 0755]
salome_run_d6.sh [new file with mode: 0755]

diff --git a/README b/README
index 78408a1cdffb5440f401037fbc9c13e550ed4f39..3d1cd0ec8be2850c860e6ce29c6ce72d9ae9c6a8 100644 (file)
--- a/README
+++ b/README
@@ -5,7 +5,8 @@ Compilation on LINUX:
 =====================
 
   cd <sources_directory>
-  source linux_env.sh 
+  source salome_env.sh
+  source linux_env.sh
   cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=${ROOT_DIR}/install ${ROOT_DIR}/sources
   make
   make install
@@ -25,7 +26,7 @@ It will create a "build" and "install" folders. Environment is ready to launch a
 
 Or without environment call:
 
-  linux_run.sh 
+  linux_run.sh
 
 
 Compilation on Windows:
index 9ba180d69650a766ed3c632b3509333b988ed7e0..77e3e428f42ad6f646de1ba960e1c13b4c440bb5 100755 (executable)
@@ -1,3 +1,4 @@
+#!/bin/bash
 
 # Find absolute path to ROOT_DIR
 export ROOT_DIR=$(pwd)/..
@@ -5,21 +6,29 @@ export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
 
 SRC_DIR=${ROOT_DIR}/sources
 
-source ${SRC_DIR}/linux_env.sh
-mkdir -p ${ROOT_DIR}/build
-cd ${ROOT_DIR}/build
+BUILD_DIR=build
+INSTALL_DIR=install
+if [ $1 ]; then
+  BUILD_DIR=${BUILD_DIR}-$1
+  INSTALL_DIR=${INSTALL_DIR}-$1
+fi
+
+source ${SRC_DIR}/salome_env.sh
+source ${SRC_DIR}/linux_env.sh $1
+mkdir -p ${ROOT_DIR}/${BUILD_DIR}
+cd ${ROOT_DIR}/${BUILD_DIR}
 
 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
+export LightAppConfig=${ROOT_DIR}/${INSTALL_DIR}/share/salome/resources/newgeom:${GUI_ROOT_DIR}/share/salome/resources/gui
 
 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} -DCMAKE_INSTALL_PREFIX:PATH=${ROOT_DIR}/${INSTALL_DIR}"
 CMAKE_ARGS="${CMAKE_ARGS} -DPYTHON_EXECUTABLE=${PYTHONHOME}/bin/python"
 CMAKE_ARGS="${CMAKE_ARGS} -DUSE_TEST_COVERAGE=OFF"
 CMAKE_ARGS="${CMAKE_ARGS} ${SRC_DIR}"
 
 cmake -G "Eclipse CDT4 - Unix Makefiles" ${CMAKE_ARGS}
 
-/misc/dn48/newgeom/common/eclipse-4.4.0/eclipse&
+#/misc/dn48/newgeom/common/eclipse-4.4.0/eclipse&
index ea5e02a63195f41b46102b02c08708347b190026..af0926eb25d0377e71c411294ccdaf822fb7732a 100755 (executable)
@@ -1,25 +1,3 @@
+#!/bin/bash
 
-# Find absolute path to ROOT_DIR
-export ROOT_DIR=$(pwd)/..
-export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
-
-SRC_DIR=${ROOT_DIR}/sources
-
-source ${SRC_DIR}/linux_env.sh
-mkdir -p ${ROOT_DIR}/build-centos
-cd ${ROOT_DIR}/build-centos
-
-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
-
-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} -DPYTHON_EXECUTABLE=${PYTHONHOME}/bin/python"
-CMAKE_ARGS="${CMAKE_ARGS} -DUSE_TEST_COVERAGE=OFF"
-CMAKE_ARGS="${CMAKE_ARGS} ${SRC_DIR}"
-
-cmake -G "Eclipse CDT4 - Unix Makefiles" ${CMAKE_ARGS}
-
-/misc/dn48/newgeom/common/eclipse-4.4.0/eclipse&
+eclipse.sh centos
diff --git a/eclipse_d6.sh b/eclipse_d6.sh
new file mode 100755 (executable)
index 0000000..9c297f1
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+eclipse.sh d6
diff --git a/eclipse_d8.sh b/eclipse_d8.sh
new file mode 100755 (executable)
index 0000000..c61f556
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+eclipse.sh d8
diff --git a/eclipse_debian.sh b/eclipse_debian.sh
deleted file mode 100755 (executable)
index f7d456a..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-
-# Find absolute path to ROOT_DIR
-export ROOT_DIR=$(pwd)/..
-export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
-
-SRC_DIR=${ROOT_DIR}/sources
-
-export INST_ROOT=/misc/dn48/newgeom/common/SALOME-7.5.1_Debian-6.0
-source ${SRC_DIR}/linux_env.sh
-mkdir -p ${ROOT_DIR}/build-debian
-cd ${ROOT_DIR}/build-debian
-
-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
-
-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} -DPYTHON_EXECUTABLE=${PYTHONHOME}/bin/python"
-CMAKE_ARGS="${CMAKE_ARGS} -DUSE_TEST_COVERAGE=OFF"
-CMAKE_ARGS="${CMAKE_ARGS} ${SRC_DIR}"
-
-cmake -G "Eclipse CDT4 - Unix Makefiles" ${CMAKE_ARGS}
-
-/misc/dn48/newgeom/common/eclipse-4.4.0/eclipse&
diff --git a/launcher_env.sh b/launcher_env.sh
new file mode 100755 (executable)
index 0000000..34ed0c9
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# Find absolute path to ROOT_DIR
+export ROOT_DIR=$(pwd)/..
+export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
+
+PLATFORM="$(lsb_release -is)"
+RELEASE="$(lsb_release -rs)"
+if [ "${PLATFORM}" == "CentOS" ]; then PLATFORM=centos
+elif [ "${PLATFORM}" == "Debian" ]; then 
+  if [ "${RELEASE}" == "8.0" ]; then PLATFORM=d8
+  else PLATFORM=d6
+  fi
+fi
+
+SRC_DIR=${ROOT_DIR}/sources
+source ${SRC_DIR}/salome_env.sh
+source ${SRC_DIR}/linux_env.sh ${PLATFORM}
+
+BUILD_DIR=build
+INSTALL_DIR=install
+if [ ${PLATFORM} ]; then
+  BUILD_DIR=${BUILD_DIR}-${PLATFORM}
+  INSTALL_DIR=${INSTALL_DIR}-${PLATFORM}
+fi
+
+mkdir -p ${ROOT_DIR}/${BUILD_DIR}
+cd ${ROOT_DIR}/${BUILD_DIR}
+
+export LD_LIBRARY_PATH=${KERNEL_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH}
+export LightAppConfig=${ROOT_DIR}/${INSTALL_DIR}/share/salome/resources/newgeom:${GUI_ROOT_DIR}/share/salome/resources/gui
+
+if [ $@ ]; then
+  $@
+else
+  bash
+fi
index 917518588f89eeb68ecf2f2571975d97faa2d820..721071a373f2068216c62d7176fc176de8f3fbf4 100644 (file)
@@ -1,7 +1,9 @@
-#!/bin/sh
+#!/bin/bash
 
 if [ "${INST_ROOT}" = "" ] ; then
-    source /dn48/newgeom/common/SALOME/env_products.sh
+#    source /dn48/newgeom/common/SALOME/env_products.sh
+  echo "Error: INST_ROOT is not defined."
+  exit 1
 else
     source ${INST_ROOT}/env_products.sh
 fi
@@ -35,7 +37,10 @@ export PATH=${CASROOT}:${PATH}
 ##
 
 #------ NewGEOM ------
-export NEWGEOM_ROOT_DIR=${ROOT_DIR}/install
+INSTALL_DIR=install
+if [ $1 ]; then INSTALL_DIR=${INSTALL_DIR}-$1; fi
+
+export NEWGEOM_ROOT_DIR=${ROOT_DIR}/${INSTALL_DIR}
 export PATH=${NEWGEOM_ROOT_DIR}/bin:${NEWGEOM_ROOT_DIR}/plugins:${PATH}
 export PYTHONPATH=${NEWGEOM_ROOT_DIR}/swig:${NEWGEOM_ROOT_DIR}/plugins:${NEWGEOM_ROOT_DIR}/addons:${NEWGEOM_ROOT_DIR}/pythonAPI:${PYTHONPATH}
 export LD_LIBRARY_PATH=${NEWGEOM_ROOT_DIR}/bin:${NEWGEOM_ROOT_DIR}/swig:${NEWGEOM_ROOT_DIR}/plugins:${LD_LIBRARY_PATH}
index 79ed96720ba865965c80dcf5f205a8fd376f3adb..d6f768320f52594fe25fff7173d516794a991c24 100755 (executable)
@@ -1,11 +1,14 @@
-#!/bin/sh
+#!/bin/bash
 
 # Find absolute path to ROOT_DIR
 export ROOT_DIR=$(pwd)/..
 export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
 
 SRC_DIR=${ROOT_DIR}/sources
+source ${SRC_DIR}/salome_env.sh
+source ${SRC_DIR}/linux_env.sh $1
 
-source ${SRC_DIR}/linux_env.sh
+INSTALL_DIR=install
+if [ $1 ]; then INSTALL_DIR=${INSTALL_DIR}-$1; fi
 
-${ROOT_DIR}/install/bin/GeomApp
+${ROOT_DIR}/${INSTALL_DIR}/bin/GeomApp
diff --git a/linux_run_centos.sh b/linux_run_centos.sh
new file mode 100755 (executable)
index 0000000..15735a1
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+linux_run.sh centos
diff --git a/linux_run_d6.sh b/linux_run_d6.sh
new file mode 100755 (executable)
index 0000000..4655910
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+linux_run.sh d6
diff --git a/make.sh b/make.sh
index 98be4c4fb00dd1da07ee67fd455ea8035de8ea8d..009f372654b98747952a3e140851640f8e253882 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -6,12 +6,21 @@ export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
 
 SRC_DIR=${ROOT_DIR}/sources
 
-source ${SRC_DIR}/linux_env.sh
-mkdir -p ${ROOT_DIR}/build
-cd ${ROOT_DIR}/build
+BUILD_DIR=build
+INSTALL_DIR=install
+if [ $1 ]
+then
+  BUILD_DIR=${BUILD_DIR}-$1
+  INSTALL_DIR=${INSTALL_DIR}-$1
+fi
+
+source ${SRC_DIR}/salome_env.sh
+source ${SRC_DIR}/linux_env.sh $1
+mkdir -p ${ROOT_DIR}/${BUILD_DIR}
+cd ${ROOT_DIR}/${BUILD_DIR}
 
 CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Release"
-CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${ROOT_DIR}/install"
+CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${ROOT_DIR}/${INSTALL_DIR}"
 CMAKE_ARGS="${CMAKE_ARGS} ${SRC_DIR}"
 
 cmake -G "Unix Makefiles" ${CMAKE_ARGS}
index ef61abcce00baedbc0e58a9ca914ea71947d8272..f38c2c6f786a16b4b0029c652a157f619cfd6c66 100755 (executable)
@@ -1,18 +1,3 @@
+#!/bin/bash
 
-# Find absolute path to ROOT_DIR
-export ROOT_DIR=$(pwd)/..
-export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
-
-SRC_DIR=${ROOT_DIR}/sources
-
-source ${SRC_DIR}/linux_env.sh
-mkdir -p ${ROOT_DIR}/build
-cd ${ROOT_DIR}/build
-
-CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Release"
-CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${ROOT_DIR}/install"
-CMAKE_ARGS="${CMAKE_ARGS} ${SRC_DIR}"
-
-cmake -G "Unix Makefiles" ${CMAKE_ARGS}
-make
-make install
+make.sh centos
diff --git a/make_d6.sh b/make_d6.sh
new file mode 100755 (executable)
index 0000000..320139a
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+make.sh d6
diff --git a/make_debian.sh b/make_debian.sh
deleted file mode 100755 (executable)
index e2ce3a0..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-
-# Find absolute path to ROOT_DIR
-export ROOT_DIR=$(pwd)/..
-export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
-
-SRC_DIR=${ROOT_DIR}/sources
-
-export INST_ROOT=/misc/dn48/newgeom/common/SALOME-7.5.1_Debian-6.0
-source ${SRC_DIR}/linux_env.sh
-mkdir -p ${ROOT_DIR}/build-debian
-cd ${ROOT_DIR}/build-debian
-
-CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Release"
-CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${ROOT_DIR}/install"
-CMAKE_ARGS="${CMAKE_ARGS} ${SRC_DIR}"
-
-cmake -G "Unix Makefiles" ${CMAKE_ARGS}
-make
-make install
diff --git a/salome_env.sh b/salome_env.sh
new file mode 100644 (file)
index 0000000..a270f25
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+main() {
+  local platform="$(lsb_release -is)"
+  local release="$(lsb_release -rs)"
+  if [ "${platform}" == "CentOS" ]; then 
+    export INST_ROOT=/dn48/newgeom/common/SALOME-7.5.1_CentOS-6.3
+  elif [ "${platform}" == "Debian" ]; then
+    if   [[ ${release} =~ ^6 ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.5.1_Debian-6.0_SOURCES
+    elif [[ ${release} =~ ^8 ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.5.1_Debian-8.0_SOURCES
+    fi
+  fi
+}
+
+main
index 82360215bbf144ffeebf98bc0393c8e54e0d6bf2..da9b7eec65e60fce005205000ee21b696d58f9ad 100755 (executable)
@@ -1,13 +1,17 @@
-#!/bin/sh
+#!/bin/bash
 
 export ROOT_DIR=$(pwd)/..
 export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
 
+source ${ROOT_DIR}/sources/salome_env.sh
 source ${ROOT_DIR}/sources/linux_env.sh
 
+INSTALL_DIR=install
+if [ $1 ]; then INSTALL_DIR=${INSTALL_DIR}-$1; fi
+
 # Correcting path which defined with error
 export LD_LIBRARY_PATH=${KERNEL_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH}
-export SalomeAppConfig=${ROOT_DIR}/install/share/salome/resources/newgeom:${GUI_ROOT_DIR}/share/salome/resources/gui
+export SalomeAppConfig=${ROOT_DIR}/${INSTALL_DIR}/share/salome/resources/newgeom:${GUI_ROOT_DIR}/share/salome/resources/gui
 
 ${PYTHONBIN} "${KERNEL_ROOT_DIR}/bin/salome/envSalome.py"
 ${PYTHONBIN} "${KERNEL_ROOT_DIR}/bin/salome/killSalome.py"
diff --git a/salome_kill_centos.sh b/salome_kill_centos.sh
new file mode 100755 (executable)
index 0000000..ecc8dfc
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+salome_kill.sh centos
diff --git a/salome_kill_d6.sh b/salome_kill_d6.sh
new file mode 100755 (executable)
index 0000000..627a239
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+salome_kill.sh d6
index 78609177af1cff3586a7f2959390aced63849001..4eba166fb4876bdea07a02ff40f0987bfce246ed 100755 (executable)
@@ -1,13 +1,17 @@
-#!/bin/sh
+#!/bin/bash
 
 export ROOT_DIR=$(pwd)/..
 export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
 
-source ${ROOT_DIR}/sources/linux_env.sh
+source ${ROOT_DIR}/sources/salome_env.sh
+source ${ROOT_DIR}/sources/linux_env.sh $1
+
+INSTALL_DIR=install
+if [ $1 ]; then INSTALL_DIR=${INSTALL_DIR}-$1; fi
 
 # Correcting path which defined with error
 export LD_LIBRARY_PATH=${KERNEL_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH}
-export SalomeAppConfig=${ROOT_DIR}/install/share/salome/resources/newgeom:${GUI_ROOT_DIR}/share/salome/resources/gui
+export SalomeAppConfig=${ROOT_DIR}/${INSTALL_DIR}/share/salome/resources/newgeom:${GUI_ROOT_DIR}/share/salome/resources/gui
 
 ${PYTHONBIN} "${KERNEL_ROOT_DIR}/bin/salome/envSalome.py"
-${PYTHONBIN} "${KERNEL_ROOT_DIR}/bin/salome/runSalome.py"
+${PYTHONBIN} "${KERNEL_ROOT_DIR}/bin/salome/runSalome.py" noexcepthandler
diff --git a/salome_run_centos.sh b/salome_run_centos.sh
new file mode 100755 (executable)
index 0000000..fedf045
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+salome_run.sh centos
diff --git a/salome_run_d6.sh b/salome_run_d6.sh
new file mode 100755 (executable)
index 0000000..d00238f
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+salome_run.sh d6