]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Improve build scripts for linux
authorspo <sergey.pokhodenko@opencascade.com>
Sat, 30 Jul 2016 10:42:55 +0000 (13:42 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Thu, 4 Aug 2016 10:17:09 +0000 (13:17 +0300)
13 files changed:
config.sh [deleted file]
eclipse.sh
env.sh
env_linux.sh
env_salome.sh
env_standalone.sh [deleted file]
launcher_env.sh
launcher_salome_env.sh
linux_run.sh [deleted file]
make.sh
salome_kill.sh
salome_run.sh
test.sh

diff --git a/config.sh b/config.sh
deleted file mode 100755 (executable)
index ee58a03..0000000
--- a/config.sh
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/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
-
-PLATFORM=""
-if [ -f PLATFORM ]; then
-  PLATFORM="$(lsb_release -is)"
-  RELEASE="$(lsb_release -rs)"
-  if [ "${PLATFORM}" = 'CentOS' ]; then PLATFORM=-centos
-  elif [ "${PLATFORM}" = 'Debian' ]; then
-    if [ "${RELEASE}" =~ ^8 ]; then PLATFORM=-d8
-    elif [ "${RELEASE}" =~ ^7 ]; then PLATFORM=-d7
-    else PLATFORM=-d6
-    fi
-  fi
-fi
-
-if [ -f DEBUG ]; then
-  PLATFORM=${PLATFORM}_d
-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
-  elif [[ ${salome_version} = '7.8.0' ]]; then
-    if   [[ "${platform}" = 'CentOS' ]]; then export PRODUCTS_ROOT=/dn23/NEWGEOM/common/PRODUCTS/CentOS.6.3.64/7.8.0
-    elif [[ "${platform}" = 'Debian' && ${release} =~ ^6 ]]; then export PRODUCTS_ROOT=/dn23/NEWGEOM/common/PRODUCTS/DEBIAN.6.0.64/7.8.0
-    elif [[ "${platform}" = 'Debian' && ${release} =~ ^7 ]]; then export PRODUCTS_ROOT=/dn23/NEWGEOM/common/PRODUCTS/DEBIAN.7.0.64/7.8.0
-    fi
-  else
-    echo "Could not find PRODUCTS for the platform ${platform} ${release}"
-    exit 1
-  fi
-}
-include_products '7.8.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
-  elif [[ ${salome_version} = '7.8.0' ]]; then
-    if   [[ "${platform}" = 'CentOS' ]]; then export SUIT_DIR=/dn46/SALOME/series7x/V7_8_0/CentOS63-64/GUI
-    elif [[ "${platform}" = 'Debian' && ${release} =~ ^6 ]]; then export SUIT_DIR=/dn46/SALOME/series7x/V7_8_0/Debian60-64/GUI
-    elif [[ "${platform}" = 'Debian' && ${release} =~ ^7 ]]; then export SUIT_DIR=/dn46/SALOME/series7x/V7_8_0/Debian70-64/GUI
-    fi
-  else
-    echo "Could not find PRODUCTS for the platform ${platform} ${release}"
-    exit 1
-  fi
-}
-include_suit '7.8.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 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 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 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
-  elif [[ ${salome_version} = '7.8.0' ]]; then
-    if   [[ "${platform}" = 'CentOS' ]]; then export SALOME_ROOT=/dn23/NEWGEOM/common/SALOME-7.8.0_CentOS63-64
-    elif [[ "${platform}" = 'Debian' && ${release} =~ ^6 ]]; then export SALOME_ROOT=/dn23/NEWGEOM/common/SALOME-7.8.0_Debian60-64
-    elif [[ "${platform}" = 'Debian' && ${release} =~ ^7 ]]; then export SALOME_ROOT=/dn23/NEWGEOM/common/SALOME-7.8.0_Debian70-64
-    fi
-  else 
-    echo "Could not find SALOME for the platform ${platform} ${release}"
-    exit 1
-  fi
-}
-include_salome '7.8.0'
-
-
-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
-
index 33f9c2ff78018a2edf17ff78efe3b69f6ea0f6e7..7bfacff03734881bc44714c97864af973c19a7ad 100755 (executable)
@@ -1,7 +1,6 @@
 #!/bin/bash
 
 source env.sh
-source env_salome.sh
 
 mkdir -p ${BUILD_DIR}
 cd ${BUILD_DIR}
diff --git a/env.sh b/env.sh
index 15f52740115ba542cf601fcfba4eeb6e83954dd8..f42749e9e3e030f87369e0f54dbd924790c494ed 100644 (file)
--- a/env.sh
+++ b/env.sh
@@ -3,21 +3,19 @@
 # Path to sources
 export SOURCES_DIR=$(pwd)
 # Path to build directory
-export BUILD_DIR=$(cd .. && pwd)/build
+export BUILD_DIR=$(cd ${SOURCES_DIR}/.. && pwd)/build
 # Path to linux_run.sh & salome_run.sh
 export AUT_DIR=$(pwd)
 
 # Path to env_*.sh files
 export TOOLS_DIR=$(pwd)
 
-# Extracts INST_ROOT directory for SALOME
-if [[ ! -f env_config.sh ]]; then
-  echo "Can not find env_config.sh. Please, run config.sh."
-  exit 1
-fi
-source env_config.sh
+source /dn64/series7x/work/init.sh 2016-06-20
 
 # Path to solvespace-2
 export SHAPER_PDIR=/dn48/newgeom/common/products
 # Path to install directory
-export SHAPER_ROOT_DIR=$(cd .. && pwd)/install
+export SHAPER_ROOT_DIR=$(cd ${SOURCES_DIR}/.. && pwd)/install
+
+source ${TOOLS_DIR}/env_linux.sh
+source ${TOOLS_DIR}/env_salome.sh
\ No newline at end of file
index 8f431f67b294b9dd49ab1551bb816f0ee7dd9944..8148a14623f91950419ba7f343308a66afabe0a7 100644 (file)
@@ -2,11 +2,10 @@
 
 # This script uses:
 #
-# INST_ROOT - path of SALOME (env_products.sh)
 # SHAPER_PDIR - path of PRODUCTS for SHAPER (SolveSpace, lcov)
 # SHAPER_ROOT_DIR - path of SHAPER installation
 
-for path in INST_ROOT SHAPER_PDIR SHAPER_ROOT_DIR; do
+for path in SHAPER_PDIR SHAPER_ROOT_DIR; do
   if [[ -z ${!path+x} ]]; then
     echo "${path} not found."; exit 1
   else
@@ -14,11 +13,6 @@ for path in INST_ROOT SHAPER_PDIR SHAPER_ROOT_DIR; do
   fi
 done
 
-set +u
-echo "Source ${INST_ROOT}/$(cd ${INST_ROOT} && ls *env_products.sh)"
-source ${INST_ROOT}/$(cd ${INST_ROOT} && ls *env_products.sh)
-set -u
-
 #------ SolveSpace ------
 export SOLVESPACE_ROOT_DIR=${SHAPER_PDIR}/solvespace-2.1
 export LD_LIBRARY_PATH=${SOLVESPACE_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
index 631a01214287afe4cba2dcd870a9daaa5d748869..ccaf3aebc577af9acc86c18e6e56c9568c3e99b4 100644 (file)
@@ -1,15 +1,5 @@
 #!/bin/bash
 
-for path in TOOLS_DIR; do
-  if [[ -z "${!path}" ]]; then
-    echo "${path} not found."; exit 1
-  else
-    echo "Found ${path}: ${!path}"
-  fi
-done
-
-source ${TOOLS_DIR}/env_linux.sh
-
 # Correcting path which defined with error
 export LD_LIBRARY_PATH=${KERNEL_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH}
 export SalomeAppConfig=${SHAPER_ROOT_DIR}/share/salome/resources/shaper:${GUI_ROOT_DIR}/share/salome/resources/gui
diff --git a/env_standalone.sh b/env_standalone.sh
deleted file mode 100644 (file)
index e04a1e0..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-for path in TOOLS_DIR SUIT_DIR; do
-  if [[ -z "${!path}" ]]; then 
-    echo "${path} not found."; exit 1
-  else
-    echo "Found ${path}: ${!path}"
-  fi
-done
-
-source ${TOOLS_DIR}/env_linux.sh
-
-# 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=${SHAPER_ROOT_DIR}/share/salome/resources/shaper:${GUI_ROOT_DIR}/share/salome/resources/gui
-export LightAppConfig=${SHAPER_ROOT_DIR}/share/salome/resources/shaper
index 7e567c7b8b2cbd2181041ad9163b64a6a99414df..d6084d850ce3d56f52ac7031d70b0eca4e14332b 100755 (executable)
@@ -1,7 +1,6 @@
 #!/bin/bash
 
 source env.sh
-source env_salome.sh
 
 export PATH=${SHAPER_ROOT_DIR}/bin:${PATH}
 
index 3d19bef5c21e25a49470244ff29011f6db2a9bd6..3dc1cfd512a4ac8e1fb6f3e691ca70a3a5c65e6b 100755 (executable)
@@ -1,7 +1,6 @@
 #!/bin/bash
 
 source env.sh
-source env_salome.sh
 
 cd ${BUILD_DIR}
 
diff --git a/linux_run.sh b/linux_run.sh
deleted file mode 100755 (executable)
index aad0cde..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-source env.sh
-source ${TOOLS_DIR}/env_standalone.sh
-
-${TOOLS_DIR}/solver.sh "$@"
-
-APP=${SHAPER_ROOT_DIR}/bin/GeomApp
-
-${APP}
diff --git a/make.sh b/make.sh
index 2ebe12011854c06aad3b33df2221ef0d973cc436..8aac14dde9aab41e773abef99ff1568894968c4a 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -1,7 +1,5 @@
 #!/bin/bash
 
-source env.sh
-
 while [[ $# > 0 ]]; do
   key="$1"
 
@@ -15,21 +13,13 @@ while [[ $# > 0 ]]; do
       USE_TEST_COVERAGE=ON
       shift
       ;;
-    standalone|Standalone)
-      MODE=Standalone
-      shift
-      ;;
     *)
       shift
       ;;
   esac
 done
 
-if [[ ${MODE} = 'Standalone' ]]; then
-  source ${TOOLS_DIR}/env_standalone.sh
-else
-  source ${TOOLS_DIR}/env_salome.sh
-fi
+source env.sh
 
 CMAKE_ARGS=""
 CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${BUILD_TYPE:-Release}"
index 3fe6b6f18f57ad2dc99e1f857ea8fdf11471d714..3ae83e85a605eadbdc4065085346ae17ec1088b3 100755 (executable)
@@ -3,7 +3,6 @@
 a_dir=$(dirname $0)
 
 source ${a_dir}/env.sh
-source ${a_dir}/env_salome.sh
 
 set +e -x
 
index 8feb27cac881deaa6b8c23b1fcdf268edc6aeb81..da38262f1e5b9ba7cb913e724539a44b4dd92b45 100755 (executable)
@@ -1,7 +1,6 @@
 #!/bin/bash
 
 source env.sh
-source ${TOOLS_DIR}/env_salome.sh
 
 ${TOOLS_DIR}/solver.sh "$@"
 
diff --git a/test.sh b/test.sh
index c66c9150d499b306e0a900bcfc574f19fd650f7d..79ab28f2505e6cf0111ae486b188930b02d57f34 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -1,7 +1,6 @@
 #!/bin/bash
 
 source env.sh
-source ${TOOLS_DIR}/env_salome.sh
 
 mkdir -p ${BUILD_DIR}
 cd ${BUILD_DIR}