Add a more comfort way to specify path to user ImportExport file

This commit is contained in:
eap 2005-08-30 12:50:44 +00:00
parent 07eea7bf99
commit fa93d888ac

View File

@ -358,12 +358,21 @@ Standard_Boolean GEOMImpl_IInsertOperations::InitResMgr()
#else
aResDir += "/share/salome/resources";
#endif
TCollection_AsciiString aUserResDir (getenv("HOME"));
char * dir = getenv("GEOM_ENGINE_RESOURCES_DIR");
TCollection_AsciiString aUserResDir;
if ( dir )
{
aUserResDir = dir;
}
else
{
aUserResDir = getenv("HOME");
#ifdef WNT
aUserResDir += "\\.salome\\resources";
aUserResDir += "\\.salome\\resources";
#else
aUserResDir += "/.salome/resources";
aUserResDir += "/.salome/resources";
#endif
}
myResMgr = new Resource_Manager ("ImportExport", aResDir, aUserResDir, Standard_False);
if (!myResMgr->Find("Import") && !myResMgr->Find("Export")) {