diff options
author | Merov Linden <merov@lindenlab.com> | 2010-10-20 19:51:31 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2010-10-20 19:51:31 -0700 |
commit | a0417239ab34e1671e8d77009305f45e19f6bed7 (patch) | |
tree | c1998c0436c1fb57c08ebe13e53bfa1a5b5766df /indra | |
parent | 44b428f4c372e6dd86e276af6c01b9351b4a3bd9 (diff) | |
parent | b3f3fb60999033a7a100102d563e66eaaa876fa3 (diff) |
STORM-417 : merge with viewer-development
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/llversionviewer.h | 4 | ||||
-rw-r--r-- | indra/mac_updater/mac_updater.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 3 |
3 files changed, 25 insertions, 2 deletions
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index 9391aed8a1..b209e4aa38 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -34,4 +34,8 @@ const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Developer"; +#if LL_DARWIN +const char * const LL_VERSION_BUNDLE_ID = "com.secondlife.snowglobe.viewer"; +#endif + #endif diff --git a/indra/mac_updater/mac_updater.cpp b/indra/mac_updater/mac_updater.cpp index e4d100d1ec..23980ffac2 100644 --- a/indra/mac_updater/mac_updater.cpp +++ b/indra/mac_updater/mac_updater.cpp @@ -61,6 +61,7 @@ Boolean gCancelled = false; const char *gUpdateURL; const char *gProductName; +const char *gBundleID; void *updatethreadproc(void*); @@ -329,6 +330,10 @@ int parse_args(int argc, char **argv) { gProductName = argv[j]; } + else if ((!strcmp(argv[j], "-bundleid")) && (++j < argc)) + { + gBundleID = argv[j]; + } } return 0; @@ -355,6 +360,7 @@ int main(int argc, char **argv) // gUpdateURL = NULL; gProductName = NULL; + gBundleID = NULL; parse_args(argc, argv); if (!gUpdateURL) { @@ -372,6 +378,14 @@ int main(int argc, char **argv) { gProductName = "Second Life"; } + if (gBundleID) + { + llinfos << "Bundle ID is: " << gBundleID << llendl; + } + else + { + gBundleID = "com.secondlife.indra.viewer"; + } } llinfos << "Starting " << gProductName << " Updater" << llendl; @@ -592,7 +606,8 @@ static bool isFSRefViewerBundle(FSRef *targetRef) CFURLRef targetURL = NULL; CFBundleRef targetBundle = NULL; CFStringRef targetBundleID = NULL; - + CFStringRef sourceBundleID = NULL; + targetURL = CFURLCreateFromFSRef(NULL, targetRef); if(targetURL == NULL) @@ -619,7 +634,8 @@ static bool isFSRefViewerBundle(FSRef *targetRef) } else { - if(CFStringCompare(targetBundleID, CFSTR("com.secondlife.indra.viewer"), 0) == kCFCompareEqualTo) + sourceBundleID = CFStringCreateWithCString(NULL, gBundleID, kCFStringEncodingUTF8); + if(CFStringCompare(sourceBundleID, targetBundleID, 0) == kCFCompareEqualTo) { // This is the bundle we're looking for. result = true; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ba14c248aa..931b9fd2f3 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -30,6 +30,7 @@ // Viewer includes #include "llversioninfo.h" +#include "llversionviewer.h" #include "llfeaturemanager.h" #include "lluictrlfactory.h" #include "lltexteditor.h" @@ -4513,6 +4514,8 @@ void LLAppViewer::launchUpdater() LLAppViewer::sUpdaterInfo->mUpdateExePath += update_url.asString(); LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" -name \""; LLAppViewer::sUpdaterInfo->mUpdateExePath += LLAppViewer::instance()->getSecondLifeTitle(); + LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" -bundleid \""; + LLAppViewer::sUpdaterInfo->mUpdateExePath += LL_VERSION_BUNDLE_ID; LLAppViewer::sUpdaterInfo->mUpdateExePath += "\" &"; LL_DEBUGS("AppInit") << "Calling updater: " << LLAppViewer::sUpdaterInfo->mUpdateExePath << LL_ENDL; |