Conflicts:
	indra/newview/llnetmap.cpp
This commit is contained in:
Shyotl
2014-08-05 18:17:13 -05:00
446 changed files with 25784 additions and 9117 deletions

View File

@@ -301,19 +301,19 @@ void LLDir::setDumpDir( const std::string& path )
const std::string &LLDir::getDumpDir() const
{
if (sDumpDir.empty() )
{
if (sDumpDir.empty() )
{
/* Singu Note: don't generate a different dump dir each time
LLUUID uid;
uid.generate();
sDumpDir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "")
+ "dump-" + uid.asString();
LLUUID uid;
uid.generate();
sDumpDir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "")
+ "dump-" + uid.asString();
*/
sDumpDir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "") + "singularity-debug";
dir_exists_or_crash(sDumpDir);
}
sDumpDir = getExpandedFilename(LL_PATH_LOGS, "") + "singularity-debug";
dir_exists_or_crash(sDumpDir);
}
return LLDir::sDumpDir;
}
@@ -710,6 +710,33 @@ void LLDir::setLindenUserDir(const std::string &grid, const std::string &first,
dumpCurrentDirectories();
}
void LLDir::makePortable()
{
std::string dir = mExecutableDir;
dir.erase(dir.rfind(mDirDelimiter)); // Go one level up
dir += mDirDelimiter + "portable_viewer";
if (LLFile::mkdir(dir) == -1)
{
if (errno != EEXIST)
{
llwarns << "Couldn't create portable_viewer directory." << llendl;
return; // Failed, don't mess anything up.
}
}
mOSUserDir = dir + mDirDelimiter + "settings";
mOSCacheDir = dir + mDirDelimiter + "cache";
if (LLFile::mkdir(mOSUserDir) == -1 || LLFile::mkdir(mOSCacheDir) == -1)
{
if (errno != EEXIST)
{
llwarns << "Couldn't create portable_viewer cache and settings directories." << llendl;
return; // Failed, don't mess up the existing initialization.
}
}
mDefaultCacheDir = buildSLOSCacheDir();
initAppDirs(mAppName); // This is kinda lazy, but it's probably the quickest, most uniform way.
}
void LLDir::setChatLogsDir(const std::string &path)
{
if (!path.empty() )

View File

@@ -133,6 +133,7 @@ class LLDir
static std::string getForbiddenFileChars();
void setDumpDir( const std::string& path );
void makePortable();
virtual void setChatLogsDir(const std::string &path); // Set the chat logs dir to this user's dir
virtual void setPerAccountChatLogsDir(const std::string &grid, const std::string &first, const std::string &last); // Set the per user chat log directory.
virtual void setLindenUserDir(const std::string& grid, const std::string& first, const std::string& last); // Set the linden user dir to this user's dir

View File

@@ -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();