]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Fix bug : bad environment is picked up
authorvsr <vsr@opencascade.com>
Tue, 23 Mar 2004 13:47:41 +0000 (13:47 +0000)
committervsr <vsr@opencascade.com>
Tue, 23 Mar 2004 13:47:41 +0000 (13:47 +0000)
14 files changed:
config_files/GEOM_BIN_1.4.1.sh
config_files/GEOM_SRC_1.4.1.sh
config_files/KERNEL_BIN_1.4.1.sh
config_files/KERNEL_SRC_1.4.1.sh
config_files/MED_BIN_1.4.1.sh
config_files/MED_SRC_1.4.1.sh
config_files/SMESH_BIN_1.4.1.sh
config_files/SMESH_SRC_1.4.1.sh
config_files/SUPERV_BIN_1.4.1.sh
config_files/SUPERV_SRC_1.4.1.sh
config_files/VISU_BIN_1.4.1.sh
config_files/VISU_SRC_1.4.1.sh
config_files/netgenplugin1.0.sh [deleted file]
src/SALOME_InstallWizard.cxx

index 04279f4685afda8f0f2fb86533f8497988e245c4..b86dd62bacf1c3766cf2018fc3958dc65dd83ceb 100755 (executable)
@@ -20,8 +20,7 @@ export GEOM_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_SRC_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_ROOT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
 }
 
 # looks for the native product and collects it's environment (used by make_env())
index 612daf9904faa99ede6d3e12af3aa220d8e159c9..3283d6380647423db77cc653b25a7f2318c0dd35 100755 (executable)
@@ -20,8 +20,7 @@ export GEOM_SRC_DIR=\${INSTALL_ROOT}/${PRODUCT}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_SRC_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_ROOT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
 }
 
 # looks for the native product and collects it's environment (used by make_env())
index ae8631d7dad489a86312197928931f934cbb1532..7437d07927d15a037cfd89980a6b0ef8909e376f 100755 (executable)
@@ -20,7 +20,7 @@ export KERNEL_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${PRODUCT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
 }
 
 # looks for the native product and collects it's environment (used by make_env())
index 5b2ccb4a2c4fda59f6a03dc7d2f4ce1f7a935c4e..a78a1fad976d4569399907aef76e73968bb38451 100755 (executable)
@@ -20,7 +20,7 @@ export KERNEL_SRC_DIR=\${INSTALL_ROOT}/${PRODUCT}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${PRODUCT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
 }
 
 # looks for the native product and collects it's environment (used by make_env())
index e83da95f6c7bfe0dfa39c60f6cf77ae75a9887fb..d314543fb744d7c43982d0d662e792c97b4d0cc9 100755 (executable)
@@ -20,8 +20,7 @@ export MED_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_SRC_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_ROOT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
 }
 
 # looks for the native product and collects it's environment (used by make_env())
index 721b8eadeeaf6046fe32006762be0f4576be7682..e49952650cd99e40915965125a26673cf983ecfc 100755 (executable)
@@ -20,8 +20,7 @@ export MED_SRC_DIR=\${INSTALL_ROOT}/${PRODUCT}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_SRC_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_ROOT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
 }
 
 # looks for the native product and collects it's environment (used by make_env())
index 9ccaa6a4a17ca6e6d2a405e3be97651140dba6c5..7dfc1e68c0043eb575bd158499a31ab3978a1779 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/sh
 
 check_version(){
-if [ -n "${MED_ROOT_DIR}" ]; then
-    check_lib_version VERSION ${MED_ROOT_DIR}/bin
+if [ -n "${SMESH_ROOT_DIR}" ]; then
+    check_lib_version VERSION ${SMESH_ROOT_DIR}/bin
     if [ "$?" -eq "0" ]; then
-       ver=`cat ${MED_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` 
+       ver=`cat ${SMESH_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` 
        if [ "$ver" = "1.4.1" ]; then
            return 0
        fi
@@ -20,8 +20,7 @@ export SMESH_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_SRC_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_ROOT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
 }
 
 # looks for the native product and collects it's environment (used by make_env())
index 0dd5bddcb28be3288645b9a05959a675dc733cd7..589396f6e792fc58f83be1933ea6c4502f1b3251 100755 (executable)
@@ -20,8 +20,7 @@ export SMESH_SRC_DIR=\${INSTALL_ROOT}/${PRODUCT}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_SRC_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_ROOT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
 }
 
 # looks for the native product and collects it's environment (used by make_env())
index 12c9d2406c5f36d46415d5916a820304c96d7d02..ba80d23cbf6742c1c845874df0a4083cf8c98bc5 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/sh
 
 check_version(){
-if [ -n "${MED_ROOT_DIR}" ]; then
-    check_lib_version VERSION ${MED_ROOT_DIR}/bin
+if [ -n "${SUPERV_ROOT_DIR=}" ]; then
+    check_lib_version VERSION ${SUPERV_ROOT_DIR=}/bin
     if [ "$?" -eq "0" ]; then
-       ver=`cat ${MED_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` 
+       ver=`cat ${SUPERV_ROOT_DIR=}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` 
        if [ "$ver" = "1.4.1" ]; then
            return 0
        fi
@@ -20,8 +20,7 @@ export SUPERV_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_SRC_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_ROOT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
 }
 
 # looks for the native product and collects it's environment (used by make_env())
index a14bc072145522be67dca5a77c4f3794587e40f6..036e7e72204a454e8df8d7f4a1af022fa74095e4 100755 (executable)
@@ -20,8 +20,7 @@ export SUPERV_SRC_DIR=\${INSTALL_ROOT}/${PRODUCT}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_SRC_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_ROOT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
 }
 
 # looks for the native product and collects it's environment (used by make_env())
index c23a508f58fcdc89ca9921c121d89afc58f11176..0eb2b6a0697876ec06791fb5b0df30c029883551 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/sh
 
 check_version(){
-if [ -n "${MED_ROOT_DIR}" ]; then
-    check_lib_version VERSION ${MED_ROOT_DIR}/bin
+if [ -n "${VISU_ROOT_DIR}" ]; then
+    check_lib_version VERSION ${VISU_ROOT_DIR}/bin
     if [ "$?" -eq "0" ]; then
-       ver=`cat ${MED_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` 
+       ver=`cat ${VISU_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' ` 
        if [ "$ver" = "1.4.1" ]; then
            return 0
        fi
@@ -20,8 +20,7 @@ export VISU_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_SRC_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_ROOT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
 }
 
 # looks for the native product and collects it's environment (used by make_env())
index 82ef05edfa26e1edef983f31f9f7370533ba3325..68c02d037a54f1a453eaa2258ec609c2b81ee895 100755 (executable)
@@ -20,8 +20,7 @@ export VISU_SRC_DIR=\${INSTALL_ROOT}/${PRODUCT}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_SRC_DIR})
-(make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE} ${KERNEL_ROOT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
 }
 
 # looks for the native product and collects it's environment (used by make_env())
diff --git a/config_files/netgenplugin1.0.sh b/config_files/netgenplugin1.0.sh
deleted file mode 100755 (executable)
index 08e0850..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/sh
-
-check_version()
-{
-# check existance of netgen plugin
-# unfortunarely we can't find anything about netgen plugin version
-if [ -n "$NETGENPLUGINROOT" ]; then
-  return 0
-fi
-return 1
-}
-
-print_env()
-{
-cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
-#$DELIM ${PRODUCT_TYPE} $DELIM
-export NETGENPLUGINROOT=\${INSTALL_ROOT}/${PRODUCT}
-export SALOME_NETGENPluginResources=\${NETGENPLUGINROOT}
-export LD_LIBRARY_PATH=\${NETGENPLUGINROOT}/lib:\${LD_LIBRARY_PATH}
-##
-EOF
-(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
-}
-
-# this product can't be native
-try_native(){
-return 1;
-}
-
-try_preinstalled(){
-try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
-return $?
-}
-
-install_source()
-{
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
-
-makedir ${PRODUCT_DIR}
-
-check_jb tar xfz ${SOURCE_DIR}/netgenplugin1.0.tgz -C ${INSTALL_WORK}
-
-cd ${PRODUCT_WORK}
-check_job ${PRODUCT_DIR}/MAKE.LOG make
-
-mkdir -p ${PRODUCT_DIR}/lib
-cp -f ${PRODUCT_WORK}/.libs/*.so ${PRODUCT_DIR}/lib
-cp -f ${PRODUCT_WORK}/NETGENPlugin_icons.po ${PRODUCT_DIR}
-
-rm -fr ${PRODUCT_WORK}
-print_env
-}
-
-install_binary()
-{
-make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
-source ${INSTALL_WORK}/$SHRC
-
-check_jb tar xfz ${SOURCE_DIR}/netgenplugin1.0.tgz -C ${INSTALL_ROOT}
-
-print_env
-}
-
-export PROCEDURE=$1;
-export INSTALL_WORK=$2;
-export SOURCE_DIR=$3;
-export INSTALL_ROOT=$4;
-export PRODUCT_SEQUENCE=$5;
-if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="netgenplugin" ; fi
-export PRODUCT="netgenplugin1.0"
-export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
-export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
-source ./common.sh
-$PROCEDURE 
index ae369fc7e2876a1e67958e13943eb8ba897d4a75..fbbc4ad908a22661563b22b41abb471dcc2fe38c 100644 (file)
@@ -1171,6 +1171,30 @@ void SALOME_InstallWizard::launchScript()
   cout << "All products have been installed successfully" << endl;
 #endif
   // all products installed successfully
+  QFileInfo fi_sh ( targetFolder->text() + "/env_products.sh");
+  QFileInfo fi_csh( targetFolder->text() + "/env_products.csh");
+  QCheckListItem* itemBin = findItem( "KERNEL-Bin" );
+  QCheckListItem* itemSrc = findItem( "KERNEL-Bin" );
+  if ( itemBin /*&& !productsView->isNone( itemBin )*/ ) {
+    if ( fi_sh.exists() ) {
+      QString script = "cp " + fi_sh.filePath() + " " + targetFolder->text() + "/KERNEL_" + itemBin->text(1) + "/salome.sh";
+      if ( system( script.latin1() ) ) {}
+    }
+    if ( fi_csh.exists() ) {
+      QString script = "cp " + fi_csh.filePath() + " " + targetFolder->text() + "/KERNEL_" + itemBin->text(1) + "/salome.csh";
+      if ( system( script.latin1() ) ) {}
+    }
+  }
+  if ( itemSrc /*&& !productsView->isNone( itemSrc )*/ ) {
+    if ( fi_sh.exists() ) {
+      QString script = "cp " + fi_sh.filePath() + " " + targetFolder->text() + "/KERNEL_SRC_" + itemSrc->text(1) + "/salome.sh";
+      if ( system( script.latin1() ) ) {}
+    }
+    if ( fi_csh.exists() ) {
+      QString script = "cp " + fi_csh.filePath() + " " + targetFolder->text() + "/KERNEL_SRC_" + itemSrc->text(1) + "/salome.csh";
+      if ( system( script.latin1() ) ) {}
+    }
+  }
   // <Next> button
   nextButton()->setEnabled( true );
   nextButton()->setText( tr( "&Next >" ) );
@@ -1224,15 +1248,16 @@ void SALOME_InstallWizard::onMoreBtn()
 void SALOME_InstallWizard::onLaunchSalome()
 {
   QCheckListItem* item = 0;
-  if ( ( item = findItem( "SalomePro-Bin" ) ) ) {
-    QFileInfo fi( targetFolder->text() + "/SalomePro-" + item->text(1) + "/salome" );
+  if ( ( item = findItem( "KERNEL-Bin" ) ) ) {
+    QFileInfo fi( targetFolder->text() + "/KERNEL_" + item->text(1) + "/bin/salome/runSalome" );
     if ( fi.exists() ) {
       QString script;
-      script += "cd " + targetFolder->text() + "/SalomePro-" + item->text(1) + "; ";
+      script += "cd " + targetFolder->text() + "/KERNEL_" + item->text(1) + "; ";
       script += "source salome.csh; ";
+      script += "cd bin/salome; ";
       //script += "cd bin; ";
       //script += "runSalome > /dev/null";
-      script += "salome -g > /dev/null";
+      script += "runSalome > /dev/null";
       script = "(csh -c '" + script + "')";
 #ifdef DEBUG
       cout << script.latin1() << endl;
@@ -1412,8 +1437,8 @@ void SALOME_InstallWizard::pageChanged( const QString & mytitle)
   }
   else if ( aPage == readmePage ) {
     QCheckListItem* item = 0;
-    runSalomeBtn->setEnabled( ( item = findItem( "SalomePro-Bin" ) ) && 
-                             QFileInfo( targetFolder->text() + "/SalomePro-" + item->text(1) + "/salome" ).exists() );
+    runSalomeBtn->setEnabled( ( item = findItem( "KERNEL-Bin" ) ) && 
+                             QFileInfo( targetFolder->text() + "/KERNEL_" + item->text(1) + "/bin/salome/runSalome" ).exists() );
     finishButton()->setEnabled( true );
   }
   previousPage = aPage;