aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llstartup.cpp48
1 files changed, 26 insertions, 22 deletions
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index 54161c0..4af02cb 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -505,23 +505,23 @@ BOOL idle_startup()
505 #if LL_DARWIN 505 #if LL_DARWIN
506 // For Mac OS, we store both the shared libraries and the runtime files (chrome/, plugins/, etc) in 506 // For Mac OS, we store both the shared libraries and the runtime files (chrome/, plugins/, etc) in
507 // Second Life.app/Contents/MacOS/. This matches the way Firefox is distributed on the Mac. 507 // Second Life.app/Contents/MacOS/. This matches the way Firefox is distributed on the Mac.
508 std::string profileBaseDir(gDirUtilp->getExecutableDir()); 508 std::string componentDir(gDirUtilp->getExecutableDir());
509 #elif LL_WINDOWS 509 #elif LL_WINDOWS
510 std::string profileBaseDir( gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "" ) ); 510 std::string componentDir( gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "" ) );
511 profileBaseDir += gDirUtilp->getDirDelimiter(); 511 componentDir += gDirUtilp->getDirDelimiter();
512 #ifdef LL_DEBUG 512 #ifdef LL_DEBUG
513 profileBaseDir += "mozilla_debug"; 513 componentDir += "mozilla_debug";
514 #else 514 #else
515 profileBaseDir += "mozilla"; 515 componentDir += "mozilla";
516 #endif 516 #endif
517 #elif LL_LINUX 517 #elif LL_LINUX
518 std::string profileBaseDir( gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "" ) ); 518 std::string componentDir( gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "" ) );
519 profileBaseDir += gDirUtilp->getDirDelimiter(); 519 componentDir += gDirUtilp->getDirDelimiter();
520 profileBaseDir += "mozilla-runtime-linux-i686"; 520 componentDir += "mozilla-runtime-linux-i686";
521 #else 521 #else
522 std::string profileBaseDir( gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "" ) ); 522 std::string componentDir( gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "" ) );
523 profileBaseDir += gDirUtilp->getDirDelimiter(); 523 componentDir += gDirUtilp->getDirDelimiter();
524 profileBaseDir += "mozilla"; 524 componentDir += "mozilla";
525 #endif 525 #endif
526 526
527#if LL_LINUX 527#if LL_LINUX
@@ -531,7 +531,10 @@ BOOL idle_startup()
531 // and crashness. (SL-35450) 531 // and crashness. (SL-35450)
532 std::string saved_locale = setlocale(LC_ALL, NULL); 532 std::string saved_locale = setlocale(LC_ALL, NULL);
533#endif // LL_LINUX 533#endif // LL_LINUX
534 LLMozLib::getInstance()->init( profileBaseDir, gDirUtilp->getExpandedFilename( LL_PATH_MOZILLA_PROFILE, "" ) ); 534
535 // initialize Mozilla - pass in executable dir, location of extra dirs (chrome/, greprefs/, plugins/ etc.) and path to profile dir)
536 LLMozLib::getInstance()->init( gDirUtilp->getExecutableDir(), componentDir, gDirUtilp->getExpandedFilename( LL_PATH_MOZILLA_PROFILE, "" ) );
537
535#if LL_LINUX 538#if LL_LINUX
536 setlocale(LC_ALL, saved_locale.c_str() ); 539 setlocale(LC_ALL, saved_locale.c_str() );
537#endif // LL_LINUX 540#endif // LL_LINUX
@@ -2804,25 +2807,26 @@ void update_app(BOOL mandatory, const std::string& auth_msg)
2804 LLStringBase<char>::format_map_t args; 2807 LLStringBase<char>::format_map_t args;
2805 args["[MESSAGE]"] = msg; 2808 args["[MESSAGE]"] = msg;
2806 2809
2807 BOOL *mandatoryp = new BOOL(mandatory); 2810 // represent a bool as a null/non-null pointer
2811 void *mandatoryp = mandatory ? &mandatory : NULL;
2808 2812
2809#if LL_WINDOWS 2813#if LL_WINDOWS
2810 if (mandatory) 2814 if (mandatory)
2811 { 2815 {
2812 gViewerWindow->alertXml("DownloadWindowsMandatory", args, 2816 gViewerWindow->alertXml("DownloadWindowsMandatory", args,
2813 update_dialog_callback, 2817 update_dialog_callback,
2814 (void *)mandatoryp); 2818 mandatoryp);
2815 } 2819 }
2816 else 2820 else
2817 { 2821 {
2818#if LL_RELEASE_FOR_DOWNLOAD 2822#if LL_RELEASE_FOR_DOWNLOAD
2819 gViewerWindow->alertXml("DownloadWindowsReleaseForDownload", args, 2823 gViewerWindow->alertXml("DownloadWindowsReleaseForDownload", args,
2820 update_dialog_callback, 2824 update_dialog_callback,
2821 (void *)mandatoryp); 2825 mandatoryp);
2822#else 2826#else
2823 gViewerWindow->alertXml("DownloadWindows", args, 2827 gViewerWindow->alertXml("DownloadWindows", args,
2824 update_dialog_callback, 2828 update_dialog_callback,
2825 (void *)mandatoryp); 2829 mandatoryp);
2826#endif 2830#endif
2827 } 2831 }
2828#else 2832#else
@@ -2830,18 +2834,18 @@ void update_app(BOOL mandatory, const std::string& auth_msg)
2830 { 2834 {
2831 gViewerWindow->alertXml("DownloadMacMandatory", args, 2835 gViewerWindow->alertXml("DownloadMacMandatory", args,
2832 update_dialog_callback, 2836 update_dialog_callback,
2833 (void *)mandatoryp); 2837 mandatoryp);
2834 } 2838 }
2835 else 2839 else
2836 { 2840 {
2837#if LL_RELEASE_FOR_DOWNLOAD 2841#if LL_RELEASE_FOR_DOWNLOAD
2838 gViewerWindow->alertXml("DownloadMacReleaseForDownload", args, 2842 gViewerWindow->alertXml("DownloadMacReleaseForDownload", args,
2839 update_dialog_callback, 2843 update_dialog_callback,
2840 (void *)mandatoryp); 2844 mandatoryp);
2841#else 2845#else
2842 gViewerWindow->alertXml("DownloadMac", args, 2846 gViewerWindow->alertXml("DownloadMac", args,
2843 update_dialog_callback, 2847 update_dialog_callback,
2844 (void *)mandatoryp); 2848 mandatoryp);
2845#endif 2849#endif
2846 } 2850 }
2847#endif 2851#endif
@@ -2852,7 +2856,7 @@ void update_app(BOOL mandatory, const std::string& auth_msg)
2852void update_dialog_callback(S32 option, void *userdata) 2856void update_dialog_callback(S32 option, void *userdata)
2853{ 2857{
2854 std::string update_exe_path; 2858 std::string update_exe_path;
2855 BOOL mandatory = *(BOOL *)userdata; 2859 BOOL mandatory = userdata != NULL;
2856 2860
2857#if !LL_RELEASE_FOR_DOWNLOAD 2861#if !LL_RELEASE_FOR_DOWNLOAD
2858 if (option == 2) 2862 if (option == 2)