From: nri Date: Fri, 16 May 2003 16:06:14 +0000 (+0000) Subject: NRI : Modification. X-Git-Tag: V1_4_0~119 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e0c7f7ac4359b4db352cfdb65706db94c8410bc5;p=modules%2Fkernel.git NRI : Modification. --- diff --git a/src/SALOMEGUI/QAD_Desktop.cxx b/src/SALOMEGUI/QAD_Desktop.cxx index fc6cd157c..9b0008ca3 100644 --- a/src/SALOMEGUI/QAD_Desktop.cxx +++ b/src/SALOMEGUI/QAD_Desktop.cxx @@ -81,6 +81,8 @@ using namespace std; #include #include +static const char* SEPARATOR = ":"; + extern "C" { # include @@ -245,14 +247,23 @@ myQueryClose( true ) /* find component icon */ QString iconfile = strdup(list_composants[ind].moduleicone) ; QString modulename = strdup(list_composants[ind].modulename) ; + QString moduleusername = strdup(list_composants[ind].moduleusername) ; + + MESSAGE ( " MODULE = " << modulename ) + MESSAGE ( " MODULE icon = " << iconfile ) + MESSAGE ( " MODULE username = " << moduleusername ) + + mapComponentName.insert( moduleusername, modulename ); + resDir = resMgr->findFile(iconfile,modulename) ; if (resDir) { + MESSAGE ( "resDir" << resDir ) //resDir = QAD_Tools::addSlash(resDir) ; //QPixmap Icone(resDir+iconfile) ; QPixmap Icone( QAD_Tools::addSlash( resDir ) + iconfile ); QToolButton * toolb = - new QToolButton( QIconSet( Icone ), modulename, QString::null, this, + new QToolButton( QIconSet( Icone ), moduleusername, QString::null, this, SLOT( onButtonActiveComponent () ),tbComponent ); toolb->setToggleButton( true ); myComponentButton.append(toolb); @@ -265,7 +276,7 @@ myQueryClose( true ) } if ( !QString(list_composants[ind].modulename).isEmpty() ) - myCombo->insertItem( strdup(list_composants[ind].modulename) ); + myCombo->insertItem( strdup(list_composants[ind].moduleusername) ); } @@ -757,7 +768,7 @@ void QAD_Desktop::createActions() myPrefPopup.insertSeparator(); - QAction* dirAction = new QAction( "", tr("MEN_DESK_PREF_DIRICTORIES"), 0, this ); + QAction* dirAction = new QAction( "", tr("MEN_DESK_PREF_DIRICTORIES"), ALT+Key_D, this ); QAD_ASSERT(connect( dirAction, SIGNAL(activated()), this, SLOT(onDirList() ))); dirAction->addTo( &myPrefPopup ); myStdActions.insert( PrefDirsId, dirAction ); @@ -774,17 +785,17 @@ void QAD_Desktop::createActions() //NRI : SAL2214 myWindowPopup.insertItem( tr("MEN_DESK_WINDOW_NEW3D"), &myNewViewPopup, WindowNew3dId ); - QAction* viewOCCAction = new QAction( "", tr("MEN_DESK_VIEW_OCC"), 0, this ); + QAction* viewOCCAction = new QAction( "", tr("MEN_DESK_VIEW_OCC"), ALT+Key_O, this ); QAD_ASSERT(connect( viewOCCAction, SIGNAL(activated()), this, SLOT(onNewWindow3d() ))); viewOCCAction->addTo( &myNewViewPopup ); myStdActions.insert( ViewOCCId, viewOCCAction ); - QAction* viewVTKAction = new QAction( "", tr("MEN_DESK_VIEW_VTK"), 0, this ); + QAction* viewVTKAction = new QAction( "", tr("MEN_DESK_VIEW_VTK"), ALT+Key_V, this ); QAD_ASSERT(connect( viewVTKAction, SIGNAL(activated()), this, SLOT(onNewWindow3d() ))); viewVTKAction->addTo( &myNewViewPopup ); myStdActions.insert( ViewVTKId, viewVTKAction ); - QAction* viewPlot2dAction = new QAction( "", tr("MEN_DESK_VIEW_PLOT2D"), 0, this ); + QAction* viewPlot2dAction = new QAction( "", tr("MEN_DESK_VIEW_PLOT2D"), ALT+Key_P, this ); QAD_ASSERT(connect( viewPlot2dAction, SIGNAL(activated()), this, SLOT(onNewWindow3d() ))); viewPlot2dAction->addTo( &myNewViewPopup ); myStdActions.insert( ViewPlot2dId, viewPlot2dAction ); @@ -819,7 +830,7 @@ void QAD_Desktop::createActions() /* 'Help' actions */ /* contents */ - QAction* helpContentsAction = new QAction( "", tr("MEN_DESK_HELP_CONTENTS"), 0, this ); + QAction* helpContentsAction = new QAction( "", tr("MEN_DESK_HELP_CONTENTS"), Key_F1, this ); helpContentsAction->setStatusTip ( tr("PRP_DESK_HELP_CONTENTS") ); QAD_ASSERT(connect( helpContentsAction, SIGNAL(activated()), this, SLOT( onHelpContents() ))); @@ -1117,6 +1128,23 @@ Engines::Component_var QAD_Desktop::getEngine(const char *containerName, return eng._retn(); } +QString QAD_Desktop::getComponentName(const char *componentUserName) +{ + if ( mapComponentName.contains(componentUserName) ) + return mapComponentName[ componentUserName ] ; + else + return ""; +} + +QString QAD_Desktop::getComponentUserName(const char *componentName) +{ + QMap::Iterator it; + for( it = mapComponentName.begin(); it != mapComponentName.end(); ++it ) + if (it.data() == componentName ) + return it.key(); + return ""; +} + /*! gets application Help Window (and creates if necessary) */ @@ -1415,7 +1443,7 @@ void QAD_Desktop::onOpenStudy() tr("BUT_OK") ); } else if (myActiveComp != "") { QApplication::setOverrideCursor( Qt::waitCursor ); - loadComponentData(myActiveComp); + loadComponentData(mapComponentName[myActiveComp]); openStudy->updateObjBrowser(true); QApplication::restoreOverrideCursor(); } @@ -2106,7 +2134,7 @@ void QAD_Desktop::onOpenWith() if (SCO->FindAttribute(anAttr, "AttributeName")) { aName = SALOMEDS::AttributeName::_narrow(anAttr); name = aName->Value(); - SALOME_ModuleCatalog::Acomponent_var Comp = myCatalogue->GetComponent( name ); + SALOME_ModuleCatalog::Acomponent_var Comp = myCatalogue->GetComponent( mapComponentName[name] ); if ( !Comp->_is_nil() ) { SALOME_ModuleCatalog::ListOfComponents_var list_type_composants = @@ -2184,7 +2212,7 @@ bool QAD_Desktop::loadComponent(QString Component) QAD_ResourceMgr* resMgr = QAD_Desktop::createResourceManager(); if ( resMgr ) { QString msg; - if (!resMgr->loadResources( Component + "GUI", msg )) + if (!resMgr->loadResources( Component, msg )) { //NRI QCString errMsg; // errMsg.sprintf( "Do not load all resources for module %sGUI.\n" , @@ -2198,14 +2226,14 @@ bool QAD_Desktop::loadComponent(QString Component) /* Parse xml file */ myXmlHandler = new QAD_XmlHandler(); myXmlHandler->setMainWindow(this); - if (!myXmlHandler->setComponent(resMgr->resources(Component + "GUI"))) return false; + if (!myXmlHandler->setComponent(resMgr->resources( Component ))) return false; - QString language = resMgr->language( Component + "GUI" ); + QString language = resMgr->language( Component ); QString ComponentXml = Component + "_" + language + ".xml"; //ComponentXml = resMgr->resources(Component + "GUI") ; //ComponentXml = QAD_Tools::addSlash(ComponentXml) ; - ComponentXml = QAD_Tools::addSlash( resMgr->findFile( ComponentXml, Component + "GUI" ) ) + ComponentXml; + ComponentXml = QAD_Tools::addSlash( resMgr->findFile( ComponentXml, Component ) ) + ComponentXml; QFile file( ComponentXml ); if ( !file.exists() || !file.open( IO_ReadOnly ) ) { @@ -2245,42 +2273,69 @@ bool QAD_Desktop::loadComponent(QString Component) mySharedLibrary = OSD_SharedLibrary(); QString ComponentLib; - QCString dir; + QCString libs; QFileInfo fileInfo ; - bool found = false; - if ( dir = getenv("SALOME_SITE_DIR")) { - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "lib" ; - dir = QAD_Tools::addSlash(dir) ; + QString fileString ; + QString dir; + + if ( libs = getenv("LD_LIBRARY_PATH")) { + MESSAGE ( " LD_LIBRARY_PATH : " << libs ) + QStringList dirList = QStringList::split( SEPARATOR, libs, false ); // skip empty entries + for ( int i = dirList.count()-1; i >= 0; i-- ) { + dir = dirList[ i ]; #ifdef WNT - dir = dir + "lib" + Component.latin1() + "GUI.dll" ; + fileString = QAD_Tools::addSlash( dir ) + "lib" + Component + "GUI.dll" ; #else - dir = dir + "lib" + Component.latin1() + "GUI.so" ; + fileString = QAD_Tools::addSlash( dir ) + "lib" + Component + "GUI.so" ; #endif - MESSAGE ( " GUI library = " << dir ) - fileInfo.setFile(dir) ; - if (fileInfo.exists()) { - ComponentLib = fileInfo.fileName() ; - found = true; + + fileInfo.setFile(fileString) ; + if (fileInfo.exists()) { + MESSAGE ( " GUI library = " << fileString ) + ComponentLib = fileInfo.fileName() ; + break; + } } - } + MESSAGE ( " GUI library not found " ) + } +// bool found = false; +// if ( dir = getenv("SALOME_SITE_DIR")) { +// dir = QAD_Tools::addSlash(dir) ; +// dir = dir + "lib" ; +// dir = QAD_Tools::addSlash(dir) ; +// dir = dir + "salome" ; +// dir = QAD_Tools::addSlash(dir) ; +// #ifdef WNT +// dir = dir + "lib" + Component.latin1() + "GUI.dll" ; +// #else +// dir = dir + "lib" + Component.latin1() + "GUI.so" ; +// #endif +// MESSAGE ( " GUI library = " << dir ) +// fileInfo.setFile(dir) ; +// if (fileInfo.exists()) { +// ComponentLib = fileInfo.fileName() ; +// found = true; +// } +// } - if ( (dir = getenv("SALOME_ROOT_DIR")) && !found ) { - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "lib" ; - dir = QAD_Tools::addSlash(dir) ; -#ifdef WNT - dir = dir + "lib" + Component.latin1() + "GUI.dll" ; -#else - dir = dir + "lib" + Component.latin1() + "GUI.so" ; -#endif - MESSAGE ( " GUI library = " << dir ) - fileInfo.setFile(dir) ; - if (fileInfo.exists()) { - ComponentLib = fileInfo.fileName() ; - found = true; - } - } +// if ( (dir = getenv("SALOME_ROOT_DIR")) && !found ) { +// dir = QAD_Tools::addSlash(dir) ; +// dir = dir + "lib" ; +// dir = QAD_Tools::addSlash(dir) ; +// dir = dir + "salome" ; +// dir = QAD_Tools::addSlash(dir) ; +// #ifdef WNT +// dir = dir + "lib" + Component.latin1() + "GUI.dll" ; +// #else +// dir = dir + "lib" + Component.latin1() + "GUI.so" ; +// #endif +// MESSAGE ( " GUI library = " << dir ) +// fileInfo.setFile(dir) ; +// if (fileInfo.exists()) { +// ComponentLib = fileInfo.fileName() ; +// found = true; +// } +// } mySharedLibrary.SetName(TCollection_AsciiString((char*)ComponentLib.latin1()).ToCString()); ok = mySharedLibrary.DlOpen(OSD_RTLD_LAZY); @@ -2309,7 +2364,7 @@ bool QAD_Desktop::loadComponent(QString Component) } myActiveStudy->setMessage(QString("Component : ") + - aComponent->componentname() + " created " ); + aComponent->componentusername() + " created " ); myActiveStudy->setMessage(QString("Type : ") + QString::number(aComponent->component_type())); myActiveStudy->setMessage(QString("Constraint : ") + @@ -2401,6 +2456,8 @@ void QAD_Desktop::onDispatchTools(int id) dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; dir = QAD_Tools::addSlash(dir) ; + dir = dir + "salome" ; + dir = QAD_Tools::addSlash(dir) ; #ifdef WNT dir = dir + "libToolsGUI.dll" ; #else @@ -2418,6 +2475,8 @@ void QAD_Desktop::onDispatchTools(int id) dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; dir = QAD_Tools::addSlash(dir) ; + dir = dir + "salome" ; + dir = QAD_Tools::addSlash(dir) ; #ifdef WNT dir = dir + "libToolsGUI.dll" ; #else @@ -2438,6 +2497,8 @@ void QAD_Desktop::onDispatchTools(int id) dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; dir = QAD_Tools::addSlash(dir) ; + dir = dir + "salome" ; + dir = QAD_Tools::addSlash(dir) ; dir = dir + QAD_XmlHandler::_bibmap[ id ].latin1() ; MESSAGE ( " GUI library = " << dir ); fileInfo.setFile(dir) ; @@ -2451,6 +2512,8 @@ void QAD_Desktop::onDispatchTools(int id) dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; dir = QAD_Tools::addSlash(dir) ; + dir = dir + "salome" ; + dir = QAD_Tools::addSlash(dir) ; dir = dir + QAD_XmlHandler::_bibmap[ id ].latin1() ; MESSAGE ( " GUI library = " << dir ); fileInfo.setFile(dir) ; @@ -2533,7 +2596,7 @@ void QAD_Desktop::onComboActiveComponent( const QString & component, bool isLoad } myActiveStudy->Selection( component ); - if ( !loadComponent(component) ) { + if ( !loadComponent(mapComponentName[component]) ) { myCombo->setCurrentItem (0); for ( QToolButton* aButton=myComponentButton.first(); aButton; aButton=myComponentButton.next() ) { aButton->setOn(false); @@ -2554,7 +2617,7 @@ void QAD_Desktop::onComboActiveComponent( const QString & component, bool isLoad } // Open new component's data in active study if any - if(isLoadData) loadComponentData(component); + if(isLoadData) loadComponentData(mapComponentName[component]); oldSel->Clear(); myActiveStudy->updateObjBrowser(true); diff --git a/src/SALOMEGUI/QAD_Desktop.h b/src/SALOMEGUI/QAD_Desktop.h index 9b577de96..8b70808a9 100644 --- a/src/SALOMEGUI/QAD_Desktop.h +++ b/src/SALOMEGUI/QAD_Desktop.h @@ -192,6 +192,9 @@ public: Engines::Component_var getEngine(const char *containerName, const char *componentName); + QString getComponentName(const char *componentUserName); + QString getComponentUserName(const char *componentName); + QAD_HelpWindow* getHelpWindow(); void onMouseMove(QMouseEvent*); @@ -327,6 +330,8 @@ protected: QList myComponentButton; + QMap mapComponentName; + private: static QAD_ResourceMgr* resourceMgr; static QPalette* palette; diff --git a/src/SALOMEGUI/QAD_ObjectBrowser.cxx b/src/SALOMEGUI/QAD_ObjectBrowser.cxx index 9ed2eb23b..b7c79346b 100644 --- a/src/SALOMEGUI/QAD_ObjectBrowser.cxx +++ b/src/SALOMEGUI/QAD_ObjectBrowser.cxx @@ -669,8 +669,8 @@ void QAD_ObjectBrowser::Update( SALOMEDS::SObject_ptr SO, QString msg; QAD_ResourceMgr* resMgr = QAD_Desktop::createResourceManager(); if ( resMgr ) { - if(resMgr->loadResources( QString(aFatherName->Value()) + "GUI", msg )) { - QPixmap icon ( resMgr->loadPixmap( QString(aFatherName->Value()) + "GUI", + if(resMgr->loadResources( QAD_Application::getDesktop()->getComponentName(QString(aFatherName->Value())), msg )) { + QPixmap icon ( resMgr->loadPixmap( QAD_Application::getDesktop()->getComponentName(QString(aFatherName->Value())), tr(aPixmap->GetPixMap()) /*tr( "ICON_OBJBROWSER_" + theComponent )*/ )); Item->setPixmap( 0, icon ); } @@ -804,8 +804,8 @@ void QAD_ObjectBrowser::Update() if ( resMgr ) { MESSAGE ( " Component " << aName->Value() ) MESSAGE ( " Icon " << aPixmap->GetPixMap() ) - if(resMgr->loadResources( QString(aName->Value()) + "GUI", msg )) { - QPixmap icon ( resMgr->loadPixmap( QString(aName->Value()) + "GUI", + if(resMgr->loadResources( QAD_Application::getDesktop()->getComponentName(QString(aName->Value())), msg )) { + QPixmap icon ( resMgr->loadPixmap( QAD_Application::getDesktop()->getComponentName(QString(aName->Value())), tr(aPixmap->GetPixMap()) /*tr( "ICON_OBJBROWSER_" + theComponent )*/ )); Item->setPixmap( 0, icon ); } @@ -1030,8 +1030,8 @@ void QAD_ObjectBrowser::UpdateUCItem( SALOMEDS::SObject_var UCObject, QAD_Object QAD_ResourceMgr* resMgr = QAD_Desktop::getResourceManager(); if ( resMgr ) { QString msg; - if( resMgr->loadResources( QString( aFatherName->Value() ) + "GUI", msg ) ) { - QPixmap icon ( resMgr->loadPixmap( QString( aFatherName->Value() ) + "GUI", + if( resMgr->loadResources( QAD_Application::getDesktop()->getComponentName(QString( aFatherName->Value() )), msg ) ) { + QPixmap icon ( resMgr->loadPixmap( QAD_Application::getDesktop()->getComponentName(QString( aFatherName->Value() )), tr( aPixmap->GetPixMap() ) /*tr( "ICON_OBJBROWSER_" + theComponent )*/ ) ); UCSubItem->setPixmap( 0, icon ); } diff --git a/src/SALOMEGUI/QAD_ResourceMgr.cxx b/src/SALOMEGUI/QAD_ResourceMgr.cxx index 19ce185d3..3e61d033e 100644 --- a/src/SALOMEGUI/QAD_ResourceMgr.cxx +++ b/src/SALOMEGUI/QAD_ResourceMgr.cxx @@ -234,6 +234,24 @@ QString QAD_ResourceMgr::collectDirs( const QString& prefix ) const QString dir; char* cenv; + if ( !prefix.isEmpty() ) { + envVar = prefix.latin1() + QCString( "_ROOT_DIR" ); + cenv = getenv( ( const char* ) envVar ); + if ( cenv ) { + dir.sprintf( "%s", cenv ); + if ( !dir.isEmpty() ) { + dir = QAD_Tools::addSlash(dir) ; + dir = dir + "share" ; + dir = QAD_Tools::addSlash(dir) ; + dir = dir + "salome" ; + dir = QAD_Tools::addSlash(dir) ; + dir = dir + "resources" ; + dir = QAD_Tools::addSlash(dir) ; + dirList.append( dirList.isEmpty() ? dir : ( QString( SEPARATOR ) + dir ) ); + } + } + } + // Try CSF_Resources env.var directory ( or directory list ) if ( !prefix.isEmpty() ) { envVar = QCString( "CSF_" ) + prefix.latin1() + QCString( "Resources" ); @@ -294,6 +312,22 @@ QString QAD_ResourceMgr::collectDirs( const QString& prefix ) const dirList.append( dirList.isEmpty() ? dir : ( QString( SEPARATOR ) + dir ) ); } } + + // Try ${KERNEL_ROOT_DIR}/share/salome/resources directory + cenv = getenv( "KERNEL_ROOT_DIR" ); + if ( cenv ) { + dir.sprintf( "%s", cenv ); + if ( !dir.isEmpty() ) { + dir = QAD_Tools::addSlash(dir) ; + dir = dir + "share" ; + dir = QAD_Tools::addSlash(dir) ; + dir = dir + "salome" ; + dir = QAD_Tools::addSlash(dir) ; + dir = dir + "resources" ; + dir = QAD_Tools::addSlash(dir) ; + dirList.append( dirList.isEmpty() ? dir : ( QString( SEPARATOR ) + dir ) ); + } + } //MESSAGE("QAD_ResourceMgr::collectDirs : "<getComponentName( ComponentUserName ); +} +/*! + Returns the user name of component. +*/ +const char* SALOMEGUI_Swig::getComponentUserName( const char* ComponentName ) +{ + return QAD_Application::getDesktop()->getComponentUserName( ComponentName ); +} + /*! Returns the number of selected objects. */ diff --git a/src/SALOMEGUI/SALOMEGUI_Swig.hxx b/src/SALOMEGUI/SALOMEGUI_Swig.hxx index a3e6fd951..341abca2e 100644 --- a/src/SALOMEGUI/SALOMEGUI_Swig.hxx +++ b/src/SALOMEGUI/SALOMEGUI_Swig.hxx @@ -51,6 +51,10 @@ public: /* check */ bool IsInCurrentView(const char *Entry); +/* component name */ + const char* getComponentName( const char* ComponentUserName ); + const char* getComponentUserName( const char* ComponentName ); + protected: int _studyId; QString _name; diff --git a/src/SALOMEGUI/SALOMEGUI_Swig.i b/src/SALOMEGUI/SALOMEGUI_Swig.i index 65db31489..b1df59b53 100644 --- a/src/SALOMEGUI/SALOMEGUI_Swig.i +++ b/src/SALOMEGUI/SALOMEGUI_Swig.i @@ -60,4 +60,7 @@ class SALOMEGUI_Swig /* check */ bool IsInCurrentView(const char *Entry); +/* component name */ + const char* getComponentName( const char* ComponentUserName ); + const char* getComponentUserName( const char* ComponentName ); }; diff --git a/src/SALOME_SWIG/salome.py b/src/SALOME_SWIG/salome.py index 70e706dfb..5e585358c 100644 --- a/src/SALOME_SWIG/salome.py +++ b/src/SALOME_SWIG/salome.py @@ -62,7 +62,7 @@ def ImportComponentGUI(ComponentName): libName = "lib" + ComponentName + "_Swig" command = "from " + libName + " import *" exec ( command ) - constructor = ComponentName + "GUI_Swig()" + constructor = ComponentName + "_Swig()" command = "gui = " + constructor exec ( command ) return gui diff --git a/src/SALOME_SWIG/salome_shared_modules.py b/src/SALOME_SWIG/salome_shared_modules.py index 8b3fa2e82..e39cfb7e7 100644 --- a/src/SALOME_SWIG/salome_shared_modules.py +++ b/src/SALOME_SWIG/salome_shared_modules.py @@ -46,21 +46,37 @@ import glob,os,sys repertoire=os.path.dirname(__file__) path=[repertoire,] -SALOME_ROOT_DIR = os.getenv("SALOME_ROOT_DIR") -if SALOME_ROOT_DIR != None: - path.append(os.path.join(SALOME_ROOT_DIR,"lib","python"+sys.version[:3],"site-packages","salome")) - -SALOME_SITE_DIR = os.getenv("SALOME_SITE_DIR") -if SALOME_SITE_DIR != None: - SALOME_SITE_NAME = os.getenv("SALOME_SITE_NAME") - if SALOME_SITE_NAME != None: - path.append(os.path.join(SALOME_SITE_DIR,"lib","python"+sys.version[:3],"site-packages",SALOME_SITE_NAME)) - -#path=[repertoire, -# os.path.join(repertoire,"..","lib","python"+sys.version[:3],"site-packages","salome"), -# os.path.join(SALOME_ROOT_DIR,"lib","python"+sys.version[:3],"site-packages","salome"), -# os.path.join(SALOME_SITE_DIR,"lib","python"+sys.version[:3],"site-packages","salome"), -# ] +KERNEL_ROOT_DIR = os.getenv("KERNEL_ROOT_DIR") +if KERNEL_ROOT_DIR != None: + path.append(os.path.join(KERNEL_ROOT_DIR,"lib","python"+sys.version[:3],"site-packages","salome")) + + +# +import SALOME_ModuleCatalog +from SALOME_NamingServicePy import * +orb = CORBA.ORB_init([''], CORBA.ORB_ID) +ns = SALOME_NamingServicePy_i(orb) +modulecatalog = ns.Resolve('/Kernel/ModulCatalog') +compos = [] +compos = modulecatalog.GetComponentList() + +for name in compos: + print name + MODULE_ROOT_DIR = os.getenv( name + "_ROOT_DIR" ) + print MODULE_ROOT_DIR + + if MODULE_ROOT_DIR != None: + path.append(os.path.join(MODULE_ROOT_DIR,"lib","python"+sys.version[:3],"site-packages","salome")) + +#SALOME_ROOT_DIR = os.getenv("SALOME_ROOT_DIR") +#if SALOME_ROOT_DIR != None: +# path.append(os.path.join(SALOME_ROOT_DIR,"lib","python"+sys.version[:3],"site-packages","salome")) + +#SALOME_SITE_DIR = os.getenv("SALOME_SITE_DIR") +#if SALOME_SITE_DIR != None: +# SALOME_SITE_NAME = os.getenv("SALOME_SITE_NAME") +# if SALOME_SITE_NAME != None: +# path.append(os.path.join(SALOME_SITE_DIR,"lib","python"+sys.version[:3],"site-packages",SALOME_SITE_NAME)) MESSAGE( str(path) )