summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewermacosx.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-04-17 02:56:14 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-04-17 02:56:14 +0000
commita3f3ab7e113e44309461b26399d627814f0ce4f9 (patch)
tree695b2a41f8d31330634ef59e7d6ece526242fd86 /indra/newview/llappviewermacosx.cpp
parentd85247e63e5ff0b488211b62429a4895b48dee27 (diff)
QAR-449 Viewer 1.20 RC 1
merge Branch_1-20-Viewer -r 84432 : 84760 -> release
Diffstat (limited to 'indra/newview/llappviewermacosx.cpp')
-rw-r--r--indra/newview/llappviewermacosx.cpp32
1 files changed, 30 insertions, 2 deletions
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index a748545a3b..28314cb0ae 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -115,10 +115,35 @@ bool LLAppViewerMacOSX::init()
return LLAppViewer::init();
}
+// MacOSX may add and addition command line arguement for the process serial number.
+// The option takes a form like '-psn_0_12345'. The following method should be able to recognize
+// and either ignore or return a pair of values for the option.
+// look for this method to be added to the parser in parseAndStoreResults.
+std::pair<std::string, std::string> parse_psn(const std::string& s)
+{
+ if (s.find("-psn_") == 0)
+ {
+ // *FIX:Mani Not sure that the value makes sense.
+ // fix it once the actual -psn_XXX syntax is known.
+ return std::make_pair("psn", s.substr(5));
+ }
+ else
+ {
+ return std::make_pair(std::string(), std::string());
+ }
+}
+
bool LLAppViewerMacOSX::initParseCommandLine(LLCommandLineParser& clp)
{
+ // The next two lines add the support for parsing the mac -psn_XXX arg.
+ clp.addOptionDesc("psn", NULL, 1, "MacOSX process serial number");
+ clp.setCustomParser(parse_psn);
+
// First parse the command line, not often used on the mac.
- clp.parseCommandLine(gArgC, gArgV);
+ if(clp.parseCommandLine(gArgC, gArgV) == false)
+ {
+ return false;
+ }
// Now read in the args from arguments txt.
// Succesive calls to clp.parse... will NOT override earlier
@@ -131,7 +156,10 @@ bool LLAppViewerMacOSX::initParseCommandLine(LLCommandLineParser& clp)
return false;
}
- clp.parseCommandLineFile(ifs);
+ if(clp.parseCommandLineFile(ifs) == false)
+ {
+ return false;
+ }
// Get the user's preferred language string based on the Mac OS localization mechanism.
// To add a new localization: