Salome HOME
Update copyrights 2014.
[tools/install.git] / src / SALOME_XmlHandler.cxx
index c21618337ac3acb14deb7e18c37688098223ea10..2cbee860ba38cfeae5209799354f9e59bb068b15 100644 (file)
@@ -3,7 +3,7 @@
 //  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
 //  Project   : SALOME
 //  Module    : Installation Wizard
-//  Copyright : 2002-2007 CEA
+//  Copyright : 2002-2014 CEA
 
 #include "globals.h"
 
@@ -144,7 +144,7 @@ void StructureParser::setTempDir( QLineEdit* dir )
 // ================================================================
 void StructureParser::getConfigInfo(const QDomElement &theElem)
 {
-  QString myVersion, myCaption, myCopyright, myLicense, myPlatforms;
+  QString myVersion, myCaption, myCopyright, myLicense, myPlatforms, myOptLibs;
     if ( theElem.attribute( "version" ) ) {
       myVersion = theElem.attribute( "version" ).stripWhiteSpace();
       if ( myWizard && !myVersion.isEmpty() ) 
@@ -178,6 +178,11 @@ void StructureParser::getConfigInfo(const QDomElement &theElem)
       if ( myTempDir )
        myTempDir->setText( substituteVars( theElem.attribute( "tempdir" ) ) );
     }
+    if ( theElem.attribute( "optionallibs" ) ) {
+      myOptLibs = theElem.attribute( "optionallibs" ).stripWhiteSpace();
+      if ( myWizard && !myOptLibs.isEmpty() ) 
+       myWizard->setOptionalLibs( myOptLibs );
+    }
 }
 // ================================================================
 /*!
@@ -230,10 +235,10 @@ void StructureParser::getProductsInfo( const QDomNode &theNode )
       if ( !instNode.isElement() ) 
        continue;
       QDomElement instElem = instNode.toElement();
-      if ( instElem.attribute( "os" ) != myWizard->getPlatform() ) 
+      if ( instElem.attribute( "os" ) != myWizard->getPlatform() && instElem.attribute( "os" ) != "all" 
        continue;
       if ( isBoolAttributeSet( instElem.attribute( "disable" ) ) )
-       break; // current product is skip
+       break; // current product is skipped
       QDomElement prodElem = prodNode.toElement();
       
       QStringList diskspace = QStringList::split( ",", instElem.attribute( "installdiskspace" ) );
@@ -243,21 +248,21 @@ void StructureParser::getProductsInfo( const QDomNode &theNode )
       
       QString name = prodElem.attribute( "name" ).stripWhiteSpace();
       QString type = prodElem.attribute( "type" ).stripWhiteSpace().lower();
+      BoolTristate woGuiMode = NotDefined;
       bool pickUp = isBoolAttributeSet( instElem.attribute( "pickupenv" ) );
       QString script = instElem.attribute( "script" );
-      InstallationType instType = myWizard->getInstType();
       QStringList typesList = QStringList::split( ",", type );
-      long prodSize = ( instType == Binaries ? (binreq + srcreq) :
-                       instType == Sources ? srcreq : 
-                       cmplreq );
       if ( typesList.find( "component" ) != typesList.end() ) {
+       QString woGuiAttr = instElem.attribute( "woguimode" );
+       if ( !woGuiAttr.isNull() )
+         woGuiMode = BoolTristate( isBoolAttributeSet( woGuiAttr ) );
        element = myModules->addItem( name, 
-                                     QString::number( prodSize ) + " KB", 
+                                     "unknown", 
                                      script );
-                         }
+      }
       else
        element = myPrereqs->addItem( name,
-                                     QString::number( prodSize ) + " KB", 
+                                     "unknown", 
                                      script );
       QString descr = QString::null;
       if ( prodElem.attribute( "description" ) != "" )
@@ -273,7 +278,8 @@ void StructureParser::getProductsInfo( const QDomNode &theNode )
                        instElem.attribute( "version" ),
                        descr,
                        type,
-                       pickUp ) );
+                       pickUp, 
+                       woGuiMode ) );
     } 
   }
 }