diff --git a/crlcore/src/ccore/Utilities.cpp b/crlcore/src/ccore/Utilities.cpp index 1861d530..c2313a0d 100644 --- a/crlcore/src/ccore/Utilities.cpp +++ b/crlcore/src/ccore/Utilities.cpp @@ -106,7 +106,7 @@ namespace { { Utilities::Path stratusMappingName ( p->asString() ); if ( not stratusMappingName.absolute() ) { - stratusMappingName = System::getPath("etc") / stratusMappingName; + stratusMappingName = System::getPath("coriolis_top") / stratusMappingName; } setenv ( "STRATUS_MAPPING_NAME", stratusMappingName.toString().c_str(), 1 ); } @@ -115,6 +115,7 @@ namespace { std::string environmentMapper ( std::string environmentName ) { if ( environmentName == "STRATUS_MAPPING_NAME" ) return "stratus_mapping_name"; + if ( environmentName == "CORIOLIS_TOP" ) return "coriolis_top"; return ""; } @@ -249,9 +250,13 @@ namespace CRL { || ( signal(SIGSEGV, System::_trapSig) == SIG_ERR ) ) System::_trapSig ( SIGTFLT ); + const char* coriolis_top = getenv("CORIOLIS_TOP"); + // Environment variables reading. boptions::options_description options ("Environment Variables"); options.add_options() + ( "coriolis_top", boptions::value()->default_value(coriolis_top) + , "Location of Corilois module." ) ( "stratus_mapping_name", boptions::value() , "Stratus virtual cells mapping." ); @@ -259,6 +264,10 @@ namespace CRL { boptions::store ( boptions::parse_environment(options,environmentMapper), arguments ); boptions::notify ( arguments ); + if ( arguments.count("coriolis_top") ) { + _pathes.insert ( make_pair("coriolis_top", arguments["coriolis_top"].as()) ); + } + Cfg::Configuration::get (); Cfg::getParamBool ("misc.catchCore" ,false )->registerCb ( this, catchCoreChanged );