]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Fix of IPAL20620: IW does not notify about absence of archives of source files if...
authorakl <akl@opencascade.com>
Sat, 22 Nov 2008 09:45:40 +0000 (09:45 +0000)
committerakl <akl@opencascade.com>
Sat, 22 Nov 2008 09:45:40 +0000 (09:45 +0000)
src/SALOME_InstallWizard.cxx

index 6e2fe588d08c622b06bc7fae0e05075bdb07e88a..4feca9d649c23069191d8eb4ee3fba80d7495c32 100644 (file)
@@ -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" ),