From 04611efae8a3291ceba8a29dd920bdae0d404830 Mon Sep 17 00:00:00 2001 From: Mark Palange Date: Fri, 14 Mar 2008 23:21:38 +0000 Subject: [NOTE: This was an erroneous commit, and was reverted in the next revision] QAR-369 - viewer-cleanup2-7 81916 merged into release. --- indra/newview/llappviewerlinux.cpp | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'indra/newview/llappviewerlinux.cpp') diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index 1993fd0a76..c36dd2955e 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -31,9 +31,11 @@ #include "llviewerprecompiledheaders.h" -#include "llmemtype.h" #include "llappviewerlinux.h" +#include "llcommandlineparser.h" + +#include "llmemtype.h" #include "llviewernetwork.h" #include "llmd5.h" @@ -54,6 +56,12 @@ # include #endif +namespace +{ + int gArgC = 0; + char **gArgV = NULL; +} + int main( int argc, char **argv ) { LLMemType mt1(LLMemType::MTYPE_STARTUP); @@ -62,18 +70,14 @@ int main( int argc, char **argv ) asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC #endif + gArgC = argc; + gArgV = argv; + LLAppViewer* viewer_app_ptr = new LLAppViewerLinux(); viewer_app_ptr->setErrorHandler(LLAppViewer::handleViewerCrash); - bool ok = viewer_app_ptr->tempStoreCommandOptions(argc, argv); - if(!ok) - { - llwarns << "Unable to parse command line." << llendl; - return -1; - } - - ok = viewer_app_ptr->init(); + bool ok = viewer_app_ptr->init(); if(!ok) { llwarns << "Application init failed." << llendl; @@ -321,7 +325,7 @@ void LLAppViewerLinux::handleCrashReporting() {(char*)cmd.c_str(), ask_dialog, (char*)"-user", - (char*)gGridName, + (char*)gGridName.c_str(), (char*)"-name", (char*)LLAppViewer::instance()->getSecondLifeTitle().c_str(), NULL}; @@ -403,6 +407,12 @@ bool LLAppViewerLinux::initLogging() return LLAppViewer::initLogging(); } +bool LLAppViewerLinux::initParseCommandLine(LLCommandLineParser& clp) +{ + clp.parseCommandLine(gArgC, gArgV); + return true; +} + std::string LLAppViewerLinux::generateSerialNumber() { char serial_md5[MD5HEX_STR_SIZE]; -- cgit v1.2.3