aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llappviewer.cpp')
-rw-r--r--linden/indra/newview/llappviewer.cpp57
1 files changed, 34 insertions, 23 deletions
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 57bc230..58c1c2b 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -111,6 +111,7 @@
111#include "llpostprocess.h" 111#include "llpostprocess.h"
112#include "llwlparammanager.h" 112#include "llwlparammanager.h"
113#include "llwaterparammanager.h" 113#include "llwaterparammanager.h"
114#include "llcalc.h"
114 115
115#include "lldebugview.h" 116#include "lldebugview.h"
116#include "llconsole.h" 117#include "llconsole.h"
@@ -274,15 +275,15 @@ BOOL gLogoutInProgress = FALSE;
274// Internal globals... that should be removed. 275// Internal globals... that should be removed.
275static std::string gArgs; 276static std::string gArgs;
276 277
277const std::string MARKER_FILE_NAME("SecondLife.exec_marker"); 278const std::string MARKER_FILE_NAME("Imprudence.exec_marker");
278const std::string ERROR_MARKER_FILE_NAME("SecondLife.error_marker"); 279const std::string ERROR_MARKER_FILE_NAME("Imprudence.error_marker");
279const std::string LLERROR_MARKER_FILE_NAME("SecondLife.llerror_marker"); 280const std::string LLERROR_MARKER_FILE_NAME("Imprudence.llerror_marker");
280const std::string LOGOUT_MARKER_FILE_NAME("SecondLife.logout_marker"); 281const std::string LOGOUT_MARKER_FILE_NAME("Imprudence.logout_marker");
281static BOOL gDoDisconnect = FALSE; 282static BOOL gDoDisconnect = FALSE;
282static std::string gLaunchFileOnQuit; 283static std::string gLaunchFileOnQuit;
283 284
284// Used on Win32 for other apps to identify our window (eg, win_setup) 285// Used on Win32 for other apps to identify our window (eg, win_setup)
285const char* const VIEWER_WINDOW_CLASSNAME = "Second Life"; 286const char* const VIEWER_WINDOW_CLASSNAME = "Imprudence";
286 287
287//---------------------------------------------------------------------------- 288//----------------------------------------------------------------------------
288// File scope definitons 289// File scope definitons
@@ -385,6 +386,7 @@ static void settings_to_globals()
385 LLFolderView::sAutoOpenTime = llmax(0.25f, gSavedSettings.getF32("FolderAutoOpenDelay")); 386 LLFolderView::sAutoOpenTime = llmax(0.25f, gSavedSettings.getF32("FolderAutoOpenDelay"));
386 LLToolBar::sInventoryAutoOpenTime = gSavedSettings.getF32("InventoryAutoOpenDelay"); 387 LLToolBar::sInventoryAutoOpenTime = gSavedSettings.getF32("InventoryAutoOpenDelay");
387 LLSelectMgr::sRectSelectInclusive = gSavedSettings.getBOOL("RectangleSelectInclusive"); 388 LLSelectMgr::sRectSelectInclusive = gSavedSettings.getBOOL("RectangleSelectInclusive");
389 LLSelectMgr::sRenderSelectionHighlights = gSavedSettings.getBOOL("RenderHighlightSelections");
388 LLSelectMgr::sRenderHiddenSelections = gSavedSettings.getBOOL("RenderHiddenSelections"); 390 LLSelectMgr::sRenderHiddenSelections = gSavedSettings.getBOOL("RenderHiddenSelections");
389 LLSelectMgr::sRenderLightRadius = gSavedSettings.getBOOL("RenderLightRadius"); 391 LLSelectMgr::sRenderLightRadius = gSavedSettings.getBOOL("RenderLightRadius");
390 392
@@ -547,7 +549,7 @@ bool LLAppViewer::init()
547 549
548 // Need to do this initialization before we do anything else, since anything 550 // Need to do this initialization before we do anything else, since anything
549 // that touches files should really go through the lldir API 551 // that touches files should really go through the lldir API
550 gDirUtilp->initAppDirs("SecondLife"); 552 gDirUtilp->initAppDirs(IMP_VIEWER_NAME);
551 // set skin search path to default, will be overridden later 553 // set skin search path to default, will be overridden later
552 // this allows simple skinned file lookups to work 554 // this allows simple skinned file lookups to work
553 gDirUtilp->setSkinFolder("default"); 555 gDirUtilp->setSkinFolder("default");
@@ -569,8 +571,13 @@ bool LLAppViewer::init()
569 writeSystemInfo(); 571 writeSystemInfo();
570 572
571 // Build a string representing the current version number. 573 // Build a string representing the current version number.
572 gCurrentVersion = llformat("%s %d.%d.%d.%d", 574 gCurrentVersion = llformat("%s %d.%d.%d %s / %s %d.%d.%d.%d",
573 gSavedSettings.getString("VersionChannelName").c_str(), 575 gSavedSettings.getString("VersionChannelName").c_str(),
576 IMP_VERSION_MAJOR,
577 IMP_VERSION_MINOR,
578 IMP_VERSION_PATCH,
579 IMP_VERSION_TEST,
580 LL_VIEWER_NAME,
574 LL_VERSION_MAJOR, 581 LL_VERSION_MAJOR,
575 LL_VERSION_MINOR, 582 LL_VERSION_MINOR,
576 LL_VERSION_PATCH, 583 LL_VERSION_PATCH,
@@ -1150,6 +1157,8 @@ bool LLAppViewer::cleanup()
1150 // Note: this is where gLocalSpeakerMgr and gActiveSpeakerMgr used to be deleted. 1157 // Note: this is where gLocalSpeakerMgr and gActiveSpeakerMgr used to be deleted.
1151 1158
1152 LLWorldMap::getInstance()->reset(); // release any images 1159 LLWorldMap::getInstance()->reset(); // release any images
1160
1161 LLCalc::cleanUp();
1153 1162
1154 llinfos << "Global stuff deleted" << llendflush; 1163 llinfos << "Global stuff deleted" << llendflush;
1155 1164
@@ -1485,15 +1494,15 @@ bool LLAppViewer::initLogging()
1485 1494
1486 // Remove the last ".old" log file. 1495 // Remove the last ".old" log file.
1487 std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, 1496 std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
1488 "SecondLife.old"); 1497 "Imprudence.old");
1489 LLFile::remove(old_log_file); 1498 LLFile::remove(old_log_file);
1490 1499
1491 // Rename current log file to ".old" 1500 // Rename current log file to ".old"
1492 std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, 1501 std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
1493 "SecondLife.log"); 1502 "Imprudence.log");
1494 LLFile::rename(log_file, old_log_file); 1503 LLFile::rename(log_file, old_log_file);
1495 1504
1496 // Set the log file to SecondLife.log 1505 // Set the log file to Imprudence.log
1497 1506
1498 LLError::logToFile(log_file); 1507 LLError::logToFile(log_file);
1499 1508
@@ -1653,14 +1662,10 @@ bool LLAppViewer::initConfiguration()
1653 1662
1654 // - set procedural settings 1663 // - set procedural settings
1655 gSavedSettings.setString("ClientSettingsFile", 1664 gSavedSettings.setString("ClientSettingsFile",
1656 gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global"))); 1665 // gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global")));
1657 1666 gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings_imprudence.xml"));
1658 gSavedSettings.setString("VersionChannelName", LL_CHANNEL);
1659 1667
1660#ifndef LL_RELEASE_FOR_DOWNLOAD 1668 gSavedSettings.setString("VersionChannelName", IMP_VIEWER_NAME);
1661 gSavedSettings.setBOOL("ShowConsoleWindow", TRUE);
1662 gSavedSettings.setBOOL("AllowMultipleViewers", TRUE);
1663#endif
1664 1669
1665 //*FIX:Mani - Set default to disabling watchdog mainloop 1670 //*FIX:Mani - Set default to disabling watchdog mainloop
1666 // timeout for mac and linux. There is no call stack info 1671 // timeout for mac and linux. There is no call stack info
@@ -1715,7 +1720,7 @@ bool LLAppViewer::initConfiguration()
1715 llinfos << "Command line usage:\n" << clp << llendl; 1720 llinfos << "Command line usage:\n" << clp << llendl;
1716 1721
1717 std::ostringstream msg; 1722 std::ostringstream msg;
1718 msg << "Second Life found an error parsing the command line. \n" 1723 msg << gSecondLife << " found an error parsing the command line. \n"
1719 << "Please see: http://wiki.secondlife.com/wiki/Client_parameters \n" 1724 << "Please see: http://wiki.secondlife.com/wiki/Client_parameters \n"
1720 << "Error: " << clp.getErrorMessage(); 1725 << "Error: " << clp.getErrorMessage();
1721 1726
@@ -1888,7 +1893,7 @@ bool LLAppViewer::initConfiguration()
1888 mYieldTime = gSavedSettings.getS32("YieldTime"); 1893 mYieldTime = gSavedSettings.getS32("YieldTime");
1889 1894
1890 // XUI:translate 1895 // XUI:translate
1891 gSecondLife = "Second Life"; 1896 gSecondLife = IMP_VIEWER_NAME;
1892 1897
1893 // Read skin/branding settings if specified. 1898 // Read skin/branding settings if specified.
1894 //if (! gDirUtilp->getSkinDir().empty() ) 1899 //if (! gDirUtilp->getSkinDir().empty() )
@@ -2241,6 +2246,10 @@ void LLAppViewer::writeSystemInfo()
2241 gDebugInfo["SLLog"] = LLError::logFileName(); 2246 gDebugInfo["SLLog"] = LLError::logFileName();
2242 2247
2243 gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); 2248 gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName");
2249 gDebugInfo["ClientInfo"]["ImpMajorVersion"] = IMP_VERSION_MAJOR;
2250 gDebugInfo["ClientInfo"]["ImpMinorVersion"] = IMP_VERSION_MINOR;
2251 gDebugInfo["ClientInfo"]["ImpPatchVersion"] = IMP_VERSION_PATCH;
2252 gDebugInfo["ClientInfo"]["ImpTestVersion"] = IMP_VERSION_TEST;
2244 gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; 2253 gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR;
2245 gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; 2254 gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR;
2246 gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; 2255 gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH;
@@ -2277,9 +2286,7 @@ void LLAppViewer::writeSystemInfo()
2277 gDebugInfo["CrashNotHandled"] = (LLSD::Boolean)true; 2286 gDebugInfo["CrashNotHandled"] = (LLSD::Boolean)true;
2278 2287
2279 // Dump some debugging info 2288 // Dump some debugging info
2280 LL_INFOS("SystemInfo") << gSecondLife 2289 LL_INFOS("SystemInfo") << gCurrentVersion << LL_ENDL;
2281 << " version " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH
2282 << LL_ENDL;
2283 2290
2284 // Dump the local time and time zone 2291 // Dump the local time and time zone
2285 time_t now; 2292 time_t now;
@@ -2333,6 +2340,10 @@ void LLAppViewer::handleViewerCrash()
2333 //to check against no matter what 2340 //to check against no matter what
2334 gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); 2341 gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName");
2335 2342
2343 gDebugInfo["ClientInfo"]["ImpMajorVersion"] = IMP_VERSION_MAJOR;
2344 gDebugInfo["ClientInfo"]["ImpMinorVersion"] = IMP_VERSION_MINOR;
2345 gDebugInfo["ClientInfo"]["ImpPatchVersion"] = IMP_VERSION_PATCH;
2346 gDebugInfo["ClientInfo"]["ImpTestVersion"] = IMP_VERSION_TEST;
2336 gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; 2347 gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR;
2337 gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; 2348 gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR;
2338 gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; 2349 gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH;
@@ -3034,7 +3045,7 @@ void LLAppViewer::badNetworkHandler()
3034 message << 3045 message <<
3035 "The viewer has detected mangled network data indicative\n" 3046 "The viewer has detected mangled network data indicative\n"
3036 "of a bad upstream network connection or an incomplete\n" 3047 "of a bad upstream network connection or an incomplete\n"
3037 "local installation of " << LLAppViewer::instance()->getSecondLifeTitle() << ". \n" 3048 "local installation of " << gSecondLife << ". \n"
3038 " \n" 3049 " \n"
3039 "Try uninstalling and reinstalling to see if this resolves \n" 3050 "Try uninstalling and reinstalling to see if this resolves \n"
3040 "the issue. \n" 3051 "the issue. \n"