summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2009-08-31 20:00:09 -0400
committerbrad kittenbrink <brad@lindenlab.com>2009-08-31 20:00:09 -0400
commit81d3f7ec6b348a08ad8c330d8d9ba90cd10ee816 (patch)
tree6a59eb227c061117346b7466b07e4dae41e1c5a8 /indra/newview
parent3df557435fa3e83a1d0f5f6880aab2e5e6a2ba13 (diff)
Post-merge cleanups (ported llstartup.cpp changes to where the surrounding code has been moved to in LLLoginInstance and LLAppViewer)
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappviewer.cpp72
-rw-r--r--indra/newview/lllogininstance.cpp7
-rw-r--r--indra/newview/llstartup.cpp1
3 files changed, 58 insertions, 22 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index dd00001cd4..d67dd3adcb 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4186,7 +4186,14 @@ void LLAppViewer::launchUpdater()
delete LLAppViewer::sUpdaterInfo;
}
LLAppViewer::sUpdaterInfo = new LLAppViewer::LLUpdaterInfo() ;
-
+
+ // if a sim name was passed in via command line parameter (typically through a SLURL)
+ if ( LLURLSimString::sInstance.mSimString.length() )
+ {
+ // record the location to start at next time
+ gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString );
+ };
+
#if LL_WINDOWS
LLAppViewer::sUpdaterInfo->mUpdateExePath = gDirUtilp->getTempFilename();
if (LLAppViewer::sUpdaterInfo->mUpdateExePath.empty())
@@ -4220,13 +4227,6 @@ void LLAppViewer::launchUpdater()
return;
}
- // if a sim name was passed in via command line parameter (typically through a SLURL)
- if ( LLURLSimString::sInstance.mSimString.length() )
- {
- // record the location to start at next time
- gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString );
- };
-
LLAppViewer::sUpdaterInfo->mParams << "-url \"" << update_url.asString() << "\"";
LL_DEBUGS("AppInit") << "Calling updater: " << LLAppViewer::sUpdaterInfo->mUpdateExePath << " " << LLAppViewer::sUpdaterInfo->mParams.str() << LL_ENDL;
@@ -4238,13 +4238,6 @@ void LLAppViewer::launchUpdater()
// see LLAppViewerWin32.cpp
#elif LL_DARWIN
- // if a sim name was passed in via command line parameter (typically through a SLURL)
- if ( LLURLSimString::sInstance.mSimString.length() )
- {
- // record the location to start at next time
- gSavedSettings.setString( "NextLoginLocation", LLURLSimString::sInstance.mSimString );
- };
-
LLAppViewer::sUpdaterInfo->mUpdateExePath = "'";
LLAppViewer::sUpdaterInfo->mUpdateExePath += gDirUtilp->getAppRODataDir();
LLAppViewer::sUpdaterInfo->mUpdateExePath += "/mac-updater.app/Contents/MacOS/mac-updater' -url \"";
@@ -4258,10 +4251,51 @@ void LLAppViewer::launchUpdater()
// Run the auto-updater.
system(LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str()); /* Flawfinder: ignore */
-#elif LL_LINUX || LL_SOLARIS
- OSMessageBox("Automatic updating is not yet implemented for Linux.\n"
- "Please download the latest version from www.secondlife.com.",
- LLStringUtil::null, OSMB_OK);
+#elif (LL_LINUX || LL_SOLARIS) && LL_GTK
+ // we tell the updater where to find the xml containing string
+ // translations which it can use for its own UI
+ std::string xml_strings_file = "strings.xml";
+ std::vector<std::string> xui_path_vec = LLUI::getXUIPaths();
+ std::string xml_search_paths;
+ std::vector<std::string>::const_iterator iter;
+ // build comma-delimited list of xml paths to pass to updater
+ for (iter = xui_path_vec.begin(); iter != xui_path_vec.end(); )
+ {
+ std::string this_skin_dir = gDirUtilp->getDefaultSkinDir()
+ + gDirUtilp->getDirDelimiter()
+ + (*iter);
+ llinfos << "Got a XUI path: " << this_skin_dir << llendl;
+ xml_search_paths.append(this_skin_dir);
+ ++iter;
+ if (iter != xui_path_vec.end())
+ xml_search_paths.append(","); // comma-delimit
+ }
+ // build the overall command-line to run the updater correctly
+ update_exe_path =
+ gDirUtilp->getExecutableDir() + "/" + "linux-updater.bin" +
+ " --url \"" + update_url.asString() + "\"" +
+ " --name \"" + LLAppViewer::instance()->getSecondLifeTitle() + "\"" +
+ " --dest \"" + gDirUtilp->getAppRODataDir() + "\"" +
+ " --stringsdir \"" + xml_search_paths + "\"" +
+ " --stringsfile \"" + xml_strings_file + "\"";
+
+ LL_INFOS("AppInit") << "Calling updater: "
+ << update_exe_path << LL_ENDL;
+
+ // *TODO: we could use the gdk equivilant to ensure the updater
+ // gets started on the same screen.
+ GError *error = NULL;
+ if (!g_spawn_command_line_async(update_exe_path.c_str(), &error))
+ {
+ llerrs << "Failed to launch updater: "
+ << error->message
+ << llendl;
+ }
+ if (error) {
+ g_error_free(error);
+ }
+#else
+ OSMessageBox(LLTrans::getString("MBNoAutoUpdate"), LLStringUtil::null, OSMB_OK);
#endif
// *REMOVE:Mani - Saving for reference...
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index cb7dbc2de0..2f4d00786c 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -137,6 +137,7 @@ void LLLoginInstance::constructAuthParams(const LLSD& credentials)
requested_options.append("event_categories");
requested_options.append("event_notifications");
requested_options.append("classified_categories");
+ requested_options.append("adult_compliant");
//requested_options.append("inventory-targets");
requested_options.append("buddy-list");
requested_options.append("ui-config");
@@ -345,8 +346,10 @@ void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg)
#if LL_WINDOWS
notification_name += "Windows";
-#else
- notification_name += "Mac";
+#elif LL_DARWIN
+ notification_name += "Mac";
+#else
+ notification_name += "Linux";
#endif
if (mandatory)
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 8859f1ffb5..6bd0f8d6fa 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1031,7 +1031,6 @@ bool idle_startup()
gDebugInfo["GridName"] = LLViewerLogin::getInstance()->getGridLabel();
// Update progress status and the display loop.
- requested_options.push_back("adult_compliant");
auth_desc = LLTrans::getString("LoginInProgress");
set_startup_status(progress, auth_desc, auth_message);
progress += 0.02f;