From: spo Date: Wed, 18 Nov 2015 13:59:08 +0000 (+0300) Subject: Fix build standalone X-Git-Tag: V_2.0.0~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=097c824c946eba5d37f29713b69dab6b324fc1d2;p=modules%2Fshaper.git Fix build standalone --- diff --git a/config.sh b/config.sh index baf296275..88bfc7720 100755 --- a/config.sh +++ b/config.sh @@ -1,5 +1,20 @@ #!/bin/bash -ex +while [[ $# > 0 ]]; do + key="$1" + + case $key in + standalone|Standalone) + MODE=Standalone + shift + ;; + *) + shift + ;; + esac +done + + rm env_config.sh || echo "File env_config.sh was not found." echo "#!/bin/bash -ex" >> env_config.sh @@ -22,22 +37,52 @@ fi echo "export PLATFORM=${PLATFORM}" >> env_config.sh +include_products() { + local salome_version=$1 + local platform="$(lsb_release -is)" + local release="$(lsb_release -rs)" + if [[ ${salome_version} = '7.7.0' ]]; then + if [[ "${platform}" = 'CentOS' ]]; then export PRODUCTS_ROOT=/dn23/NEWGEOM/common/PRODUCTS/CentOS.6.3.64/7.7.0 + elif [[ "${platform}" = 'Debian' && ${release} =~ ^6 ]]; then export PRODUCTS_ROOT=/dn23/NEWGEOM/common/PRODUCTS/DEBIAN.6.0.64/7.7.0 + fi + else + echo "Could not find PRODUCTS for the platform ${platform} ${release}" + exit 1 + fi +} +include_products '7.7.0' + +include_suit() { + local salome_version=$1 + local platform="$(lsb_release -is)" + local release="$(lsb_release -rs)" + if [[ ${salome_version} = '7.7.0' ]]; then + if [[ "${platform}" = 'CentOS' ]]; then export SUIT_DIR=/dn46/SALOME/series7x/V7_7_0/CentOS63-64/GUI + elif [[ "${platform}" = 'Debian' && ${release} =~ ^6 ]]; then export SUIT_DIR=/dn46/SALOME/series7x/V7_7_0/Debian60-64/GUI + fi + else + echo "Could not find PRODUCTS for the platform ${platform} ${release}" + exit 1 + fi +} +include_suit '7.7.0' + include_salome() { local salome_version=$1 local platform="$(lsb_release -is)" local release="$(lsb_release -rs)" if [[ ${salome_version} = '7.5.1' ]]; then - if [[ "${platform}" = 'CentOS' ]]; then export INST_ROOT=/dn48/newgeom/common/SALOME-7.5.1_CentOS-6.3 - elif [[ "${platform}" = 'Debian' && ${release} =~ ^6 ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.5.1_Debian-6.0_SOURCES - elif [[ "${platform}" = 'Debian' && ${release} =~ ^8 ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.5.1_Debian-8.0_SOURCES + if [[ "${platform}" = 'CentOS' ]]; then export SALOME_ROOT=/dn48/newgeom/common/SALOME-7.5.1_CentOS-6.3 + elif [[ "${platform}" = 'Debian' && ${release} =~ ^6 ]]; then export SALOME_ROOT=/dn23/NEWGEOM/common/SALOME-7.5.1_Debian-6.0_SOURCES + elif [[ "${platform}" = 'Debian' && ${release} =~ ^8 ]]; then export SALOME_ROOT=/dn23/NEWGEOM/common/SALOME-7.5.1_Debian-8.0_SOURCES fi elif [[ ${salome_version} = '7.6.0' ]]; then - if [[ "${platform}" = 'CentOS' ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.6.0_CentOS-6.3_SOURCES - elif [[ "${platform}" = 'Debian' && ${release} =~ ^6 ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.6.0_Debian-6.0_SOURCES + if [[ "${platform}" = 'CentOS' ]]; then export SALOME_ROOT=/dn23/NEWGEOM/common/SALOME-7.6.0_CentOS-6.3_SOURCES + elif [[ "${platform}" = 'Debian' && ${release} =~ ^6 ]]; then export SALOME_ROOT=/dn23/NEWGEOM/common/SALOME-7.6.0_Debian-6.0_SOURCES fi elif [[ ${salome_version} = '7.7.0' ]]; then - if [[ "${platform}" = 'CentOS' ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.7.0_CentOS63-64 - elif [[ "${platform}" = 'Debian' && ${release} =~ ^6 ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.7.0_Debian60-64 + if [[ "${platform}" = 'CentOS' ]]; then export SALOME_ROOT=/dn23/NEWGEOM/common/SALOME-7.7.0_CentOS63-64 + elif [[ "${platform}" = 'Debian' && ${release} =~ ^6 ]]; then export SALOME_ROOT=/dn23/NEWGEOM/common/SALOME-7.7.0_Debian60-64 fi else echo "Could not find SALOME for the platform ${platform} ${release}" @@ -45,5 +90,12 @@ include_salome() { fi } include_salome '7.7.0' -echo "export INST_ROOT=${INST_ROOT}" >> env_config.sh + + +if [[ ${MODE} = 'Standalone' ]]; then + echo "export INST_ROOT=${PRODUCTS_ROOT}" >> env_config.sh + echo "export SUIT_DIR=${SUIT_DIR}" >> env_config.sh +else + echo "export INST_ROOT=${SALOME_ROOT}" >> env_config.sh +fi diff --git a/env_standalone.sh b/env_standalone.sh index 7e55f36cc..d4ca856c3 100644 --- a/env_standalone.sh +++ b/env_standalone.sh @@ -1,6 +1,6 @@ #!/bin/bash -for path in TOOLS_DIR; do +for path in TOOLS_DIR SUIT_DIR; do if [[ -z "${!path}" ]]; then echo "${path} not found."; exit 1 else @@ -10,5 +10,10 @@ done source ${TOOLS_DIR}/env_linux.sh -export LD_LIBRARY_PATH=${KERNEL_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH} -export LightAppConfig=${NEWGEOM_ROOT_DIR}/share/salome/resources/newgeom:${GUI_ROOT_DIR}/share/salome/resources/gui +# SUIT +export PATH=${SUIT_DIR}/bin:${PATH} +export LD_LIBRARY_PATH=${SUIT_DIR}/lib/salome:${LD_LIBRARY_PATH} + +#export LD_LIBRARY_PATH=${KERNEL_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH} +#export LightAppConfig=${NEWGEOM_ROOT_DIR}/share/salome/resources/newgeom:${GUI_ROOT_DIR}/share/salome/resources/gui +export LightAppConfig=${NEWGEOM_ROOT_DIR}/share/salome/resources/newgeom diff --git a/make.sh b/make.sh index 9aaa3ae61..15b951265 100755 --- a/make.sh +++ b/make.sh @@ -7,23 +7,32 @@ while [[ $# > 0 ]]; do case $key in debug|Debug) - CMAKE_BUILD_TYPE=Debug + BUILD_TYPE=Debug shift ;; lcov|coverage) - CMAKE_BUILD_TYPE=Debug + BUILD_TYPE=Debug USE_TEST_COVERAGE=ON shift ;; + standalone|Standalone) + MODE=Standalone + shift + ;; + *) + shift + ;; esac - - shift done -source ${TOOLS_DIR}/env_salome.sh +if [[ ${MODE} = 'Standalone' ]]; then + source ${TOOLS_DIR}/env_standalone.sh +else + source ${TOOLS_DIR}/env_salome.sh +fi CMAKE_ARGS="" -CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release}" +CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${BUILD_TYPE:-Release}" CMAKE_ARGS="${CMAKE_ARGS} -DUSE_TEST_COVERAGE=${USE_TEST_COVERAGE:-OFF}" CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${NEWGEOM_ROOT_DIR}" CMAKE_ARGS="${CMAKE_ARGS} ${SOURCES_DIR}"