In dev checkouts, AppViewer now sets AppRoDataDir to newview

Crossplatform, settings, windlights, skins, the works~
No more copying~ <3
This commit is contained in:
Lirusaito
2019-03-26 02:23:51 -04:00
parent a8f85f0d91
commit f2b39196a0
4 changed files with 20 additions and 45 deletions

View File

@@ -566,11 +566,25 @@ LLAppViewer::LLAppViewer() :
LL_ERRS() << "Oh no! An instance of LLAppViewer already exists! LLAppViewer is sort of like a singleton." << LL_ENDL;
}
mDumpPath ="";
mDumpPath.clear();
// Need to do this initialization before we do anything else, since anything
// that touches files should really go through the lldir API
gDirUtilp->initAppDirs("SecondLife");
{
std::string newview_path;
const auto& exe_dir = gDirUtilp->getExecutableDir();
auto build_dir_pos = exe_dir.rfind("build-");
if (build_dir_pos != std::string::npos)
{
// ...we're in a dev checkout
newview_path = gDirUtilp->add(gDirUtilp->add(exe_dir.substr(0, build_dir_pos), "indra"), "newview");
if (LLFile::isdir(newview_path))
LL_INFOS() << "Running in dev checkout with newview " << newview_path << LL_ENDL;
else newview_path.clear();
}
gDirUtilp->initAppDirs("SecondLife", newview_path);
}
sInstance = this;
}