Salome HOME
Fix a bug of config file for RedHat 9 - correct binaries distribution path
[tools/install.git] / src / SALOME_InstallWizard.cxx
index db628fcb362c01767e9885982c7329165fe61d4f..87fe009202beb1ffcceed957e8ca8b43a18cae7a 100644 (file)
@@ -1,10 +1,11 @@
 //  File      : SALOME_InstallWizard.cxx 
 //  Created   : Thu Dec 18 12:01:00 2002
 //  Author    : Vadim SANDLER
-//  Project   : PAL/SALOME
-//  Module    : InstallWizard
-//  Copyright : 2004 CEA
-//  $Header$ 
+//  Project   : SALOME
+//  Module    : Installation Wizard
+//  Copyright : 2004-2005 CEA
+
+#include "globals.h"
 
 #include "SALOME_InstallWizard.hxx"
 #include "SALOME_ProductsView.hxx"
@@ -33,6 +34,9 @@
 #include <qwhatsthis.h> 
 #include <qtooltip.h>
 #include <qfile.h>
+#include <qthread.h>
+#include <qwaitcondition.h>
+#include <qmutex.h>
 
 #ifdef WNT
 #include <iostream.h>
 QString tmpDirName() { return QString(  "/INSTALLWORK" ) + QString::number( getpid() ); }
 #define TEMPDIRNAME tmpDirName()
 
+// ================================================================
+/*!
+ *  QProcessThread
+ *  Class for executing systen commands
+ */
+// ================================================================
+static QMutex myMutex(false);
+static QWaitCondition myWC;
+class QProcessThread: public QThread
+{
+  typedef QPtrList<QCheckListItem> ItemList;
+public:
+  QProcessThread( SALOME_InstallWizard* iw ) : QThread(), myWizard( iw ) { myItems.setAutoDelete( false ); }
+
+  void addCommand( QCheckListItem* item, const QString& cmd ) {
+    myItems.append( item );
+    myCommands.push_back( cmd );
+  }
+
+  bool hasCommands() const { return myCommands.count() > 0; }
+  void clearCommands()     { myCommands.clear(); myItems.clear(); }
+
+  virtual void run() {
+    while ( hasCommands() ) {
+      ___MESSAGE___( "QProcessThread::run - Processing command : " << myCommands[ 0 ].latin1() );
+      int result = system( myCommands[ 0 ] ) / 256; // return code is <errno> * 256 
+      ___MESSAGE___( "QProcessThread::run - Result : " << result );
+      QCheckListItem* item = myItems.first();
+      myCommands.pop_front();
+      myItems.removeFirst();
+      myMutex.lock();
+      SALOME_InstallWizard::postValidateEvent( myWizard, result, (void*)item );
+      if ( hasCommands() )
+       myWC.wait(&myMutex);
+      myMutex.unlock();
+    };
+  }
+
+private:
+  QStringList           myCommands;
+  ItemList              myItems;
+  SALOME_InstallWizard* myWizard;
+};
+
+// ================================================================
+/*!
+ *  WarnDialog
+ *  Warning dialog box
+ */
+// ================================================================
+class WarnDialog: public QDialog
+{
+  static WarnDialog* myDlg;
+  bool myCloseFlag;
+
+  WarnDialog( QWidget* parent ) 
+  : QDialog( parent, "WarnDialog", true, WDestructiveClose ) {
+    setCaption( tr( "Information" ) );
+    myCloseFlag = false;
+    QLabel* lab = new QLabel( tr( "Please, wait while checking native products configuration ..." ), this );
+    lab->setAlignment( AlignCenter );
+    lab->setFrameStyle( QFrame::Box | QFrame::Plain ); 
+    QVBoxLayout* l = new QVBoxLayout( this );
+    l->setMargin( 0 );
+    l->add( lab );
+    this->setFixedSize( lab->sizeHint().width()  + 50, 
+                       lab->sizeHint().height() * 5 );
+  }
+  void accept() { return; }
+  void reject() { return; }
+  void closeEvent( QCloseEvent* e) { if ( !myCloseFlag ) return; QDialog::closeEvent( e ); }
+  
+  ~WarnDialog() { myDlg = 0; }
+public:
+  static void showWarnDlg( QWidget* parent, bool show ) {
+    if ( show ) {
+      if ( !myDlg ) {
+       myDlg = new WarnDialog( parent );
+       QSize sh = myDlg->size();
+       myDlg->move( parent->x() + (parent->width()-sh.width())/2, 
+                    parent->y() + (parent->height()-sh.height())/2 );
+       myDlg->show();
+      }
+      myDlg->raise();
+      myDlg->setFocus();
+    }
+    else {
+      if ( myDlg ) {
+       myDlg->myCloseFlag = true;
+       myDlg->close();
+      }
+    }
+  }
+  static bool isWarnDlgShown() { return myDlg != 0; }
+};
+WarnDialog* WarnDialog::myDlg = 0;
+
 // ================================================================
 /*!
  *  DefineDependeces [ static ]
  *  Defines list of dependancies as string separated by space symbols
  */
 // ================================================================
-static QString DefineDependeces(MapProducts& theProductsMap) {
+static QString DefineDependeces(MapProducts& theProductsMap) 
+{
   QStringList aProducts;
   for ( MapProducts::Iterator mapIter = theProductsMap.begin(); mapIter != theProductsMap.end(); ++mapIter ) {
     QCheckListItem* item = mapIter.key();
@@ -202,9 +304,7 @@ SALOME_InstallWizard::SALOME_InstallWizard(QString aXmlFileName)
   setLicense( tr( "All right reserved" ) );
   setOS( "" );
 
-#ifdef DEBUG
-  cout << "Config. file : " << xmlFileName << endl;
-#endif
+  ___MESSAGE___( "Config. file : " << xmlFileName );
 
   // xml reader
   QFile xmlfile(xmlFileName);
@@ -252,6 +352,9 @@ SALOME_InstallWizard::SALOME_InstallWizard(QString aXmlFileName)
   connect(shellProcess, SIGNAL( readyReadStderr() ), this, SLOT( readFromStderr() ) );
   connect(shellProcess, SIGNAL( processExited() ),   this, SLOT( productInstalled() ) );
   connect(shellProcess, SIGNAL( wroteToStdin() ),    this, SLOT( wroteToStdin() ) );
+
+  // create validation thread
+  myThread = new QProcessThread( this );
 }
 // ================================================================
 /*!
@@ -267,12 +370,11 @@ SALOME_InstallWizard::~SALOME_InstallWizard()
   if ( PID > 0 ) {
     script += QString::number( PID );
     script += " > /dev/null";
-#ifdef DEBUG
-    cout << "script: "<< script.latin1() << endl;
-#endif
+    ___MESSAGE___( "script: " << script.latin1() );
     if ( system( script.latin1() ) ) { 
     }
   }
+  delete myThread;
 }
 // ================================================================
 /*!
@@ -294,6 +396,10 @@ bool SALOME_InstallWizard::eventFilter( QObject* object, QEvent* event )
 // ================================================================
 void SALOME_InstallWizard::closeEvent( QCloseEvent* ce )
 {
+  if ( WarnDialog::isWarnDlgShown() ) {
+    ce->ignore();
+    return;
+  }
   if ( !exitConfirmed ) {
     if ( QMessageBox::information( this, 
                                   tr( "Exit" ), 
@@ -831,9 +937,7 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle )
     script += fi.absFilePath();
     script += "' ";
     script += QString( "%1" ).arg( totSize );
-#ifdef DEBUG
-    cout << "script = " << script << endl;
-#endif
+    ___MESSAGE___( "script = " << script );
     if ( system( script ) ) {
       QMessageBox::critical( this, 
                              tr( "Out of space" ), 
@@ -875,9 +979,7 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle )
     tscript += fit.absFilePath();
     tscript += "' ";
     tscript += QString( "%1" ).arg( tempSize );
-#ifdef DEBUG
-    cout << "script = " << tscript << endl;
-#endif
+    ___MESSAGE___( "script = " << tscript );
     if ( system( tscript ) ) {
       QMessageBox::critical( this, 
                             tr( "Out of space" ), 
@@ -949,53 +1051,32 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle )
     }
     QString tmpFolder = QDir::cleanDirPath( tempFolder->text().stripWhiteSpace() ) + TEMPDIRNAME;
     QString tgtFolder = QDir::cleanDirPath( targetFolder->text().stripWhiteSpace() );
-    for ( unsigned i = 0; i < natives.count(); i++ ) {
-      item = findItem( natives[ i ] );
-      if ( item ) {
-       QString script = "cd ./config_files/;" + item->text(2) + " try_native " +
-               QFileInfo( tmpFolder ).absFilePath() + " " + QDir::currentDirPath() + "/Products " + QFileInfo( tgtFolder ).absFilePath() + " " +
-               QUOTE(DefineDependeces(productsMap)) + " " + item->text(0);
+    myThread->clearCommands();
+    if ( natives.count() > 0 ) {
+      for ( unsigned i = 0; i < natives.count(); i++ ) {
+       item = findItem( natives[ i ] );
+       if ( item ) {
+         QString dependOn = productsMap[ item ].getDependancies().join(" ");
+         QString script = "cd ./config_files/;" + item->text(2) + " try_native " +
+                 QFileInfo( tmpFolder ).absFilePath() + " " + QDir::currentDirPath() + "/Products " + QFileInfo( tgtFolder ).absFilePath() + " " +
+                 QUOTE(dependOn) + " " + item->text(0);
 
-#ifdef DEBUG
-       cout << "1. Script : " << script << endl;
-#endif
-       int res = system( script ) / 256; // return code is <errno> * 256 
-#ifdef DEBUG
-       cout << "try_native() : res = " << res << endl;
-#endif
-       if ( res > 0 ) {
-         if ( res == 2 ) {
-           // when try_native returns 2 it means that native product version is higher than that is prerequisited
-           if ( QMessageBox::warning( this, 
-                                      tr( "Warning" ), 
-                                      tr( "You have newer version of %1 installed on your computer than that is required (%2).\nContinue?").arg(item->text(0)).arg(item->text(1)), 
-                                      QMessageBox::Yes, 
-                                      QMessageBox::No, 
-                                      QMessageBox::NoButton ) == QMessageBox::No )
-             return false;
-         }
-         else {
-           QMessageBox::warning( this, 
-                                 tr( "Warning" ), 
-                                 tr( "You don't have native %1 %2 installed").arg(item->text(0)).arg(item->text(1)), 
-                                 QMessageBox::Ok, 
-                                 QMessageBox::NoButton, 
-                                 QMessageBox::NoButton );
-           productsView->setNone( item );
-           return false;
-         }
+         myThread->addCommand( item, script );
+       }
+       else {
+         QMessageBox::warning( this, 
+                               tr( "Warning" ), 
+                               tr( "%The product %1 %2 required for installation.\n"
+                                   "Please, add this product in config.xml file.").arg(item->text(0)).arg(item->text(1)),
+                               QMessageBox::Ok, 
+                               QMessageBox::NoButton, 
+                               QMessageBox::NoButton );
+         return false;
        }
       }
-      else {
-       QMessageBox::warning( this, 
-                             tr( "Warning" ), 
-                             tr( "%The product %1 %2 required for installation.\n"
-                                 "Please, add this product in config.xml file.").arg(item->text(0)).arg(item->text(1)),
-                             QMessageBox::Ok, 
-                             QMessageBox::NoButton, 
-                             QMessageBox::NoButton );
-       return false;
-      }
+      WarnDialog::showWarnDlg( this, true );
+      myThread->start();
+      return true; // return in order to avoid default postValidateEvent() action
     }
   }
   return InstallWizard::acceptData( pageTitle );
@@ -1102,9 +1183,7 @@ void SALOME_InstallWizard::launchScript()
   // try to find product being processed now
   QString prodProc = progressView->findStatus( Processing );
   if ( !prodProc.isNull() ) {
-#ifdef DEBUG
-    cout << "Found <Processing>: " << prodProc.latin1() << endl;
-#endif
+    ___MESSAGE___( "Found <Processing>: " );
 
     // if found - set status to "completed"
     progressView->setStatus( prodProc, Completed );
@@ -1115,15 +1194,12 @@ void SALOME_InstallWizard::launchScript()
   // else try to find next product which is not processed yet
   prodProc = progressView->findStatus( Waiting );
   if ( !prodProc.isNull() ) {
-#ifdef DEBUG
-    cout << "Found <Waiting>: " << prodProc.latin1() << endl;
-#endif
+    ___MESSAGE___( "Found <Waiting>: " << prodProc.latin1() );
     // if found - set status to "processed" and run script
     progressView->setStatus( prodProc, Processing );
     progressView->ensureVisible( prodProc );
 
     QCheckListItem* item = findItem( prodProc );
-    Dependancies dep = productsMap[ item ];
     // fill in script parameters
     shellProcess->clearArguments();
     // ... script name
@@ -1168,9 +1244,7 @@ void SALOME_InstallWizard::launchScript()
     
 
     QString depproducts = DefineDependeces(productsMap); 
-#ifdef DEBUG
-    cout << "Dependancies"<< depproducts.latin1() << endl;
-#endif
+    ___MESSAGE___( "Dependancies"<< depproducts.latin1() );
 
     shellProcess->addArgument( depproducts );
     // ... product name - currently instaled product
@@ -1179,29 +1253,21 @@ void SALOME_InstallWizard::launchScript()
     // run script
     if ( !shellProcess->start() ) {
       // error handling can be here
-#ifdef DEBUG
-      cout << "error" << endl;
-#endif
+      ___MESSAGE___( "error" );
     }
     return;
   }
-#ifdef DEBUG
-  cout << "All products have been installed successfully" << endl;
-#endif
+  ___MESSAGE___( "All products have been installed successfully" );
   // all products are installed successfully
   QString workDir = QDir::cleanDirPath( QFileInfo( "./config_files/" ).absFilePath() );
   MapProducts::Iterator mapIter;
-#ifdef DEBUG
-  cout << "starting pick-up environment" << endl;
-#endif
+  ___MESSAGE___( "starting pick-up environment" );
   for ( mapIter = productsMap.begin(); mapIter != productsMap.end(); ++mapIter ) {
     QCheckListItem* item = mapIter.key();
     Dependancies dep = mapIter.data();
     QString depproducts = QUOTE( DefineDependeces(productsMap) ); 
     if ( dep.pickUpEnvironment() ) {
-#ifdef DEBUG
-      cout << "... for " << dep.getName() << endl;
-#endif
+      ___MESSAGE___( "... for " << dep.getName() );
       QString script;
       script += "cd " + QUOTE( QFileInfo( QDir::cleanDirPath( "./config_files/" ) ).absFilePath() ) + "; ";
       script += item->text(2) + " ";
@@ -1211,25 +1277,21 @@ void SALOME_InstallWizard::launchScript()
       script += QUOTE( QFileInfo( QDir::cleanDirPath( targetFolder->text().stripWhiteSpace() ) ).absFilePath() ) + " ";
       script += depproducts + " ";
       script += item->text(0);
-#ifdef DEBUG
-      cout << "... --> " << script.latin1() << endl;
-#endif
+      ___MESSAGE___( "... --> " << script.latin1() );
       if ( system( script.latin1() ) ) { 
-#ifdef DEBUG
-       cout << "ERROR" << endl; 
-#endif
+       ___MESSAGE___( "ERROR" ); 
       }
     }
   }
   // <Next> button
-  nextButton()->setEnabled( true );
+  setNextEnabled( true );
   nextButton()->setText( tr( "&Next >" ) );
   QWhatsThis::add( nextButton(), tr( "Moves to the next step of the installation procedure" ) );
   QToolTip::add  ( nextButton(), tr( "Moves to the next step of the installation procedure" ) );
   nextButton()->disconnect();
   connect( nextButton(), SIGNAL( clicked() ), this, SLOT( next() ) );
   // <Back> button
-  backButton()->setEnabled( true );
+  setBackEnabled( true );
   // script parameters
   passedParams->clear();
   passedParams->setEnabled( false );
@@ -1287,9 +1349,7 @@ void SALOME_InstallWizard::onLaunchSalome()
        script += "cd bin/salome; ";
        script += "runSalome > /dev/null";
        script = "(csh -c '" + script + "')";
-#ifdef DEBUG
-       cout << script.latin1() << endl;
-#endif
+       ___MESSAGE___( "script: " << script.latin1() );
        if ( !system( script.latin1() ) )
          return;
        else
@@ -1350,9 +1410,7 @@ void SALOME_InstallWizard::abort()
 // ================================================================
 void SALOME_InstallWizard::reject()
 {
-#ifdef DEBUG
-  cout << "REJECTED" << endl;
-#endif
+  ___MESSAGE___( "REJECTED" );
   if ( !exitConfirmed ) {
     if ( QMessageBox::information( this, 
                                   tr( "Exit" ), 
@@ -1366,7 +1424,7 @@ void SALOME_InstallWizard::reject()
     }
     exitConfirmed = true;
   }
-  clean();
+  clean(true);
   InstallWizard::reject();
 }
 // ================================================================
@@ -1377,41 +1435,39 @@ void SALOME_InstallWizard::reject()
 // ================================================================
 void SALOME_InstallWizard::accept()
 {
-#ifdef DEBUG
-  cout << "ACCEPTED" << endl;
-#endif
-  clean();
+  ___MESSAGE___( "ACCEPTED" );
+  clean(true);
   InstallWizard::accept();
 }
 // ================================================================
 /*!
  *  SALOME_InstallWizard::clean
- *  Clears and removes temporary directory
+ *  Clears and (optionally) removes temporary directory
  */
 // ================================================================
-void SALOME_InstallWizard::clean()
+void SALOME_InstallWizard::clean(bool rmDir)
 {
+  WarnDialog::showWarnDlg( 0, false );
+  myThread->clearCommands();
+  myWC.wakeAll();
+  while ( myThread->running() );
   // VSR: first remove temporary files
   QString script = "cd ./config_files/; remove_tmp.sh '";
   script += tempFolder->text().stripWhiteSpace() + TEMPDIRNAME;
   script += "' ";
   script += QUOTE(DefineDependeces(productsMap));
   script += " > /dev/null";
-#ifdef DEBUG
-  cout << "script = " << script << endl;
-#endif
+  ___MESSAGE___( "script = " << script );
   if ( system( script.latin1() ) ) {
   }
   // VSR: then try to remove created temporary directory
   //script = "rm -rf " + QDir::cleanDirPath( tempFolder->text().stripWhiteSpace() ) + TEMPDIRNAME;
-  if ( !tmpCreated.isNull() ) {
+  if ( rmDir && !tmpCreated.isNull() ) {
     script = "rm -rf " + tmpCreated;
     script += " > /dev/null";
     if ( system( script.latin1() ) ) {
     }
-#ifdef DEBUG
-    cout << "script = " << script << endl;
-#endif
+    ___MESSAGE___( "script = " << script );
   }
 }
 // ================================================================
@@ -1457,7 +1513,7 @@ void SALOME_InstallWizard::pageChanged( const QString & mytitle)
       // reconnect Next button - to use it as Start button
       nextButton()->disconnect();
       connect( nextButton(), SIGNAL( clicked() ), this, SLOT( onStart() ) );
-      nextButton()->setEnabled( true );
+      setNextEnabled( true );
       // reconnect Cancel button to terminate process
       cancelButton()->disconnect();
       connect( cancelButton(), SIGNAL( clicked() ), this, SLOT( tryTerminate() ) );
@@ -1471,9 +1527,7 @@ void SALOME_InstallWizard::pageChanged( const QString & mytitle)
     finishButton()->setEnabled( true );
   }
   previousPage = aPage;
-#ifdef DEBUG
-  cout << "previousPage = " << previousPage << endl;
-#endif
+  ___MESSAGE___( "previousPage = " << previousPage );
 }
 // ================================================================
 /*!
@@ -1554,10 +1608,11 @@ void SALOME_InstallWizard::onStart()
   }
   // if something at all is selected
   if ( !toInstall.isEmpty() ) {
+    clean(false); // VSR 07/02/05 - bug fix: first we should clear temporary directory
     // disable <Next> button
-    nextButton()->setEnabled( false );
+    setNextEnabled( false );
     // disable <Back> button
-    backButton()->setEnabled ( false );
+    setBackEnabled( false );
     // enable script parameters line edit
     // VSR commented: 18/09/03: passedParams->setEnabled( true );
     // VSR commented: 18/09/03: passedParams->setFocus();
@@ -1601,20 +1656,14 @@ void SALOME_InstallWizard::onReturnPressed()
 */
 void SALOME_InstallWizard::productInstalled( )
 {
-#ifdef DEBUG
-  cout << "process exited" << endl;
-#endif
+  ___MESSAGE___( "process exited" );
   if ( shellProcess->normalExit() ) {
-#ifdef DEBUG
-    cout << "...normal exit" << endl;
-#endif
+    ___MESSAGE___( "...normal exit" );
     // normal exit - try to proceed installation further
     launchScript();
   }
   else {
-#ifdef DEBUG
-    cout << "...abnormal exit" << endl;
-#endif
+    ___MESSAGE___( "...abnormal exit" );
     // installation aborted
     abort();
     // clear script passed parameters lineedit
@@ -1622,14 +1671,14 @@ void SALOME_InstallWizard::productInstalled( )
     passedParams->setEnabled( false );
     QFont f = parametersLab->font(); f.setBold( false ); parametersLab->setFont( f );
     // enable <Next> button
-    nextButton()->setEnabled( true );
+    setNextEnabled( true );
     nextButton()->setText( tr( "&Next >" ) );
     QWhatsThis::add( nextButton(), tr( "Moves to the next step of the installation procedure" ) );
     QToolTip::add  ( nextButton(), tr( "Moves to the next step of the installation procedure" ) );
     nextButton()->disconnect();
     connect( nextButton(), SIGNAL( clicked() ), this, SLOT( next() ) );
     // enable <Back> button
-    backButton()->setEnabled( true );
+    setBackEnabled( true );
   }
 }
 // ================================================================
@@ -1775,9 +1824,7 @@ void SALOME_InstallWizard::onProdBtn()
 // ================================================================
 void SALOME_InstallWizard::wroteToStdin( )
 {
-#ifdef DEBUG
-  cout << "Something was sent to stdin" << endl;
-#endif
+  ___MESSAGE___( "Something was sent to stdin" );
 }
 // ================================================================
 /*!
@@ -1787,9 +1834,7 @@ void SALOME_InstallWizard::wroteToStdin( )
 // ================================================================
 void SALOME_InstallWizard::readFromStdout( )
 {
-#ifdef DEBUG
-  cout << "Something was sent to stdout" << endl;
-#endif
+  ___MESSAGE___( "Something was sent to stdout" );
   while ( shellProcess->canReadLineStdout() ) {
     installInfo->append( QString( shellProcess->readLineStdout() ) );
     installInfo->scrollToBottom();
@@ -1808,9 +1853,7 @@ void SALOME_InstallWizard::readFromStdout( )
 // ================================================================
 void SALOME_InstallWizard::readFromStderr( )
 {
-#ifdef DEBUG
-  cout << "Something was sent to stderr" << endl;
-#endif
+  ___MESSAGE___( "Something was sent to stderr" );
   while ( shellProcess->canReadLineStderr() ) {
     installInfo->append( QString( shellProcess->readLineStderr() ) );
     installInfo->scrollToBottom();
@@ -1860,3 +1903,61 @@ void SALOME_InstallWizard::updateCaption()
                             tr( getIWName() ) + " - " +
                             tr( "Step %1 of %2").arg( QString::number( this->indexOf( aPage )+1 ) ).arg( QString::number( this->pageCount() ) ) );
 }
+
+// ================================================================
+/*!
+ *  SALOME_InstallWizard::processValidateEvent
+ *  Processes validation event (<val> is validation code)
+ */
+// ================================================================
+void SALOME_InstallWizard::processValidateEvent( const int val, void* data )
+{
+  QWidget* aPage = InstallWizard::currentPage();
+  if ( aPage != productsPage ) {
+    InstallWizard::processValidateEvent( val, data );
+    return;
+  }
+  myMutex.lock();
+  myMutex.unlock();
+  QCheckListItem* item = (QCheckListItem*)data;
+  if ( val > 0 ) {
+    if ( val == 2 ) {
+      WarnDialog::showWarnDlg( 0, false );
+      // when try_native returns 2 it means that native product version is higher than that is prerequisited
+      if ( QMessageBox::warning( this, 
+                                tr( "Warning" ), 
+                                tr( "You have newer version of %1 installed on your computer than that is required (%2).\nContinue?").arg(item->text(0)).arg(item->text(1)),
+                               QMessageBox::Yes, 
+                               QMessageBox::No, 
+                               QMessageBox::NoButton ) == QMessageBox::No ) {
+       myThread->clearCommands();
+       myWC.wakeAll();
+       setNextEnabled( true );
+       setBackEnabled( true );
+       return;
+      }
+      WarnDialog::showWarnDlg( this, true );
+    }
+    else {
+      WarnDialog::showWarnDlg( 0, false );
+      QMessageBox::warning( this, 
+                          tr( "Warning" ), 
+                          tr( "You don't have native %1 %2 installed").arg(item->text(0)).arg(item->text(1)), 
+                          QMessageBox::Ok, 
+                          QMessageBox::NoButton, 
+                          QMessageBox::NoButton );
+      myThread->clearCommands();
+      myWC.wakeAll();
+      setNextEnabled( true );
+      setBackEnabled( true );
+      productsView->setNone( item );
+      return;
+    }
+  }
+  if ( myThread->hasCommands() )
+    myWC.wakeAll();
+  else {
+    WarnDialog::showWarnDlg( 0, false );
+    InstallWizard::processValidateEvent( val, data );
+  }
+}