From fb2ec960621ce572e1f32bbd25a9d93c8ebbfc31 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 23 Mar 2004 13:47:41 +0000 Subject: [PATCH] Fix bug : bad environment is picked up --- config_files/GEOM_BIN_1.4.1.sh | 3 +- config_files/GEOM_SRC_1.4.1.sh | 3 +- config_files/KERNEL_BIN_1.4.1.sh | 2 +- config_files/KERNEL_SRC_1.4.1.sh | 2 +- config_files/MED_BIN_1.4.1.sh | 3 +- config_files/MED_SRC_1.4.1.sh | 3 +- config_files/SMESH_BIN_1.4.1.sh | 9 ++-- config_files/SMESH_SRC_1.4.1.sh | 3 +- config_files/SUPERV_BIN_1.4.1.sh | 9 ++-- config_files/SUPERV_SRC_1.4.1.sh | 3 +- config_files/VISU_BIN_1.4.1.sh | 9 ++-- config_files/VISU_SRC_1.4.1.sh | 3 +- config_files/netgenplugin1.0.sh | 76 -------------------------------- src/SALOME_InstallWizard.cxx | 37 +++++++++++++--- 14 files changed, 52 insertions(+), 113 deletions(-) delete mode 100755 config_files/netgenplugin1.0.sh diff --git a/config_files/GEOM_BIN_1.4.1.sh b/config_files/GEOM_BIN_1.4.1.sh index 04279f4..b86dd62 100755 --- a/config_files/GEOM_BIN_1.4.1.sh +++ b/config_files/GEOM_BIN_1.4.1.sh @@ -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()) diff --git a/config_files/GEOM_SRC_1.4.1.sh b/config_files/GEOM_SRC_1.4.1.sh index 612daf9..3283d63 100755 --- a/config_files/GEOM_SRC_1.4.1.sh +++ b/config_files/GEOM_SRC_1.4.1.sh @@ -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()) diff --git a/config_files/KERNEL_BIN_1.4.1.sh b/config_files/KERNEL_BIN_1.4.1.sh index ae8631d..7437d07 100755 --- a/config_files/KERNEL_BIN_1.4.1.sh +++ b/config_files/KERNEL_BIN_1.4.1.sh @@ -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()) diff --git a/config_files/KERNEL_SRC_1.4.1.sh b/config_files/KERNEL_SRC_1.4.1.sh index 5b2ccb4..a78a1fa 100755 --- a/config_files/KERNEL_SRC_1.4.1.sh +++ b/config_files/KERNEL_SRC_1.4.1.sh @@ -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()) diff --git a/config_files/MED_BIN_1.4.1.sh b/config_files/MED_BIN_1.4.1.sh index e83da95..d314543 100755 --- a/config_files/MED_BIN_1.4.1.sh +++ b/config_files/MED_BIN_1.4.1.sh @@ -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()) diff --git a/config_files/MED_SRC_1.4.1.sh b/config_files/MED_SRC_1.4.1.sh index 721b8ea..e499526 100755 --- a/config_files/MED_SRC_1.4.1.sh +++ b/config_files/MED_SRC_1.4.1.sh @@ -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()) diff --git a/config_files/SMESH_BIN_1.4.1.sh b/config_files/SMESH_BIN_1.4.1.sh index 9ccaa6a..7dfc1e6 100755 --- a/config_files/SMESH_BIN_1.4.1.sh +++ b/config_files/SMESH_BIN_1.4.1.sh @@ -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()) diff --git a/config_files/SMESH_SRC_1.4.1.sh b/config_files/SMESH_SRC_1.4.1.sh index 0dd5bdd..589396f 100755 --- a/config_files/SMESH_SRC_1.4.1.sh +++ b/config_files/SMESH_SRC_1.4.1.sh @@ -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()) diff --git a/config_files/SUPERV_BIN_1.4.1.sh b/config_files/SUPERV_BIN_1.4.1.sh index 12c9d24..ba80d23 100755 --- a/config_files/SUPERV_BIN_1.4.1.sh +++ b/config_files/SUPERV_BIN_1.4.1.sh @@ -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()) diff --git a/config_files/SUPERV_SRC_1.4.1.sh b/config_files/SUPERV_SRC_1.4.1.sh index a14bc07..036e7e7 100755 --- a/config_files/SUPERV_SRC_1.4.1.sh +++ b/config_files/SUPERV_SRC_1.4.1.sh @@ -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()) diff --git a/config_files/VISU_BIN_1.4.1.sh b/config_files/VISU_BIN_1.4.1.sh index c23a508..0eb2b6a 100755 --- a/config_files/VISU_BIN_1.4.1.sh +++ b/config_files/VISU_BIN_1.4.1.sh @@ -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()) diff --git a/config_files/VISU_SRC_1.4.1.sh b/config_files/VISU_SRC_1.4.1.sh index 82ef05e..68c02d0 100755 --- a/config_files/VISU_SRC_1.4.1.sh +++ b/config_files/VISU_SRC_1.4.1.sh @@ -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 index 08e0850..0000000 --- a/config_files/netgenplugin1.0.sh +++ /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 <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() ) ) {} + } + } // 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; -- 2.39.2