From cd7ef45be0983e781b473818638d3574bd1a20f4 Mon Sep 17 00:00:00 2001 From: andym Date: Sat, 27 Oct 2007 02:20:55 +0000 Subject: [PATCH] Fixed a bug that could occur when the app has a localized CFBundleName. Thanks, Chuck Houpt. --- SUUpdater.m | 2 +- SUUtilities.m | 6 +----- Sparkle.xcodeproj/project.pbxproj | 3 ++- Test Application/English.lproj/InfoPlist.strings | Bin 0 -> 268 bytes Test Application/Test Application-Info.plist | 2 ++ 5 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 Test Application/English.lproj/InfoPlist.strings diff --git a/SUUpdater.m b/SUUpdater.m index e57b7fae..90c55f37 100644 --- a/SUUpdater.m +++ b/SUUpdater.m @@ -532,7 +532,7 @@ if (!newAppDownloadPath || ![[NSFileManager defaultManager] fileExistsAtPath:newAppDownloadPath]) { - [NSException raise:@"SUInstallException" format:@"The update archive didn't contain an application with the proper name: %@. Remember, the updated app's file name must be identical to {CFBundleName}.app", [SUInfoValueForKey(@"CFBundleName") stringByAppendingPathExtension:@"app"]]; + [NSException raise:@"SUInstallException" format:@"The update archive didn't contain an application with the proper name: %@. Remember, the updated app's file name must be identical to {CFBundleString}.app", [SUUnlocalizedInfoValueForKey(@"CFBundleName") stringByAppendingPathExtension:@"app"]]; } } @catch(NSException *e) diff --git a/SUUtilities.m b/SUUtilities.m index 4ef51774..2ee0d787 100644 --- a/SUUtilities.m +++ b/SUUtilities.m @@ -14,11 +14,7 @@ id SUUnlocalizedInfoValueForKey(NSString *key) { - // Okay, but if it isn't there, let's use the general one. - id value = [[[NSBundle mainBundle] infoDictionary] valueForKey:key]; - if (!value) - return SUInfoValueForKey(key); - return value; + return [[[NSBundle mainBundle] infoDictionary] objectForKey:key]; } id SUInfoValueForKey(NSString *key) diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 7a65c0ce..c9607372 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -63,7 +63,7 @@ isa = PBXContainerItemProxy; containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; proxyType = 1; - remoteGlobalIDString = 6132423F0CD06DB000106AA4 /* Relaunch Tool */; + remoteGlobalIDString = 6132423F0CD06DB000106AA4; remoteInfo = "Relaunch Tool"; }; 61B5F91B09C4CF7200B25A18 /* PBXContainerItemProxy */ = { @@ -786,6 +786,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_VERSION = A; + GCC_C_LANGUAGE_STANDARD = c99; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; diff --git a/Test Application/English.lproj/InfoPlist.strings b/Test Application/English.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..a68375996326daf76c4e37848b2a80770041b704 GIT binary patch literal 268 zcmYL^%?`mp6h_b5Q#6(${uVZ3fka5K(8Rv}1+8dFcq1=~(^|+RbMJifedo@6-gPPj zOh{M}apJ&}4QsW#^-8Le5L*N5)_v@0YhUA1_){{~qwYuHs!*ronh`SM##wI6-1|sw z#M0D;frN{RtNb1Ng3*;z=H=cqvGz7#Y9f=8`o6vWk*aEohO4c+yY`g-zA&JJ}Z Yk~0>b{(lHn@_Dfn1Afz*{-aTFzUV71c>n+a literal 0 HcmV?d00001 diff --git a/Test Application/Test Application-Info.plist b/Test Application/Test Application-Info.plist index f45f17cf..8ebbfac1 100644 --- a/Test Application/Test Application-Info.plist +++ b/Test Application/Test Application-Info.plist @@ -8,6 +8,8 @@ ${EXECUTABLE_NAME} CFBundleIconFile Sparkle + CFBundleName + Sparkle Test App CFBundleIdentifier org.andymatuschak.SparkleTestApp CFBundleInfoDictionaryVersion