X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSALOME_XmlHandler.cxx;h=3eca49f9f2034ff9f9b222bdf142eda268ee7bdd;hb=0e849067e3cfa65a6fa0ad979876f58355e3ce9f;hp=c21618337ac3acb14deb7e18c37688098223ea10;hpb=e0a8c04ce4a86946270fd95884fba8e4b2a738b3;p=tools%2Finstall.git diff --git a/src/SALOME_XmlHandler.cxx b/src/SALOME_XmlHandler.cxx index c216183..3eca49f 100644 --- a/src/SALOME_XmlHandler.cxx +++ b/src/SALOME_XmlHandler.cxx @@ -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-2009 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 ) ); } } }