summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewerlinux.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappviewerlinux.cpp')
-rw-r--r--indra/newview/llappviewerlinux.cpp30
1 files changed, 20 insertions, 10 deletions
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 <ucontext.h>
#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];