From: akl Date: Sat, 22 Nov 2008 09:45:40 +0000 (+0000) Subject: Fix of IPAL20620: IW does not notify about absence of archives of source files if... X-Git-Tag: V4_1_4~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=568f6e697b993ad122568f5594bdd1e96d58a0df;p=tools%2Finstall.git Fix of IPAL20620: IW does not notify about absence of archives of source files if Salome installed from source files. --- diff --git a/src/SALOME_InstallWizard.cxx b/src/SALOME_InstallWizard.cxx index 6e2fe58..4feca9d 100644 --- a/src/SALOME_InstallWizard.cxx +++ b/src/SALOME_InstallWizard.cxx @@ -1424,7 +1424,7 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle ) if ( installType == Binaries ) { // 'Binary' installation type // check binaries directory QFileInfo fib( QDir::cleanDirPath( getBinPath() ) ); - if ( !fib.exists() ) { + if ( !fib.isDir() ) { QMessageBox::warning( this, tr( "Warning" ), tr( "The directory %1 doesn't exist.\n" @@ -1459,7 +1459,7 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle ) // check sources directory QFileInfo fis( QDir::cleanDirPath( getSrcPath() ) ); - if ( !fis.exists() ) + if ( !fis.isDir() ) if ( QMessageBox::warning( this, tr( "Warning" ), tr( "The directory %1 doesn't exist.\n" @@ -1473,7 +1473,7 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle ) else { // 'Source' or 'Compile' installation type // check sources directory QFileInfo fis( QDir::cleanDirPath( getSrcPath() ) ); - if ( !fis.exists() ) { + if ( !fis.isDir() ) { QMessageBox::warning( this, tr( "Warning" ), tr( "The directory %1 doesn't exist.\n" @@ -1483,6 +1483,15 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle ) QMessageBox::NoButton ); return false; } + else if ( !QDir( fis.filePath(), "*.tar.gz" ).count() ) { + QMessageBox::warning( this, + tr( "Warning" ), + tr( "The directory %1 doesn't contain source archives.\n" ).arg( fis.absFilePath() ), + QMessageBox::Ok, + QMessageBox::NoButton, + QMessageBox::NoButton ); + return false; + } if ( platformsMap.find( curPlatform ) == platformsMap.end() ) { QString aMsg = warnMsg + "."; if ( installType == Compile ) @@ -1523,7 +1532,7 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle ) return false; } QFileInfo fi( QDir::cleanDirPath( targetDir ) ); - if ( !fi.exists() ) { + if ( !fi.isDir() ) { bool toCreate = QMessageBox::warning( this, tr( "Warning" ),