summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewermacosx.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-03-15 01:18:27 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-03-15 01:18:27 +0000
commit672a76d0ea08a0d0fc824e103ee4c4242b7e03ec (patch)
treeb623a9c884383ad75ed755b2c373db2b90643671 /indra/newview/llappviewermacosx.cpp
parent04611efae8a3291ceba8a29dd920bdae0d404830 (diff)
reverting premature commit at 82410.
Diffstat (limited to 'indra/newview/llappviewermacosx.cpp')
-rw-r--r--indra/newview/llappviewermacosx.cpp43
1 files changed, 8 insertions, 35 deletions
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index ba3f28911f..2d7091a075 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -36,8 +36,6 @@
#endif
#include "llappviewermacosx.h"
-#include "llcommandlineparser.h"
-
#include "llmemtype.h"
#include "llviewernetwork.h"
@@ -47,13 +45,6 @@
#include "llurldispatcher.h"
#include <Carbon/Carbon.h>
-namespace
-{
- // The command line args stored.
- // They are not used immediately by the app.
- int gArgC;
- char** gArgV;
-}
int main( int argc, char **argv )
{
@@ -70,11 +61,14 @@ int main( int argc, char **argv )
viewer_app_ptr->setErrorHandler(LLAppViewer::handleViewerCrash);
- // Store off the command line args for use later.
- gArgC = argc;
- gArgV = argv;
-
- bool ok = viewer_app_ptr->init();
+ bool ok = viewer_app_ptr->tempStoreCommandOptions(argc, argv);
+ if(!ok)
+ {
+ llwarns << "Unable to parse command line." << llendl;
+ return -1;
+ }
+
+ ok = viewer_app_ptr->init();
if(!ok)
{
llwarns << "Application init failed." << llendl;
@@ -114,27 +108,6 @@ bool LLAppViewerMacOSX::init()
return LLAppViewer::init();
}
-bool LLAppViewerMacOSX::initParseCommandLine(LLCommandLineParser& clp)
-{
- // First parse the command line, not often used on the mac.
- clp.parseCommandLine(gArgC, gArgV);
-
- // Now read in the args from arguments txt.
- // Succesive calls to clp.parse... will NOT override earlier
- // options.
- const char* filename = "arguments.txt";
- llifstream ifs(filename, llifstream::binary);
- if (!ifs.is_open())
- {
- llwarns << "Unable to open file" << filename << llendl;
- return false;
- }
-
-
- clp.parseCommandLineFile(ifs);
- return true;
-}
-
void LLAppViewerMacOSX::handleCrashReporting()
{
// Macintosh