From 861f88dd304646e11b96131dfe6b7d94291d83b1 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Tue, 15 Apr 2014 20:06:08 -0400 Subject: [PATCH] Awesomeness, yayayay! (allows XML changes in indra/newview/skins/ to count for viewer running from a directory in indra on Windows) --- indra/llvfs/lldir_win32.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp index 1289085b7..f611c6594 100644 --- a/indra/llvfs/lldir_win32.cpp +++ b/indra/llvfs/lldir_win32.cpp @@ -156,8 +156,6 @@ LLDir_Win32::LLDir_Win32() mAppRODataDir = mWorkingDir; -// if (mExecutableDir.find("indra") == std::string::npos) - // *NOTE:Mani - It is a mistake to put viewer specific code in // the LLDir implementation. The references to 'skins' and // 'llplugin' need to go somewhere else. @@ -172,7 +170,18 @@ LLDir_Win32::LLDir_Win32() llinfos << "mAppRODataDir = " << mAppRODataDir << llendl; - mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins"; + std::string::size_type build_dir_pos = mExecutableDir.rfind("indra" + mDirDelimiter); + 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"; + llinfos << "Running in dev checkout with mSkinBaseDir " << mSkinBaseDir << llendl; + } + else + { + // ...normal installation running + mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins"; + } // Build the default cache directory mDefaultCacheDir = buildSLOSCacheDir();