-
-std::string SauvLoaderTest::getResourceFile( const std::string& filename )
-{
- std::string resourceFile = "";
-
- if ( getenv("top_srcdir") ) {
- // we are in 'make test' step
- resourceFile = getenv("top_srcdir");
- resourceFile += "/resources/";
- }
- else if ( getenv("MED_ROOT_DIR") ) {
- // use MED_ROOT_DIR env.var
- resourceFile = getenv("MED_ROOT_DIR");
- resourceFile += "/share/salome/resources/med/";
- }
- resourceFile += filename;
-#ifdef WIN32
- std::string fixedpath = resourceFile;
- for ( int i=0; i < fixedpath.length(); ++i )
- if (fixedpath[i] == '/')
- fixedpath[i] = '\\';
- return fixedpath;
-#endif
- return resourceFile;
-}