From: vsr Date: Tue, 13 Dec 2005 14:46:55 +0000 (+0000) Subject: PAL10853 X-Git-Tag: V_3_1_0b1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d4a64634ccca77773ff0b808c44c78891a76ca71;p=tools%2Finstall.git PAL10853 --- diff --git a/bin/SALOME_InstallWizard b/bin/SALOME_InstallWizard index 389af2e..08dae42 100755 Binary files a/bin/SALOME_InstallWizard and b/bin/SALOME_InstallWizard differ diff --git a/config.xml b/config.xml index c797737..2b7f353 100644 --- a/config.xml +++ b/config.xml @@ -540,6 +540,7 @@ script="LIGHT_BIN.sh"/> PyQt. This feature can be switched off by clicking "Auto set -prerequisites products" checkbox.
+prerequisites products" checkbox. Turn on this checkbox if you +want all pre-requisite products to be automatically checked when you +select some product to be installed. Turn off this checkbox if you +want to disable this feature.

Special button in the right part of the page - "Unselect All" - allows to reset quickly all products to the "not install" -state.
+state.

If you want to use native products (like gcc, tcl, etc.), select "use native" option. diff --git a/src/SALOME_InstallWizard.cxx b/src/SALOME_InstallWizard.cxx index a51e1ea..f85b34b 100644 --- a/src/SALOME_InstallWizard.cxx +++ b/src/SALOME_InstallWizard.cxx @@ -1182,15 +1182,19 @@ void SALOME_InstallWizard::checkProductPage() int totBin = 0, selBin = 0; MapProducts::Iterator itProd; for ( itProd = productsMap.begin(); itProd != productsMap.end(); ++itProd ) { - if ( itProd.data().getContext() == "salome sources" ) { - totSrc++; - if ( productsView->isSources( itProd.key() ) ) - selSrc++; - } - if ( itProd.data().getContext() == "salome binaries" ) { - totBin++; - if ( productsView->isBinaries( itProd.key() ) ) - selBin++; + bool srcctx = itProd.data().hasContext( "salome sources" ); + bool binctx = itProd.data().hasContext( "salome binaries" ); + if ( srcctx ) totSrc++; + if ( binctx ) totBin++; + if ( srcctx && !binctx && productsView->isSources( itProd.key() ) ) + selSrc++; + if ( !srcctx && binctx && productsView->isBinaries( itProd.key() ) ) + selBin++; + if ( srcctx && binctx && + ( productsView->isSources( itProd.key() ) || + productsView->isBinaries( itProd.key() ) ) ) { + selSrc++; + selBin++; } } selectSrcBtn->blockSignals( true ); @@ -1889,11 +1893,14 @@ void SALOME_InstallWizard::onProdBtn() checkBox->setState( QButton::On ); MapProducts::Iterator itProd; for ( itProd = productsMap.begin(); itProd != productsMap.end(); ++itProd ) { - if ( itProd.data().getContext() == "salome sources" ) { + if ( itProd.data().hasContext( "salome sources" ) ) { if ( checkBox->state() == QButton::Off ) productsView->setNone( itProd.key() ); - else + else { productsView->setSources( itProd.key() ); + if ( prerequisites->isChecked() ) + setPrerequisites( itProd.key() ); + } } } } @@ -1903,11 +1910,14 @@ void SALOME_InstallWizard::onProdBtn() checkBox->setState( QButton::On ); MapProducts::Iterator itProd; for ( itProd = productsMap.begin(); itProd != productsMap.end(); ++itProd ) { - if ( itProd.data().getContext() == "salome binaries" ) { + if ( itProd.data().hasContext( "salome binaries" ) ) { if ( checkBox->state() == QButton::Off ) productsView->setNone( itProd.key() ); - else + else { productsView->setBinaries( itProd.key() ); + if ( prerequisites->isChecked() ) + setPrerequisites( itProd.key() ); + } } } } diff --git a/src/SALOME_InstallWizard.hxx b/src/SALOME_InstallWizard.hxx index 551e43c..dd9e4d7 100644 --- a/src/SALOME_InstallWizard.hxx +++ b/src/SALOME_InstallWizard.hxx @@ -53,13 +53,22 @@ class Dependancies // gets dependancies QStringList getDependancies() const { return dependsOn; } // gets disk space required - long getSize(bool sources = false) const { return ( sources ? sizeSourcesTotal : sizeBinaryTotal ); } + long getSize(bool sources = false) const + { + return ( sources ? sizeSourcesTotal : sizeBinaryTotal ); + } // gets temporary disk space required long getTempSize() const { return sizeTemp; } // gets product's description QString getDescription() const { return description; } // gets product's context QString getContext() const { return context; } + // returns true if product supports given context + bool hasContext( const QString& ctx ) const + { + QStringList cl = QStringList::split(",",context); + return cl.find( ctx ) != cl.end(); + } // gets default mode QString getDefault() const { return defaultMode; } // returns true if this product needs to pick-up environment