// create instance of class for starting shell install script
shellProcess = new QProcess( this, "shellProcess" );
+ // create instance of class for starting shell script to check Fortran libraries
+ checkFLibProc = new QProcess( this, "checkFLibProc" );
+ connect(checkFLibProc, SIGNAL( processExited() ), this, SLOT( checkFLibResult() ) );
+
// create introduction page
setupIntroPage();
// create page to select installation type
QMessageBox::NoButton );
return false;
}
- // AKL: 13/08/07 - skip tmp disk space checking (all files are unpucked into installation directory) ==>
+ // AKL: 13/08/07 - skip tmp disk space checking (all files are unpacked into installation directory) ==>
/*
// run script that check available disk space for temporary files
// returns 1 in case of error
return false;
}
*/
- // AKL: 13/08/07 - skip tmp disk space checking (all files are unpucked into installation directory) <==
+ // AKL: 13/08/07 - skip tmp disk space checking (all files are unpacked into installation directory) <==
// ########## check installation scripts
QCheckListItem* item;
availableSize->setText( diskSpaceProc->readLineStdout() + " KB");
}
// ================================================================
+/*!
+ * SALOME_InstallWizard::checkFLibResult
+ * Slot to take result of Fortran libraries checking
+ */
+// ================================================================
+void SALOME_InstallWizard::checkFLibResult()
+{
+ cout << "RESULT is " << checkFLibProc->exitStatus() << endl;
+ if ( checkFLibProc->normalExit() && checkFLibProc->exitStatus() == 1 ) {
+ cout << "Some libs are absent" << endl;
+ QString notFoundLibs;
+ while ( checkFLibProc->canReadLineStdout() ) {
+ notFoundLibs.append( checkFLibProc->readLineStdout() );
+ if ( checkFLibProc->canReadLineStdout() )
+ notFoundLibs.append( "\n" );
+ }
+ QMessageBox::warning( this,
+ tr( "Warning" ),
+ tr( "The following libraries are absent on current system:\n"
+ "%1").arg( notFoundLibs ),
+ QMessageBox::Ok,
+ QMessageBox::NoButton,
+ QMessageBox::NoButton );
+ }
+ // Update GUI and check installation errors
+ completeInstallation();
+}
+// ================================================================
/*!
* SALOME_InstallWizard::checkProductPage
* Checks products page validity (directories and products selection) and
}
}
}
+
+ if ( installType == Binaries ) {
+ // Check Fortran libraries
+ // ... update status label
+ statusLab->setText( tr( "Check Fortran libraries..." ) );
+ // ... search "not found" libraries
+ checkFLibProc->setWorkingDirectory( QDir::cleanDirPath( QFileInfo( "./config_files/" ).absFilePath() ) );
+ checkFLibProc->addArgument( "checkFortran.sh" );
+ checkFLibProc->addArgument( "find_libraries" );
+ checkFLibProc->addArgument( QDir::cleanDirPath( QFileInfo( targetFolder->text().stripWhiteSpace() ).absFilePath() ) );
+ // ... run script
+ if ( !checkFLibProc->start() ) {
+ ___MESSAGE___( "Error: process could not start!" );
+ }
+ }
+ else
+ // Update GUI and check installation errors
+ completeInstallation();
+
+}
+// ================================================================
+/*!
+ * SALOME_InstallWizard::completeInstallation
+ * Update GUI and check installation errors
+ */
+// ================================================================
+void SALOME_InstallWizard::completeInstallation()
+{
// update status label
statusLab->setText( tr( "Installation completed" ) );
// <Next> button
saveLog();
}
hasErrors = false;
+
}
// ================================================================
/*!
statusLab->setText( tr( "Installation has been aborted by user" ) );
return;
}
+
hasErrors = false;
progressView->clear();
installInfo->clear();
passedParams->clear();
passedParams->setEnabled( false );
QFont f = parametersLab->font(); f.setBold( false ); parametersLab->setFont( f );
+
// update status label
statusLab->setText( tr( "Preparing for installation..." ) );
// clear lists of products
}
// if something at all is selected
if ( (int)toInstall.count() > 1 ) {
+
+ if ( installType == Compile ) {
+ // update status label
+ statusLab->setText( tr( "Check Fortran compiler..." ) );
+ // check Fortran compiler.
+ QString script = "./config_files/checkFortran.sh find_compilers";
+ ___MESSAGE___( "script = " << script.latin1() );
+ if ( system( script ) ) {
+ QMessageBox::critical( this,
+ tr( "Error" ),
+ tr( "Fortran compiler was not found at current system!\n"
+ "Installation can not be continued!"),
+ QMessageBox::Ok,
+ QMessageBox::NoButton,
+ QMessageBox::NoButton );
+ // installation aborted
+ abort();
+ statusLab->setText( tr( "Installation has been aborted" ) );
+ // enable <Next> button
+ setNextEnabled( true );
+ nextButton()->setText( tr( "&Start" ) );
+ setAboutInfo( nextButton(), tr( "Start installation process" ) );
+ // reconnect Next button - to use it as Start button
+ disconnect( this, SIGNAL( nextClicked() ), this, SLOT( next() ) );
+ disconnect( this, SIGNAL( nextClicked() ), this, SLOT( onStart() ) );
+ connect( this, SIGNAL( nextClicked() ), this, SLOT( onStart() ) );
+ // enable <Back> button
+ setBackEnabled( true );
+ return;
+ }
+ }
+
+ // update status label
+ statusLab->setText( tr( "Preparing for installation..." ) );
+
clean(false); // VSR 07/02/05 - bug fix: first we should clear temporary directory
// disable <Next> button
//setNextEnabled( false );
}
else {
___MESSAGE___( "...abnormal exit" );
- statusLab->setText( tr( "Script is not completed and installation has been aborted" ) );
+ statusLab->setText( tr( "Installation has been aborted" ) );
// installation aborted
abort();
// clear script passed parameters lineedit