diff options
author | Monroe Williams <monroe@lindenlab.com> | 2009-07-15 23:16:09 +0000 |
---|---|---|
committer | Monroe Williams <monroe@lindenlab.com> | 2009-07-15 23:16:09 +0000 |
commit | 09d9b0556e8cf6c0a716e5b2c78b265799486331 (patch) | |
tree | 24804ab9dd0528f67acf1b7fd0457f1a3c6f6b5f /indra/llvfs | |
parent | 408bed3d6b01d654d460b9ee0d929370194d8f9a (diff) |
svn merge -r 127173:127174 svn+ssh://svn.lindenlab.com/svn/linden/branches/pluginapi/pluginapi_04
Cherry-picking a change to the code that uses the copy of skins in the development tree instead of the version in the app bundle on the mac.
Reviewed by James.
Diffstat (limited to 'indra/llvfs')
-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 |
5 files changed, 22 insertions, 21 deletions
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; |