=====================
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
Or without environment call:
- linux_run.sh
+ linux_run.sh
Compilation on Windows:
+#!/bin/bash
# Find absolute path to ROOT_DIR
export 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&
+#!/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
--- /dev/null
+#!/bin/bash
+
+eclipse.sh d6
--- /dev/null
+#!/bin/bash
+
+eclipse.sh d8
+++ /dev/null
-
-# 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&
--- /dev/null
+#!/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
-#!/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
##
#------ 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}
-#!/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
--- /dev/null
+#!/bin/bash
+
+linux_run.sh centos
--- /dev/null
+#!/bin/bash
+
+linux_run.sh d6
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}
+#!/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
--- /dev/null
+#!/bin/bash
+
+make.sh d6
+++ /dev/null
-
-# 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
--- /dev/null
+#!/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
-#!/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"
--- /dev/null
+#!/bin/bash
+
+salome_kill.sh centos
--- /dev/null
+#!/bin/bash
+
+salome_kill.sh d6
-#!/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
--- /dev/null
+#!/bin/bash
+
+salome_run.sh centos
--- /dev/null
+#!/bin/bash
+
+salome_run.sh d6