X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FConfig%2FConfig_XMLReader.cpp;h=1b206af8223add70ded12b6f69ca69a619f8d4f2;hb=6f64126a35fdc516fd74651dc55c7b5dfba96f8f;hp=89f0d46fcd40d60665bee539f3f356f4c0131033;hpb=263d0f7bef75e1979c33f0d5a3d3fbc3b71d76a1;p=modules%2Fshaper.git diff --git a/src/Config/Config_XMLReader.cpp b/src/Config/Config_XMLReader.cpp index 89f0d46fc..1b206af82 100644 --- a/src/Config/Config_XMLReader.cpp +++ b/src/Config/Config_XMLReader.cpp @@ -11,10 +11,12 @@ #include #include +/* #ifdef WIN32 //For GetModuleFileNameW #include #endif +*/ #ifdef _DEBUG #include @@ -23,6 +25,8 @@ Config_XMLReader::Config_XMLReader(const std::string& theXmlFileName) { std::string prefix; + /* the problem: application may be launched using python execuable, to use environment variable + (at least for the current moment) //Get path to *.xml files (typically ./bin/../plugins/) #ifdef WIN32 HMODULE hModule = GetModuleHandleW(NULL); @@ -40,6 +44,11 @@ Config_XMLReader::Config_XMLReader(const std::string& theXmlFileName) //TODO(sbh): Find full path to binary on linux prefix = "../plugins/"; #endif + */ + char* anEnv = getenv("NEW_GEOM_CONFIG_FILE"); + if (anEnv) { + prefix = std::string(anEnv) + "/"; + } myDocumentPath = prefix + theXmlFileName; } @@ -109,8 +118,6 @@ xmlNodePtr Config_XMLReader::findRoot() */ void Config_XMLReader::readRecursively(xmlNodePtr theParent) { - static Event_ID aFeatureEvent = Event_Loop::EventByName("Feature"); - if (!theParent) return; xmlNodePtr aNode = theParent->xmlChildrenNode; @@ -118,7 +125,6 @@ void Config_XMLReader::readRecursively(xmlNodePtr theParent) processNode(aNode); if (processChildren(aNode)) { readRecursively(aNode); - Config_FeatureMessage aMessage(aFeatureEvent, this); } } }