]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Improve 'single dir' mode: call modify_la_files procedure only once to improve perfor...
authorvsr <vsr@opencascade.com>
Fri, 16 May 2008 05:26:41 +0000 (05:26 +0000)
committervsr <vsr@opencascade.com>
Fri, 16 May 2008 05:26:41 +0000 (05:26 +0000)
bin/SALOME_InstallWizard
src/SALOME_InstallWizard.cxx

index ade820cf5b93db52624d4e13b43404cd02723946..8b27ade63cc796b212cde63650dda597e140c3f4 100755 (executable)
Binary files a/bin/SALOME_InstallWizard and b/bin/SALOME_InstallWizard differ
index 66cfd6c54945f2b3c4920376d358a7d7b174db02..89cccb887a6e1eb9b4867ded323c0ed488f8d185 100644 (file)
@@ -1113,8 +1113,10 @@ void SALOME_InstallWizard::showChoiceInfo()
     }
     item = (QCheckListItem*)( item->nextSibling() );
   }
-  if ( !textBin.isEmpty() )
+  if ( !textBin.isEmpty() ) {
     text += tr( "SALOME binaries to be installed" ) + ":<ul>" + textBin + "</ul>";
+    text += tr( "Install SALOME binaries to a single directory: <b>%1</b><br><br>").arg( singleDirBtn->isChecked() ? tr( "yes" ) : tr( "no" ) );
+  }
   if ( !textSrc.isEmpty() )
     text += tr( "SALOME sources to be installed" ) + ( buildSrcBtn->isChecked() ? tr( " and built" ) : QString( "" ) )  + ":<ul>" + textSrc + "</ul>";
   if ( !textBoth.isEmpty() )
@@ -1677,30 +1679,51 @@ void SALOME_InstallWizard::launchScript()
   // all products are installed successfully
   QString workDir = QDir::cleanDirPath( QFileInfo( "./config_files/" ).absFilePath() );
   MapProducts::Iterator mapIter;
+  bool needModifyLaFiles = false;
   ___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 ( !productsView->isNone( item ) && dep.pickUpEnvironment() ) {
-      ___MESSAGE___( "... for " << dep.getName().latin1() );
-      QString script;
-      script += "cd " + QUOTE( QFileInfo( QDir::cleanDirPath( "./config_files/" ) ).absFilePath() ) + "; ";
-      script += item->text(2) + " ";
-      script += "pickup_env ";
-      script += QUOTE( QFileInfo( QDir::cleanDirPath( tempFolder->text().stripWhiteSpace() ) + TEMPDIRNAME ).absFilePath() ) + " ";
-      script += QUOTE( QFileInfo( QDir::cleanDirPath( QDir::currentDirPath() + "/Products" ) ).absFilePath() ) + " ";
-      script += QUOTE( QFileInfo( QDir::cleanDirPath( targetFolder->text().stripWhiteSpace() ) ).absFilePath() ) + " ";
-      script += depproducts + " ";     // dependencies
-      script += item->text(0) + " ";   // product
-      if ( singleDirBtn->isChecked() ) // single directory flag
-       script += "1";
-      ___MESSAGE___( "... --> " << script.latin1() );
-      if ( system( script.latin1() ) ) {
-       ___MESSAGE___( "ERROR" );
+    if ( !productsView->isNone( item ) ) { 
+      if ( !dep.hasContext( "salome sources" ) && dep.hasContext( "salome binaries" ) )
+       needModifyLaFiles = true;
+      if ( dep.pickUpEnvironment() ) {
+       ___MESSAGE___( "... for " << dep.getName().latin1() );
+       QString script;
+       script += "cd " + QUOTE( QFileInfo( QDir::cleanDirPath( "./config_files/" ) ).absFilePath() ) + "; ";
+       script += item->text(2) + " ";
+       script += "pickup_env ";
+       script += QUOTE( QFileInfo( QDir::cleanDirPath( tempFolder->text().stripWhiteSpace() ) + TEMPDIRNAME ).absFilePath() ) + " ";
+       script += QUOTE( QFileInfo( QDir::cleanDirPath( QDir::currentDirPath() + "/Products" ) ).absFilePath() ) + " ";
+       script += QUOTE( QFileInfo( QDir::cleanDirPath( targetFolder->text().stripWhiteSpace() ) ).absFilePath() ) + " ";
+       script += depproducts + " ";     // dependencies
+       script += item->text(0) + " ";   // product
+       if ( singleDirBtn->isChecked() ) // single directory flag
+         script += "1";
+       ___MESSAGE___( "... --> " << script.latin1() );
+       if ( system( script.latin1() ) ) {
+         ___MESSAGE___( "ERROR" );
+       }
       }
     }
   }
+  // modify *.la files if necessary (SALOME binaries)
+  if ( singleDirBtn->isChecked() && needModifyLaFiles ) {
+    ___MESSAGE___( "modify *.la files" );
+    QString depproducts = QUOTE( DefineDependeces(productsMap) );
+    QString script;
+    script += "cd " + QUOTE( QFileInfo( QDir::cleanDirPath( "./config_files/" ) ).absFilePath() ) + "; ";
+    script += "modify_la_files.sh ";
+    script += QUOTE( QFileInfo( QDir::cleanDirPath( tempFolder->text().stripWhiteSpace() ) + TEMPDIRNAME ).absFilePath() ) + " ";
+    script += QUOTE( QFileInfo( QDir::cleanDirPath( targetFolder->text().stripWhiteSpace() ) ).absFilePath() ) + " ";
+    script += depproducts;     // dependencies
+    ___MESSAGE___( "... --> " << script.latin1() );
+    if ( system( script.latin1() ) ) {
+      ___MESSAGE___( "ERROR" );
+    }
+  }
+
   // <Next> button
   setNextEnabled( true );
   nextButton()->setText( tr( "&Next >" ) );