mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-26 11:00:32 +05:00
Add a more comfort way to specify path to user ImportExport file
This commit is contained in:
parent
07eea7bf99
commit
fa93d888ac
@ -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")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user