From 453332eb7f9b647f8f973cce8efdff64e85cf57b Mon Sep 17 00:00:00 2001 From: prascle Date: Tue, 5 Feb 2008 13:32:36 +0000 Subject: [PATCH] PR: Appli and lib --- bin/appli_clean.sh | 2 +- bin/appli_gen.py | 10 +++--- bin/appli_install.sh | 4 +-- bin/appliskel/CatalogResources.xml | 26 +------------- bin/appliskel/README | 2 +- bin/appliskel/killCurrentPort | 3 +- bin/appliskel/runAppli | 2 +- bin/appliskel/runConsole | 2 +- bin/appliskel/runRemote.sh | 3 +- bin/appliskel/runSession | 2 +- bin/appliskel/runTests | 3 +- bin/appliskel/setAppliPath.sh | 36 ------------------- bin/setenv.py | 2 +- bin/virtual_salome.py | 2 +- .../unix/config_files/ac_linker_options.m4 | 2 +- src/KERNEL_PY/salome_shared_modules.py | 2 +- 16 files changed, 23 insertions(+), 80 deletions(-) delete mode 100755 bin/appliskel/setAppliPath.sh diff --git a/bin/appli_clean.sh b/bin/appli_clean.sh index 0046e946c..169a56622 100644 --- a/bin/appli_clean.sh +++ b/bin/appli_clean.sh @@ -20,4 +20,4 @@ # #clean appli -rm -rf bin lib share doc env.d envd setAppliPath.sh searchFreePort.sh runAppli runConsole runSession runRemote.sh runTests SalomeApp.xml *.pyc *~ .bashrc +rm -rf bin lib share doc env.d envd getAppliPath.py searchFreePort.sh runAppli runConsole runSession runRemote.sh runTests SalomeApp.xml *.pyc *~ .bashrc diff --git a/bin/appli_gen.py b/bin/appli_gen.py index c24614cc1..1ce244aca 100644 --- a/bin/appli_gen.py +++ b/bin/appli_gen.py @@ -145,7 +145,7 @@ def install(prefix,config_file): appliskel_dir=os.path.join(home_dir,'bin','salome','appliskel') for fn in ('envd', - 'setAppliPath.sh', + 'getAppliPath.py', 'searchFreePort.sh', 'runRemote.sh', 'runAppli', @@ -154,7 +154,7 @@ def install(prefix,config_file): 'runTests', '.bashrc', ): - virtual_salome.symlink(os.path.join(appliskel_dir, fn),os.path.join(home_dir, fn)) + virtual_salome.symlink("./bin/salome/appliskel/"+fn,os.path.join(home_dir, fn)) pass if filename != os.path.join(home_dir,"config_appli.xml"): @@ -174,7 +174,7 @@ def install(prefix,config_file): f =open(os.path.join(home_dir,'env.d','configSalome.sh'),'w') for module in _config["modules"]: - command='export '+ module + '_ROOT_DIR=' + home_dir +'\n' + command='export '+ module + '_ROOT_DIR=${HOME}/${APPLI}\n' f.write(command) pass if _config.has_key("samples_path"): @@ -185,9 +185,9 @@ def install(prefix,config_file): f =open(os.path.join(home_dir,'env.d','configGUI.sh'),'w') - command = 'export SalomeAppConfig=' + home_dir +'\n' + command = 'export SalomeAppConfig=${HOME}/${APPLI}\n' f.write(command) - command = 'export SUITRoot=' + os.path.join(home_dir,'share','salome') +'\n' + command = 'export SUITRoot=${HOME}/${APPLI}/share/salome\n' f.write(command) f.write('export DISABLE_FPE=1\n') f.write('export MMGT_REENTRANT=1\n') diff --git a/bin/appli_install.sh b/bin/appli_install.sh index 37da0092e..5e0dc418a 100644 --- a/bin/appli_install.sh +++ b/bin/appli_install.sh @@ -25,13 +25,13 @@ INSTALL_ROOT=${SALOME_ROOT}/Install APPLI_ROOT=`pwd` # --- clean appli -rm -rf bin lib share doc envd setAppliPath.sh searchFreePort.sh runAppli runConsole runSession env.d +rm -rf bin lib share doc envd getAppliPath.py searchFreePort.sh runAppli runConsole runSession env.d # --- install appli mkdir -p env.d ln -fs bin/salome/appliskel/envd . -ln -fs bin/salome/appliskel/setAppliPath.sh . +ln -fs bin/salome/appliskel/getAppliPath.py . ln -fs bin/salome/appliskel/searchFreePort.sh . ln -fs bin/salome/appliskel/runRemote.sh . ln -fs bin/salome/appliskel/runAppli . diff --git a/bin/appliskel/CatalogResources.xml b/bin/appliskel/CatalogResources.xml index 8caed2bfb..9e09ed5fc 100644 --- a/bin/appliskel/CatalogResources.xml +++ b/bin/appliskel/CatalogResources.xml @@ -1,28 +1,4 @@ - - - - - + diff --git a/bin/appliskel/README b/bin/appliskel/README index 644da2122..21ee467ac 100644 --- a/bin/appliskel/README +++ b/bin/appliskel/README @@ -57,7 +57,7 @@ SALOME internal run scripts envd Sets SALOME application environment, envd is sourced by other scripts. -setAppliPath.sh +getAppliPath.py Used by other scripts to define the Application Path. searchFreePort.sh diff --git a/bin/appliskel/killCurrentPort b/bin/appliskel/killCurrentPort index 41b14866a..c9f1e6c9d 100755 --- a/bin/appliskel/killCurrentPort +++ b/bin/appliskel/killCurrentPort @@ -2,7 +2,8 @@ # --- retrieve APPLI path, relative to $HOME, set ${APPLI} -. `dirname $0`/setAppliPath.sh +APPLI_HOME=`dirname $0` +export APPLI=`${APPLI_HOME}/getAppliPath.py` # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...) diff --git a/bin/appliskel/runAppli b/bin/appliskel/runAppli index 2bd9f1dae..a18114dd6 100755 --- a/bin/appliskel/runAppli +++ b/bin/appliskel/runAppli @@ -4,7 +4,7 @@ APPLI_HOME=`dirname $0` # --- retrieve APPLI path, relative to $HOME, set ${APPLI} -. ${APPLI_HOME}/setAppliPath.sh +export APPLI=`${APPLI_HOME}/getAppliPath.py` # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...) diff --git a/bin/appliskel/runConsole b/bin/appliskel/runConsole index c94a02fcf..73f5f5f88 100755 --- a/bin/appliskel/runConsole +++ b/bin/appliskel/runConsole @@ -4,7 +4,7 @@ APPLI_HOME=`dirname $0` # --- retrieve APPLI path, relative to $HOME, set ${APPLI} -. ${APPLI_HOME}/setAppliPath.sh +export APPLI=`${APPLI_HOME}/getAppliPath.py` # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...) diff --git a/bin/appliskel/runRemote.sh b/bin/appliskel/runRemote.sh index 21bc0b0c1..6cd76ef46 100755 --- a/bin/appliskel/runRemote.sh +++ b/bin/appliskel/runRemote.sh @@ -42,7 +42,8 @@ # --- retrieve APPLI path, relative to $HOME, set ${APPLI} -. `dirname $0`/setAppliPath.sh +APPLI_HOME=`dirname $0` +export APPLI=`${APPLI_HOME}/getAppliPath.py` # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...) diff --git a/bin/appliskel/runSession b/bin/appliskel/runSession index 9f3b0e4f9..446ee605a 100755 --- a/bin/appliskel/runSession +++ b/bin/appliskel/runSession @@ -9,7 +9,7 @@ APPLI_HOME=`dirname $0` # --- retrieve APPLI path, relative to $HOME, set ${APPLI} -. ${APPLI_HOME}/setAppliPath.sh +export APPLI=`${APPLI_HOME}/getAppliPath.py` # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...) diff --git a/bin/appliskel/runTests b/bin/appliskel/runTests index e98c1e6aa..4eb9b6dba 100755 --- a/bin/appliskel/runTests +++ b/bin/appliskel/runTests @@ -2,7 +2,8 @@ # --- retrieve APPLI path, relative to $HOME, set ${APPLI} -. `dirname $0`/setAppliPath.sh +APPLI_HOME=`dirname $0` +export APPLI=`${APPLI_HOME}/getAppliPath.py` # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...) diff --git a/bin/appliskel/setAppliPath.sh b/bin/appliskel/setAppliPath.sh deleted file mode 100755 index ccbd6b86a..000000000 --- a/bin/appliskel/setAppliPath.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG -# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# --- retrieve APPLI path, relative to $HOME, set ${APPLI} -# on sarge, "which" gives not allways the absolute path... - -comName=`which $0` -aa=${comName:0:1} -if test x$aa == x\/; then - mycom=${comName} -elif test x$aa == x\.; then - mycom=${PWD}/${comName:2} -else - mycom=${PWD}/${comName} -fi -APPLI=`echo ${HOME} \`dirname $mycom\` | awk ' { print substr($2,length($1)+2) } '` -#echo $APPLI -export APPLI diff --git a/bin/setenv.py b/bin/setenv.py index 7e1b93d80..39ba85ca1 100755 --- a/bin/setenv.py +++ b/bin/setenv.py @@ -74,7 +74,7 @@ def get_lib_dir(): if platform.machine() == "ia64": __lib__dir__ = "lib" else: - __lib__dir__ = "lib64" + __lib__dir__ = "lib" else: __lib__dir__ = "lib" return __lib__dir__ diff --git a/bin/virtual_salome.py b/bin/virtual_salome.py index 4efd5979f..026dcb1c1 100644 --- a/bin/virtual_salome.py +++ b/bin/virtual_salome.py @@ -84,7 +84,7 @@ def get_lib_dir(): if platform.machine() == "ia64": __lib__dir__ = "lib" else: - __lib__dir__ = "lib64" + __lib__dir__ = "lib" else: __lib__dir__ = "lib" return __lib__dir__ diff --git a/salome_adm/unix/config_files/ac_linker_options.m4 b/salome_adm/unix/config_files/ac_linker_options.m4 index 9006a46fe..3c0065a07 100644 --- a/salome_adm/unix/config_files/ac_linker_options.m4 +++ b/salome_adm/unix/config_files/ac_linker_options.m4 @@ -30,7 +30,7 @@ AC_DEFUN([AC_LINKER_OPTIONS],[ AC_CHECKING(for LIB_LOCATION_SUFFIX) LIB_LOCATION_SUFFIX="" case "$build_cpu" in - x86_64*) LIB_LOCATION_SUFFIX="64" ;; + x86_64*) LIB_LOCATION_SUFFIX="" ;; *) LIB_LOCATION_SUFFIX="" ;; esac AC_SUBST(LIB_LOCATION_SUFFIX) diff --git a/src/KERNEL_PY/salome_shared_modules.py b/src/KERNEL_PY/salome_shared_modules.py index 892b1085f..4d2212005 100755 --- a/src/KERNEL_PY/salome_shared_modules.py +++ b/src/KERNEL_PY/salome_shared_modules.py @@ -83,7 +83,7 @@ if platform.architecture()[0] == "64bit": if platform.machine() == "ia64": libdir = "lib" else: - libdir = "lib64" + libdir = "lib" else: libdir = "lib" for rep in path: -- 2.39.2