X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Flibrary%2Fconfiguration%2Fapplication_configuration.cpp;h=51df2a82bf1803ad6fb78c4456555938f5244443;hb=2d2b1d669337dd8843f785c2f3d9c6048f730252;hp=d5ca0802568d1676fcf733fc50a258e54ba51594;hpb=9c71eb9a29db75fcc1e6376e32a96ea8cf07006a;p=feisty_meow.git diff --git a/nucleus/library/configuration/application_configuration.cpp b/nucleus/library/configuration/application_configuration.cpp index d5ca0802..51df2a82 100644 --- a/nucleus/library/configuration/application_configuration.cpp +++ b/nucleus/library/configuration/application_configuration.cpp @@ -290,6 +290,34 @@ const astring &application_configuration::GLOBAL_SECTION_NAME() { STATIC_STRING( const astring &application_configuration::LOGGING_FOLDER_NAME() { STATIC_STRING("LogPath"); } +const astring &application_configuration::WINDOZE_VIRTUAL_ROOT_NAME() +{ STATIC_STRING("VirtualUnixRoot"); } + +const astring &application_configuration::DEFAULT_VIRTUAL_UNIX_ROOT() +{ STATIC_STRING("c:/cygwin"); } + +////////////// + +astring application_configuration::get_virtual_unix_root() +{ +#ifdef __UNIX__ + // simple implementation for unix/linux; just tell the truth about the real root. + return "/"; +#endif +#ifdef __WIN32__ + /* + read the path out of the config file, which should have been set during the + build process if this is really windows. + */ + astring virtual_root = read_item(WINDOZE_VIRTUAL_ROOT_NAME()); + if (!virtual_root) { + // if it has no length, we didn't get our setting! we'll limp along with a guess. + return DEFAULT_VIRTUAL_UNIX_ROOT; + } + +#endif +} + ////////////// ////const int MAX_LOG_PATH = 512;