From: maintenance team Date: Wed, 26 Nov 2008 13:53:28 +0000 (+0000) Subject: 1) Fix of IPAL20626: It is not possible to build products and Salome modules from... X-Git-Tag: V4_1_4~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=21ed6b9e244366a067c1f52747d368a9286e5d04;p=tools%2Finstall.git 1) Fix of IPAL20626: It is not possible to build products and Salome modules from source files by IW; 2) Check the binaries directory that it's not empty. --- diff --git a/bin/SALOME_InstallWizard b/bin/SALOME_InstallWizard index ab2f7f3..a3bac93 100755 Binary files a/bin/SALOME_InstallWizard and b/bin/SALOME_InstallWizard differ diff --git a/src/SALOME_InstallWizard.cxx b/src/SALOME_InstallWizard.cxx index b5ec671..e464964 100644 --- a/src/SALOME_InstallWizard.cxx +++ b/src/SALOME_InstallWizard.cxx @@ -520,7 +520,7 @@ SALOME_InstallWizard::SALOME_InstallWizard(const QString& aXmlFileName, addLogo( pixmap( pxLogo ) ); // set defaults - setVersion( "4.1.3" ); + setVersion( "4.1.4" ); setCaption( tr( "SALOME %1" ).arg( myVersion ) ); setCopyright( tr( "Copyright (C) 2008 CEA" ) ); setLicense( tr( "All rights reserved." ) ); @@ -1495,6 +1495,29 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle ) QMessageBox::NoButton ); return false; } + else if ( installType == Binaries ) { + QString aPlatform = platBtnGrp->selected()->name(); + QFileInfo fib( getPlatformBinPath( aPlatform ) ); + if ( !fib.isDir() ) { + QMessageBox::warning( this, + tr( "Warning" ), + tr( "The directory %1 doesn't exist.\n" + "This directory must contains binary archives.\n" ).arg( fib.absFilePath() ), + QMessageBox::Ok, + QMessageBox::NoButton, + QMessageBox::NoButton ); + return false; + } + else if ( QDir( fib.filePath(), "*.tar.gz" ).count() == 0 ) { + QMessageBox::warning( this, + tr( "Warning" ), + tr( "The directory %1 doesn't contain binary archives.\n" ).arg( fib.absFilePath() ), + QMessageBox::Ok, + QMessageBox::NoButton, + QMessageBox::NoButton ); + return false; + } + } } else if ( aPage == dirPage ) { @@ -2472,14 +2495,10 @@ void SALOME_InstallWizard::pageChanged( const QString & mytitle) QRadioButton* rb = ( (QRadioButton*) platBtnGrp->child( plat ) ); if ( installType == Binaries ) { QFileInfo fib( getPlatformBinPath( plat ) ); - rb->setEnabled( fib.exists() ); + rb->setEnabled( true/*fib.isDir()*/ ); if ( platBtnGrp->id( platBtnGrp->selected() ) == -1 && plat == getBasePlatform() ) rb->animateClick(); } - else { - QFileInfo fis( QDir::cleanDirPath( getSrcPath() ) ); - rb->setEnabled( fis.exists() ); - } // rb->setChecked( rb->isChecked() && rb->isEnabled() ); if ( rb->isChecked() && rb->isEnabled() ) rb->animateClick(); @@ -2601,8 +2620,8 @@ void SALOME_InstallWizard::onButtonGroup( int rbIndex ) int prevType = installType; QString prevPlat = getPlatform(); QWidget* aPage = InstallWizard::currentPage(); - installType = InstallationType( rbIndex ); if ( aPage == typePage ) { + installType = InstallationType( rbIndex ); // management of the check-box removeSrcBtn->setEnabled( installType == Compile ); oneModDirBtn->setEnabled( installType == Binaries /*|| installType == Compile*/ );