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 #else
aResDir += "/share/salome/resources"; aResDir += "/share/salome/resources";
#endif #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 #ifdef WNT
aUserResDir += "\\.salome\\resources"; aUserResDir += "\\.salome\\resources";
#else #else
aUserResDir += "/.salome/resources"; aUserResDir += "/.salome/resources";
#endif #endif
}
myResMgr = new Resource_Manager ("ImportExport", aResDir, aUserResDir, Standard_False); myResMgr = new Resource_Manager ("ImportExport", aResDir, aUserResDir, Standard_False);
if (!myResMgr->Find("Import") && !myResMgr->Find("Export")) { if (!myResMgr->Find("Import") && !myResMgr->Find("Export")) {