From: akl Date: Mon, 17 Sep 2007 13:23:43 +0000 (+0000) Subject: 1) To check the presence of corresponding BINARIES for user's platform and to show... X-Git-Tag: IMP_BR_4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FIMP_BR;p=tools%2Finstall.git 1) To check the presence of corresponding BINARIES for user's platform and to show 'Warning: binaries are absent for current platform' on the 'installation platform' page if these ones are absent. 2) fix minor bugs. --- diff --git a/bin/SALOME_InstallWizard b/bin/SALOME_InstallWizard index 879831d..87c6979 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 195aae9..3e59358 100644 --- a/src/SALOME_InstallWizard.cxx +++ b/src/SALOME_InstallWizard.cxx @@ -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