]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
1) To check the presence of corresponding BINARIES for user's platform and to show... IMP_BR IMP_BR_4
authorakl <akl@opencascade.com>
Mon, 17 Sep 2007 13:23:43 +0000 (13:23 +0000)
committerakl <akl@opencascade.com>
Mon, 17 Sep 2007 13:23:43 +0000 (13:23 +0000)
on the 'installation platform' page if these ones are absent.
2) fix minor bugs.

bin/SALOME_InstallWizard
src/SALOME_InstallWizard.cxx

index 879831d43410ea7314b99368f4fb267aca911a1c..87c6979696e566b36092d03c4206949d061c16b0 100755 (executable)
Binary files a/bin/SALOME_InstallWizard and b/bin/SALOME_InstallWizard differ
index 195aae98741056ab9f93ef51f360f36476c5dc1d..3e593580cd576cda9c1776be539e55a35086e8ff 100644 (file)
@@ -715,8 +715,14 @@ void SALOME_InstallWizard::getXmlAndPlatform()
     xmlMap = getXmlMap();
     if ( !curPlatform.isEmpty() ) {
       // try to get XML file for current platform
-      if ( xmlMap.find( curPlatform ) != xmlMap.end() )
+      if ( xmlMap.find( curPlatform ) != xmlMap.end() ) {
        xmlFileName = xmlMap[ curPlatform ];
+       QFileInfo fibp( QDir::cleanDirPath( getBinPath() + "/" + getPlatform() ) );
+       if ( !fibp.isDir() ) {
+         platformsMap = xmlMap;
+         warnMsg = tr( "Binaries are absent for current platform" );
+       }
+      }
       else {
        platformsMap = xmlMap;
        warnMsg = tr( "Your Linux platform is not supported by this SALOME package" );
@@ -1350,6 +1356,7 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle )
   QWidget* aPage = InstallWizard::page( pageTitle );
   if ( aPage == typePage ) {
     // installation type page
+    this->setAppropriate( platformsPage, false );
     if ( installType == Binaries ) { // 'Binary' installation type
       // check binaries directory
       QFileInfo fib( QDir::cleanDirPath( getBinPath() ) );
@@ -1357,19 +1364,22 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle )
        QMessageBox::warning( this,
                              tr( "Warning" ),
                              tr( "The directory %1 doesn't exist.\n"
-                                 "This directory must contain sources archives.\n").arg( fib.absFilePath() ),
+                                 "This directory must contains another one directory with binary archives for current platform.").arg( fib.absFilePath() ),
                              QMessageBox::Ok,
                              QMessageBox::NoButton, 
                              QMessageBox::NoButton );
        return false;
       }
+      QFileInfo fibp( QDir::cleanDirPath( getBinPath() + "/" + getPlatform() ) );
+      if ( !fibp.isDir() )
+       this->setAppropriate( platformsPage, true );
       // check sources directory
       QFileInfo fis( QDir::cleanDirPath( getSrcPath() ) );
       if ( !fis.exists() )
        if ( QMessageBox::warning( this,
                                   tr( "Warning" ),
                                   tr( "The directory %1 doesn't exist.\n"
-                                      "This directory must contain sources archives.\n"
+                                      "This directory must contains sources archives.\n"
                                       "Continue?" ).arg( fis.absFilePath() ),
                                   tr( "&Yes" ),
                                   tr( "&No" ), 
@@ -1383,7 +1393,7 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle )
        QMessageBox::warning( this,
                              tr( "Warning" ),
                              tr( "The directory %1 doesn't exist.\n"
-                                 "This directory must contain sources archives.\n" ).arg( fis.absFilePath() ),
+                                 "This directory must contains sources archives.\n" ).arg( fis.absFilePath() ),
                              QMessageBox::Ok,
                              QMessageBox::NoButton, 
                              QMessageBox::NoButton );
@@ -1456,7 +1466,7 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle )
     if ( !fi.isWritable() ) {
       QMessageBox::warning( this,
                             tr( "Warning" ),
-                            tr( "The directory %1 is not writeable.\n"
+                            tr( "The directory %1 is not writable.\n"
                                "Please, enter valid target directory path or change permissions" ).arg( fi.absFilePath() ),
                             QMessageBox::Ok,
                             QMessageBox::NoButton,
@@ -2296,7 +2306,7 @@ void SALOME_InstallWizard::pageChanged( const QString & mytitle)
   }
   else  if ( aPage == dirPage ) {
     // installation and temporary directories page
-    if ( ( indexOf( platformsPage ) != -1 ? 
+    if ( ( ( this->indexOf( platformsPage ) != -1 && this->appropriate( platformsPage ) ) ? 
           previousPage == platformsPage : previousPage == typePage ) 
         && stateChanged ) {
       // clear global variables before reading XML file