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.cpp60
1 files changed, 36 insertions, 24 deletions
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 09d1141..4ab5d8d 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -109,6 +109,7 @@
109#include "llpostprocess.h" 109#include "llpostprocess.h"
110#include "llwlparammanager.h" 110#include "llwlparammanager.h"
111#include "llwaterparammanager.h" 111#include "llwaterparammanager.h"
112#include "llcalc.h"
112 113
113#include "lldebugview.h" 114#include "lldebugview.h"
114#include "llconsole.h" 115#include "llconsole.h"
@@ -280,10 +281,10 @@ BOOL gLogoutInProgress = FALSE;
280// Internal globals... that should be removed. 281// Internal globals... that should be removed.
281static std::string gArgs; 282static std::string gArgs;
282 283
283const std::string MARKER_FILE_NAME("SecondLife.exec_marker"); 284const std::string MARKER_FILE_NAME("Imprudence.exec_marker");
284const std::string ERROR_MARKER_FILE_NAME("SecondLife.error_marker"); 285const std::string ERROR_MARKER_FILE_NAME("Imprudence.error_marker");
285const std::string LLERROR_MARKER_FILE_NAME("SecondLife.llerror_marker"); 286const std::string LLERROR_MARKER_FILE_NAME("Imprudence.llerror_marker");
286const std::string LOGOUT_MARKER_FILE_NAME("SecondLife.logout_marker"); 287const std::string LOGOUT_MARKER_FILE_NAME("Imprudence.logout_marker");
287static BOOL gDoDisconnect = FALSE; 288static BOOL gDoDisconnect = FALSE;
288static std::string gLaunchFileOnQuit; 289static std::string gLaunchFileOnQuit;
289 290
@@ -294,6 +295,9 @@ const char *VFS_INDEX_FILE_BASE = "index.db2.x.";
294 295
295static std::string gSecondLife; 296static std::string gSecondLife;
296static std::string gWindowTitle; 297static std::string gWindowTitle;
298#ifdef LL_WINDOWS
299 static char sWindowClass[] = "Imprudence";
300#endif
297 301
298std::string gLoginPage; 302std::string gLoginPage;
299std::vector<std::string> gLoginURIs; 303std::vector<std::string> gLoginURIs;
@@ -551,7 +555,7 @@ bool LLAppViewer::init()
551 555
552 // Need to do this initialization before we do anything else, since anything 556 // Need to do this initialization before we do anything else, since anything
553 // that touches files should really go through the lldir API 557 // that touches files should really go through the lldir API
554 gDirUtilp->initAppDirs("SecondLife"); 558 gDirUtilp->initAppDirs(IMP_VIEWER_NAME);
555 // set skin search path to default, will be overridden later 559 // set skin search path to default, will be overridden later
556 // this allows simple skinned file lookups to work 560 // this allows simple skinned file lookups to work
557 gDirUtilp->setSkinFolder("default"); 561 gDirUtilp->setSkinFolder("default");
@@ -573,8 +577,13 @@ bool LLAppViewer::init()
573 writeSystemInfo(); 577 writeSystemInfo();
574 578
575 // Build a string representing the current version number. 579 // Build a string representing the current version number.
576 gCurrentVersion = llformat("%s %d.%d.%d.%d", 580 gCurrentVersion = llformat("%s %d.%d.%d %s / %s %d.%d.%d.%d",
577 gSavedSettings.getString("VersionChannelName").c_str(), 581 gSavedSettings.getString("VersionChannelName").c_str(),
582 IMP_VERSION_MAJOR,
583 IMP_VERSION_MINOR,
584 IMP_VERSION_PATCH,
585 IMP_VERSION_TEST,
586 LL_VIEWER_NAME,
578 LL_VERSION_MAJOR, 587 LL_VERSION_MAJOR,
579 LL_VERSION_MINOR, 588 LL_VERSION_MINOR,
580 LL_VERSION_PATCH, 589 LL_VERSION_PATCH,
@@ -1153,6 +1162,8 @@ bool LLAppViewer::cleanup()
1153 LLNotifyBox::cleanup(); 1162 LLNotifyBox::cleanup();
1154 1163
1155 LLWorldMap::getInstance()->reset(); // release any images 1164 LLWorldMap::getInstance()->reset(); // release any images
1165
1166 LLCalc::cleanUp();
1156 1167
1157 llinfos << "Global stuff deleted" << llendflush; 1168 llinfos << "Global stuff deleted" << llendflush;
1158 1169
@@ -1481,15 +1492,15 @@ bool LLAppViewer::initLogging()
1481 1492
1482 // Remove the last ".old" log file. 1493 // Remove the last ".old" log file.
1483 std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, 1494 std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
1484 "SecondLife.old"); 1495 "Imprudence.old");
1485 LLFile::remove(old_log_file); 1496 LLFile::remove(old_log_file);
1486 1497
1487 // Rename current log file to ".old" 1498 // Rename current log file to ".old"
1488 std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, 1499 std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
1489 "SecondLife.log"); 1500 "Imprudence.log");
1490 LLFile::rename(log_file, old_log_file); 1501 LLFile::rename(log_file, old_log_file);
1491 1502
1492 // Set the log file to SecondLife.log 1503 // Set the log file to Imprudence.log
1493 1504
1494 LLError::logToFile(log_file); 1505 LLError::logToFile(log_file);
1495 1506
@@ -1607,14 +1618,9 @@ bool LLAppViewer::initConfiguration()
1607 1618
1608 // - set procedural settings 1619 // - set procedural settings
1609 gSavedSettings.setString("ClientSettingsFile", 1620 gSavedSettings.setString("ClientSettingsFile",
1610 gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFileName("Global"))); 1621 gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings_imprudence.xml"));
1611 1622
1612 gSavedSettings.setString("VersionChannelName", LL_CHANNEL); 1623 gSavedSettings.setString("VersionChannelName", IMP_VIEWER_NAME);
1613
1614#ifndef LL_RELEASE_FOR_DOWNLOAD
1615 gSavedSettings.setBOOL("ShowConsoleWindow", TRUE);
1616 gSavedSettings.setBOOL("AllowMultipleViewers", TRUE);
1617#endif
1618 1624
1619#if !LL_DYNAMIC_FONT_DISCOVERY 1625#if !LL_DYNAMIC_FONT_DISCOVERY
1620 // static font discovery - user settings can override. 1626 // static font discovery - user settings can override.
@@ -1694,7 +1700,7 @@ bool LLAppViewer::initConfiguration()
1694 llinfos << "Command line usage:\n" << clp << llendl; 1700 llinfos << "Command line usage:\n" << clp << llendl;
1695 1701
1696 std::ostringstream msg; 1702 std::ostringstream msg;
1697 msg << "Second Life found an error parsing the command line. \n" 1703 msg << gSecondLife << " found an error parsing the command line. \n"
1698 << "Please see: http://wiki.secondlife.com/wiki/Client_parameters \n" 1704 << "Please see: http://wiki.secondlife.com/wiki/Client_parameters \n"
1699 << "Error: " << clp.getErrorMessage(); 1705 << "Error: " << clp.getErrorMessage();
1700 1706
@@ -1876,7 +1882,7 @@ bool LLAppViewer::initConfiguration()
1876 mYieldTime = gSavedSettings.getS32("YieldTime"); 1882 mYieldTime = gSavedSettings.getS32("YieldTime");
1877 1883
1878 // XUI:translate 1884 // XUI:translate
1879 gSecondLife = "Second Life"; 1885 gSecondLife = IMP_VIEWER_NAME;
1880 1886
1881 // Read skin/branding settings if specified. 1887 // Read skin/branding settings if specified.
1882 //if (! gDirUtilp->getSkinDir().empty() ) 1888 //if (! gDirUtilp->getSkinDir().empty() )
@@ -2062,7 +2068,7 @@ bool LLAppViewer::initWindow()
2062 2068
2063 // always start windowed 2069 // always start windowed
2064 BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth"); 2070 BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth");
2065 gViewerWindow = new LLViewerWindow(gWindowTitle, "Second Life", 2071 gViewerWindow = new LLViewerWindow(gWindowTitle, gWindowTitle,
2066 gSavedSettings.getS32("WindowX"), gSavedSettings.getS32("WindowY"), 2072 gSavedSettings.getS32("WindowX"), gSavedSettings.getS32("WindowY"),
2067 gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"), 2073 gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"),
2068 FALSE, ignorePixelDepth); 2074 FALSE, ignorePixelDepth);
@@ -2195,6 +2201,10 @@ void LLAppViewer::writeSystemInfo()
2195 gDebugInfo["SLLog"] = LLError::logFileName(); 2201 gDebugInfo["SLLog"] = LLError::logFileName();
2196 2202
2197 gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); 2203 gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName");
2204 gDebugInfo["ClientInfo"]["ImpMajorVersion"] = IMP_VERSION_MAJOR;
2205 gDebugInfo["ClientInfo"]["ImpMinorVersion"] = IMP_VERSION_MINOR;
2206 gDebugInfo["ClientInfo"]["ImpPatchVersion"] = IMP_VERSION_PATCH;
2207 gDebugInfo["ClientInfo"]["ImpTestVersion"] = IMP_VERSION_TEST;
2198 gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; 2208 gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR;
2199 gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; 2209 gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR;
2200 gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; 2210 gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH;
@@ -2231,9 +2241,7 @@ void LLAppViewer::writeSystemInfo()
2231 gDebugInfo["CrashNotHandled"] = (LLSD::Boolean)true; 2241 gDebugInfo["CrashNotHandled"] = (LLSD::Boolean)true;
2232 2242
2233 // Dump some debugging info 2243 // Dump some debugging info
2234 LL_INFOS("SystemInfo") << gSecondLife 2244 LL_INFOS("SystemInfo") << gCurrentVersion << LL_ENDL;
2235 << " version " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH
2236 << LL_ENDL;
2237 2245
2238 // Dump the local time and time zone 2246 // Dump the local time and time zone
2239 time_t now; 2247 time_t now;
@@ -2284,6 +2292,10 @@ void LLAppViewer::handleViewerCrash()
2284 //to check against no matter what 2292 //to check against no matter what
2285 gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); 2293 gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName");
2286 2294
2295 gDebugInfo["ClientInfo"]["ImpMajorVersion"] = IMP_VERSION_MAJOR;
2296 gDebugInfo["ClientInfo"]["ImpMinorVersion"] = IMP_VERSION_MINOR;
2297 gDebugInfo["ClientInfo"]["ImpPatchVersion"] = IMP_VERSION_PATCH;
2298 gDebugInfo["ClientInfo"]["ImpTestVersion"] = IMP_VERSION_TEST;
2287 gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; 2299 gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR;
2288 gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; 2300 gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR;
2289 gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; 2301 gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH;
@@ -2643,7 +2655,7 @@ bool LLAppViewer::initCache()
2643 std::string cache_dir = gDirUtilp->getOSUserAppDir(); 2655 std::string cache_dir = gDirUtilp->getOSUserAppDir();
2644 std::string new_cache_dir = gDirUtilp->getOSCacheDir(); 2656 std::string new_cache_dir = gDirUtilp->getOSCacheDir();
2645 cache_dir = cache_dir + "/cache"; 2657 cache_dir = cache_dir + "/cache";
2646 new_cache_dir = new_cache_dir + "/SecondLife"; 2658 new_cache_dir = new_cache_dir + "/" + gSecondLife;
2647 if (gDirUtilp->fileExists(cache_dir)) 2659 if (gDirUtilp->fileExists(cache_dir))
2648 { 2660 {
2649 gDirUtilp->setCacheDir(cache_dir); 2661 gDirUtilp->setCacheDir(cache_dir);
@@ -2936,7 +2948,7 @@ void LLAppViewer::badNetworkHandler()
2936 message << 2948 message <<
2937 "The viewer has detected mangled network data indicative\n" 2949 "The viewer has detected mangled network data indicative\n"
2938 "of a bad upstream network connection or an incomplete\n" 2950 "of a bad upstream network connection or an incomplete\n"
2939 "local installation of " << LLAppViewer::instance()->getSecondLifeTitle() << ". \n" 2951 "local installation of " << gSecondLife << ". \n"
2940 " \n" 2952 " \n"
2941 "Try uninstalling and reinstalling to see if this resolves \n" 2953 "Try uninstalling and reinstalling to see if this resolves \n"
2942 "the issue. \n" 2954 "the issue. \n"