From b3f3fb60999033a7a100102d563e66eaaa876fa3 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine <vsavchuk@productengine.com>
Date: Wed, 20 Oct 2010 21:23:27 +0300
Subject: STORM-417 FIXED Port of SNOW-140 to SG 2.0 : Forced updates not
 working on Mac

The point of this patch is to make the Mac updater code a bit more flexible
and reliable than it is right now. The issue is double:
 * reliability: the string comparison code on the bundle identifier is not UTF8 compliant
 * flexibility: the bundle identifier is hard coded to match the bundle identifier of LL viewer
   (i.e. com.secondlife.indra.viewer) so it can't work for another viewer
   (in particular, it didn't work for Snowglobe).
   The "bundle identifier" is one of those Mac only thing stored in the Info.plist of a "bundle"
   (the ".app" folder that's bundling an executable and all its resources and is seen
   as an application when browsing with the Mac OS X Finder).

The patch fixes both issues:
 * compare correctly UTF8 encoded strings
 * allow the bundle ID to be passed as a parameter to the updater

The patch has really no consequence on LL viewer. It's more a matter of having cleaner, better code.

Author: Cypren Christenson
Ported and reviewed by: Merov Linden
---
 indra/llcommon/llversionviewer.h | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'indra/llcommon')

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
-- 
cgit v1.2.3