Portability Mode!

Just add --portable to the shortcut
or use the provided shortcut as a template,
though it's likely the provided shortcut will not work on other computers, because the drive letter will change
This commit is contained in:
Inusaito Sayori
2014-06-09 00:00:43 -04:00
parent fb7751360c
commit e46fc0a805
5 changed files with 54 additions and 0 deletions

View File

@@ -253,6 +253,12 @@
<string>UserConnectionPort</string>
</map>
<key>portable</key>
<map>
<key>count</key>
<integer>0</integer>
</map>
<key>purge</key>
<map>
<key>desc</key>

View File

@@ -805,6 +805,8 @@ CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \
"$INSTDIR\$INSTEXE" "$INSTFLAGS $SHORTCUT_LANG_PARAM"
CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \
"$INSTDIR\$INSTEXE" "$INSTFLAGS $SHORTCUT_LANG_PARAM"
CreateShortCut "$INSTDIR\$INSTSHORTCUT Portable.lnk" \
"$INSTDIR\$INSTEXE" "$INSTFLAGS $SHORTCUT_LANG_PARAM --portable"
CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \
'"$INSTDIR\uninst.exe"' ''

View File

@@ -1938,6 +1938,7 @@ void errorCallback(const std::string &error_string)
}
}
bool init_logging();
bool LLAppViewer::initLogging()
{
//
@@ -1947,6 +1948,10 @@ bool LLAppViewer::initLogging()
gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
LLError::setFatalFunction(errorCallback);
return init_logging();
}
bool init_logging()
{
// Remove the last ".old" log file.
std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, OLD_LOG_FILE);
LLFile::remove(old_log_file);
@@ -2207,6 +2212,19 @@ bool LLAppViewer::initConfiguration()
// - selectively apply settings
// <singu> Portability Mode!
if (clp.hasOption("portable"))
{
const std::string log = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, LOG_FILE);
llinfos << "Attempting to use portable settings and cache!" << llendl;
gDirUtilp->makePortable();
init_logging(); // Switch to portable log file
llinfos << "Portable viewer configuration initialized!" << llendl;
LLFile::remove(log);
llinfos << "Cleaned up local log file to keep this computer untouched." << llendl;
}
// </singu>
// If the user has specified a alternate settings file name.
// Load it now before loading the user_settings/settings.xml
if(clp.hasOption("settings"))