In dev checkouts, AppViewer now sets AppRoDataDir to newview
Crossplatform, settings, windlights, skins, the works~ No more copying~ <3
This commit is contained in:
@@ -93,22 +93,7 @@ LLDir_Linux::LLDir_Linux()
|
||||
#else
|
||||
mAppRODataDir = tmp_str;
|
||||
#endif
|
||||
std::string::size_type build_dir_pos = mExecutableDir.rfind("/build-linux-");
|
||||
if (build_dir_pos != std::string::npos)
|
||||
{
|
||||
// ...we're in a dev checkout
|
||||
mSkinBaseDir = mExecutableDir.substr(0, build_dir_pos) + "/indra/newview/skins";
|
||||
if (LLFile::isdir(mSkinBaseDir))
|
||||
LL_INFOS() << "Running in dev checkout with mSkinBaseDir "
|
||||
<< mSkinBaseDir << LL_ENDL;
|
||||
else
|
||||
mSkinBaseDir.clear();
|
||||
}
|
||||
if (mSkinBaseDir.empty())
|
||||
{
|
||||
// ...normal installation running
|
||||
mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins";
|
||||
}
|
||||
mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins";
|
||||
|
||||
mOSUserDir = getCurrentUserHome(tmp_str);
|
||||
mOSUserAppDir = "";
|
||||
|
||||
@@ -149,21 +149,8 @@ LLDir_Mac::LLDir_Mac()
|
||||
|
||||
CFURLRef resourcesURLRef = CFBundleCopyResourcesDirectoryURL(mainBundleRef);
|
||||
CFURLRefToLLString(resourcesURLRef, mAppRODataDir, true);
|
||||
|
||||
size_t build_dir_pos = mExecutableDir.rfind("/indra/build-darwin-");
|
||||
if (build_dir_pos != std::string::npos)
|
||||
{
|
||||
// ...we're in a dev checkout
|
||||
mSkinBaseDir = mExecutableDir.substr(0, build_dir_pos)
|
||||
+ "/indra/newview/skins";
|
||||
LL_INFOS() << "Running in dev checkout with mSkinBaseDir "
|
||||
<< mSkinBaseDir << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
// ...normal installation running
|
||||
mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins";
|
||||
}
|
||||
|
||||
mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins";
|
||||
|
||||
// mOSUserDir
|
||||
error = FSFindFolder(kUserDomain, kApplicationSupportFolderType, true, &fileRef);
|
||||
|
||||
@@ -140,18 +140,7 @@ LLDir_Win32::LLDir_Win32()
|
||||
|
||||
// LL_INFOS() << "mAppRODataDir = " << mAppRODataDir << LL_ENDL;
|
||||
|
||||
auto build_dir_pos = mExecutableDir.rfind("build-");
|
||||
if (build_dir_pos != std::string::npos)
|
||||
{
|
||||
// ...we're in a dev checkout
|
||||
mSkinBaseDir = mExecutableDir.substr(0, build_dir_pos) + "indra" + mDirDelimiter + "newview" + mDirDelimiter + "skins";
|
||||
if (LLFile::isdir(mSkinBaseDir))
|
||||
LL_INFOS() << "Running in dev checkout with mSkinBaseDir " << mSkinBaseDir << LL_ENDL;
|
||||
else mSkinBaseDir.clear();
|
||||
}
|
||||
|
||||
if (mSkinBaseDir.empty()) // ...normal installation running
|
||||
mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins";
|
||||
mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins";
|
||||
|
||||
// Build the default cache directory
|
||||
mDefaultCacheDir = buildSLOSCacheDir();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user