// create instance of class for starting shell script to get available disk space
diskSpaceProc = new QProcess( this, "procDiskSpace" );
- connect( diskSpaceProc, SIGNAL( processExited() ), this, SLOT( updateAvailableSpace() ) );
-
// create instance of class for starting shell install script
shellProcess = new QProcess( this, "shellProcess" );
-
// create instance of class for starting shell script to modify SALOME *.la files
modifyLaProc = new QProcess( this, "modifyLaProc" );
- connect(modifyLaProc, SIGNAL( processExited() ), this, SLOT( checkModifyLaResult() ) );
// 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();
connect( this, SIGNAL( helpClicked() ), this, SLOT( helpClicked() ) );
connect( this, SIGNAL( aboutClicked() ), this, SLOT( onAbout() ) );
- // catch signals from launched script
+ // catch signals from launched diskSpaceProc
+ connect( diskSpaceProc, SIGNAL( processExited() ), this, SLOT( updateAvailableSpace() ) );
+ // catch signals from launched shellProcess
connect(shellProcess, SIGNAL( readyReadStdout() ), this, SLOT( readFromStdout() ) );
connect(shellProcess, SIGNAL( readyReadStderr() ), this, SLOT( readFromStderr() ) );
connect(shellProcess, SIGNAL( processExited() ), this, SLOT( productInstalled() ) );
connect(shellProcess, SIGNAL( wroteToStdin() ), this, SLOT( wroteToStdin() ) );
+ // catch signals from launched modifyLaProc
+ connect(modifyLaProc, SIGNAL( readyReadStdout() ), this, SLOT( readFromStdout() ) );
+ connect(modifyLaProc, SIGNAL( readyReadStderr() ), this, SLOT( readFromStderr() ) );
+ connect(modifyLaProc, SIGNAL( processExited() ), this, SLOT( checkModifyLaResult() ) );
+ // catch signals from launched checkFLibProc
+ connect(checkFLibProc, SIGNAL( readyReadStdout() ), this, SLOT( readFromStdout() ) );
+ connect(checkFLibProc, SIGNAL( readyReadStderr() ), this, SLOT( readFromStderr() ) );
+ connect(checkFLibProc, SIGNAL( processExited() ), this, SLOT( checkFLibResult() ) );
// create validation thread
myThread = new ProcessThread( this );
// ================================================================
void SALOME_InstallWizard::runModifyLaFiles()
{
+ modifyLaProc->clearArguments();
// ... update status label
statusLab->setText( tr( "Modification of *.la files of SALOME modules..." ) );
// set process arguments
statusLab->setText( tr( "Installation has been aborted" ) );
QMessageBox::critical( this,
tr( "Error" ),
- tr( "There is a problem during modification of *.la SALOME files"),
+ tr( "Modification of *.la SALOME files has not been completed."),
QMessageBox::Ok,
QMessageBox::NoButton,
QMessageBox::NoButton );
+ // 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 );
}
}
// ================================================================
void SALOME_InstallWizard::runCheckFLib()
{
// Check Fortran libraries
+ checkFLibProc->clearArguments();
// ... update status label
statusLab->setText( tr( "Check Fortran libraries..." ) );
// ... search "not found" libraries
if ( nextButton()->text() == tr( "&Stop" ) ) {
statusLab->setText( tr( "Aborting installation..." ) );
shellProcess->kill();
+ modifyLaProc->kill();
while( shellProcess->isRunning() );
statusLab->setText( tr( "Installation has been aborted by user" ) );
return;
void SALOME_InstallWizard::onCancel()
{
shellProcess->kill();
+ modifyLaProc->kill();
+ checkFLibProc->kill();
reject();
}
// ================================================================
void SALOME_InstallWizard::readFromStdout( )
{
___MESSAGE___( "Something was sent to stdout" );
- while ( shellProcess->canReadLineStdout() ) {
- installInfo->append( QString( shellProcess->readLineStdout() ) );
+ QProcess* theProcess = ( QProcess* )sender();
+ while ( theProcess->canReadLineStdout() ) {
+ installInfo->append( QString( theProcess->readLineStdout() ) );
installInfo->scrollToBottom();
}
- QString str( shellProcess->readStdout() );
+ QString str( theProcess->readStdout() );
if ( !str.isEmpty() ) {
installInfo->append( str );
installInfo->scrollToBottom();
void SALOME_InstallWizard::readFromStderr( )
{
___MESSAGE___( "Something was sent to stderr" );
- while ( shellProcess->canReadLineStderr() ) {
- installInfo->append( OUTLINE_TEXT( QString( shellProcess->readLineStderr() ) ) );
+ QProcess* theProcess = ( QProcess* )sender();
+ while ( theProcess->canReadLineStderr() ) {
+ installInfo->append( OUTLINE_TEXT( QString( theProcess->readLineStderr() ) ) );
installInfo->scrollToBottom();
hasErrors = true;
}
- QString str( shellProcess->readStderr() );
+ QString str( theProcess->readStderr() );
if ( !str.isEmpty() ) {
installInfo->append( OUTLINE_TEXT( str ) );
installInfo->scrollToBottom();