From 27301aa5461ccc8e1e16edd6438875ecd701065d Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 19 Apr 2011 23:46:18 +0300 Subject: STORM-1182 FIX Fixed XUI Preview tool not loading XML files from a dev checkout on Linux. The bug seems to be caused by recent switch to Autobuild, which affected the build directory path. --- indra/llvfs/lldir_linux.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp index 73f2336f94..ae25ab2f21 100644 --- a/indra/llvfs/lldir_linux.cpp +++ b/indra/llvfs/lldir_linux.cpp @@ -93,11 +93,11 @@ LLDir_Linux::LLDir_Linux() #else mAppRODataDir = tmp_str; #endif - std::string::size_type indra_pos = mExecutableDir.find("/indra"); - if (indra_pos != std::string::npos) + std::string::size_type build_dir_pos = mExecutableDir.find("/build-linux-"); + if (build_dir_pos != std::string::npos) { // ...we're in a dev checkout - mSkinBaseDir = mExecutableDir.substr(0, indra_pos) + "/indra/newview/skins"; + mSkinBaseDir = mExecutableDir.substr(0, build_dir_pos) + "/indra/newview/skins"; llinfos << "Running in dev checkout with mSkinBaseDir " << mSkinBaseDir << llendl; } -- cgit v1.2.3 From 95f41fbd9beda8089531bee5827a1eeba076ba6f Mon Sep 17 00:00:00 2001 From: Boroondas Gupte Date: Mon, 25 Apr 2011 13:46:31 +0200 Subject: STORM-1182 FIX Fixed XUI Preview tool not loading XML files from a dev checkout on Mac. Ported Vadim's STORM-1182 fix for Linux (3d30b2bc1369) to the corresponding Mac file. --- doc/contributions.txt | 1 + indra/llvfs/lldir_mac.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index e7db8c0ded..3b579f8ae3 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -204,6 +204,7 @@ Boroondas Gupte SNOW-624 SNOW-737 STORM-318 + STORM-1182 VWR-233 VWR-20583 VWR-20891 diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp index 445285aa43..e862ef0d84 100644 --- a/indra/llvfs/lldir_mac.cpp +++ b/indra/llvfs/lldir_mac.cpp @@ -150,11 +150,11 @@ LLDir_Mac::LLDir_Mac() CFURLRef resourcesURLRef = CFBundleCopyResourcesDirectoryURL(mainBundleRef); CFURLRefToLLString(resourcesURLRef, mAppRODataDir, true); - U32 indra_pos = mExecutableDir.find("/indra"); - if (indra_pos != std::string::npos) + U32 build_dir_pos = mExecutableDir.find("/build-darwin-"); + if (build_dir_pos != std::string::npos) { // ...we're in a dev checkout - mSkinBaseDir = mExecutableDir.substr(0, indra_pos) + mSkinBaseDir = mExecutableDir.substr(0, build_dir_pos) + "/indra/newview/skins"; llinfos << "Running in dev checkout with mSkinBaseDir " << mSkinBaseDir << llendl; -- cgit v1.2.3 From c18e2f74b0f98bc772cb4cdcda17e598971b8b62 Mon Sep 17 00:00:00 2001 From: Boroondas Gupte Date: Tue, 26 Apr 2011 22:22:33 +0200 Subject: STORM-1182 Use string::rfind instead of string::find ... so the last occurance of the build prefix in the executable path will be matched. This should avoid cuttung too much subdirs away if someone checks out the source to a path already containing "/build-darwin-" or "/build-linux-". --- indra/llvfs/lldir_linux.cpp | 2 +- indra/llvfs/lldir_mac.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp index ae25ab2f21..72b54f5380 100644 --- a/indra/llvfs/lldir_linux.cpp +++ b/indra/llvfs/lldir_linux.cpp @@ -93,7 +93,7 @@ LLDir_Linux::LLDir_Linux() #else mAppRODataDir = tmp_str; #endif - std::string::size_type build_dir_pos = mExecutableDir.find("/build-linux-"); + std::string::size_type build_dir_pos = mExecutableDir.rfind("/build-linux-"); if (build_dir_pos != std::string::npos) { // ...we're in a dev checkout diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp index e862ef0d84..f9369b043e 100644 --- a/indra/llvfs/lldir_mac.cpp +++ b/indra/llvfs/lldir_mac.cpp @@ -150,7 +150,7 @@ LLDir_Mac::LLDir_Mac() CFURLRef resourcesURLRef = CFBundleCopyResourcesDirectoryURL(mainBundleRef); CFURLRefToLLString(resourcesURLRef, mAppRODataDir, true); - U32 build_dir_pos = mExecutableDir.find("/build-darwin-"); + U32 build_dir_pos = mExecutableDir.rfind("/build-darwin-"); if (build_dir_pos != std::string::npos) { // ...we're in a dev checkout -- cgit v1.2.3