diff options
-rw-r--r-- | indra/integration_tests/llui_libtest/llui_libtest.cpp | 2 | ||||
-rw-r--r-- | indra/llvfs/lldir.cpp | 19 | ||||
-rw-r--r-- | indra/llvfs/lldir.h | 1 | ||||
-rw-r--r-- | indra/llvfs/lldir_linux.cpp | 2 | ||||
-rw-r--r-- | indra/llvfs/lldir_mac.cpp | 19 | ||||
-rw-r--r-- | indra/llvfs/lldir_win32.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llfloateruipreview.cpp | 2 |
7 files changed, 24 insertions, 23 deletions
diff --git a/indra/integration_tests/llui_libtest/llui_libtest.cpp b/indra/integration_tests/llui_libtest/llui_libtest.cpp index 481dd93493..e0117eca06 100644 --- a/indra/integration_tests/llui_libtest/llui_libtest.cpp +++ b/indra/integration_tests/llui_libtest/llui_libtest.cpp @@ -102,7 +102,7 @@ public: static std::string get_xui_dir() { std::string delim = gDirUtilp->getDirDelimiter(); - return gDirUtilp->getAppRODataDir() + delim + std::string("skins") + delim + "default" + delim + "xui" + delim; + return gDirUtilp->getSkinBaseDir() + delim + "default" + delim + "xui" + delim; } void init_llui() diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index 54af8b43ad..0c65047d4d 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -293,11 +293,7 @@ const std::string& LLDir::getDefaultSkinDir() const const std::string LLDir::getSkinBaseDir() const { - std::string dir = getAppRODataDir(); - dir += mDirDelimiter; - dir += "skins"; - - return dir; + return mSkinBaseDir; } @@ -385,9 +381,7 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd break; case LL_PATH_SKINS: - prefix = getAppRODataDir(); - prefix += mDirDelimiter; - prefix += "skins"; + prefix = getSkinBaseDir(); break; case LL_PATH_LOCAL_ASSETS: @@ -612,9 +606,7 @@ void LLDir::setPerAccountChatLogsDir(const std::string &first, const std::string void LLDir::setSkinFolder(const std::string &skin_folder) { - mSkinDir = getAppRODataDir(); - mSkinDir += mDirDelimiter; - mSkinDir += "skins"; + mSkinDir = getSkinBaseDir(); mSkinDir += mDirDelimiter; mSkinDir += skin_folder; @@ -628,9 +620,7 @@ void LLDir::setSkinFolder(const std::string &skin_folder) // base skin which is used as fallback for all skinned files // e.g. c:\program files\secondlife\skins\default - mDefaultSkinDir = getAppRODataDir(); - mDefaultSkinDir += mDirDelimiter; - mDefaultSkinDir += "skins"; + mDefaultSkinDir = getSkinBaseDir(); mDefaultSkinDir += mDirDelimiter; mDefaultSkinDir += "default"; } @@ -675,6 +665,7 @@ void LLDir::dumpCurrentDirectories() LL_DEBUGS2("AppInit","Directories") << " LindenUserDir: " << getLindenUserDir() << LL_ENDL; LL_DEBUGS2("AppInit","Directories") << " TempDir: " << getTempDir() << LL_ENDL; LL_DEBUGS2("AppInit","Directories") << " CAFile: " << getCAFile() << LL_ENDL; + LL_DEBUGS2("AppInit","Directories") << " SkinBaseDir: " << getSkinBaseDir() << LL_ENDL; LL_DEBUGS2("AppInit","Directories") << " SkinDir: " << getSkinDir() << LL_ENDL; #if LL_LIBXUL_ENABLED diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h index a33f7a2914..a1f9df007d 100644 --- a/indra/llvfs/lldir.h +++ b/indra/llvfs/lldir.h @@ -161,6 +161,7 @@ protected: std::string mDefaultCacheDir; // default cache diretory std::string mOSCacheDir; // operating system cache dir std::string mDirDelimiter; + std::string mSkinBaseDir; // Base for skins paths. std::string mSkinDir; // Location for current skin info. std::string mDefaultSkinDir; // Location for default skin info. std::string mUserSkinDir; // Location for user-modified skin info. diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp index 2d724f0f9f..d7a0dc8528 100644 --- a/indra/llvfs/lldir_linux.cpp +++ b/indra/llvfs/lldir_linux.cpp @@ -99,6 +99,7 @@ LLDir_Linux::LLDir_Linux() #else mAppRODataDir = tmp_str; #endif + mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins"; mOSUserDir = getCurrentUserHome(tmp_str); mOSUserAppDir = ""; mLindenUserDir = tmp_str; @@ -146,6 +147,7 @@ void LLDir_Linux::initAppDirs(const std::string &app_name, if (!app_read_only_data_dir.empty()) { mAppRODataDir = app_read_only_data_dir; + mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins"; } mAppName = app_name; diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp index f53c62580f..7f703464bc 100644 --- a/indra/llvfs/lldir_mac.cpp +++ b/indra/llvfs/lldir_mac.cpp @@ -142,24 +142,28 @@ LLDir_Mac::LLDir_Mac() CFURLRefToLLString(executableParentURLRef, mExecutableDir, true); // mAppRODataDir - // *NOTE: When running in a dev tree, use the copy of app_settings and + + CFURLRef resourcesURLRef = CFBundleCopyResourcesDirectoryURL(mainBundleRef); + CFURLRefToLLString(resourcesURLRef, mAppRODataDir, true); + + // *NOTE: When running in a dev tree, use the copy of // skins in indra/newview/ rather than in the application bundle. This // mirrors Windows dev environment behavior and allows direct checkin // of edited skins/xui files. JC + U32 indra_pos = mExecutableDir.find("/indra"); if (indra_pos != std::string::npos) { // ...we're in a dev checkout - mAppRODataDir = mExecutableDir.substr(0, indra_pos) - + "/indra/newview"; - llinfos << "Running in dev checkout with mAppRODataDir " - << mAppRODataDir << llendl; + mSkinBaseDir = mExecutableDir.substr(0, indra_pos) + + "/indra/newview/skins"; + llinfos << "Running in dev checkout with mSkinBaseDir " + << mSkinBaseDir << llendl; } else { // ...normal installation running - CFURLRef resourcesURLRef = CFBundleCopyResourcesDirectoryURL(mainBundleRef); - CFURLRefToLLString(resourcesURLRef, mAppRODataDir, true); + mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins"; } // mOSUserDir @@ -227,6 +231,7 @@ void LLDir_Mac::initAppDirs(const std::string &app_name, if (!app_read_only_data_dir.empty()) { mAppRODataDir = app_read_only_data_dir; + mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins"; } mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem"); diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp index 1fdd31c635..da80a95922 100644 --- a/indra/llvfs/lldir_win32.cpp +++ b/indra/llvfs/lldir_win32.cpp @@ -130,6 +130,7 @@ LLDir_Win32::LLDir_Win32() else mAppRODataDir = mExecutableDir; + mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins"; // Build the default cache directory mDefaultCacheDir = buildSLOSCacheDir(); @@ -158,6 +159,7 @@ void LLDir_Win32::initAppDirs(const std::string &app_name, if (!app_read_only_data_dir.empty()) { mAppRODataDir = app_read_only_data_dir; + mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins"; } mAppName = app_name; mOSUserAppDir = mOSUserDir; diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 599f1598cf..41e9ee3ccd 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -82,7 +82,7 @@ static LLDefaultChildRegistry::Register<LLOverlapPanel> register_overlap_panel(" static std::string get_xui_dir() { std::string delim = gDirUtilp->getDirDelimiter(); - return gDirUtilp->getAppRODataDir() + delim + std::string("skins") + delim + "default" + delim + "xui" + delim; + return gDirUtilp->getSkinBaseDir() + delim + "default" + delim + "xui" + delim; } // Localization reset forcer -- ensures that when localization is temporarily changed for previewed floater, it is reset |