From cd3d7d9f98076faa6602811d2fc366cd68ff370c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesi=C5=84ski?= Date: Tue, 8 Mar 2016 23:23:41 +0000 Subject: [PATCH 1/7] Fix #776 --- Sparkle/SUFileManager.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sparkle/SUFileManager.m b/Sparkle/SUFileManager.m index be5ef09b..725e78ac 100644 --- a/Sparkle/SUFileManager.m +++ b/Sparkle/SUFileManager.m @@ -267,7 +267,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) { // root-level symbolic link. NSString *rootURLPath = rootURL.path; NSDictionary *rootAttributes = [_fileManager attributesOfItemAtPath:rootURLPath error:nil]; - NSString *rootType = rootAttributes[NSFileType]; + NSString *rootType = [rootAttributes objectForKey:NSFileType]; // 10.7 can't subscript this if ([rootType isEqualToString:NSFileTypeDirectory]) { // The NSDirectoryEnumerator will avoid recursing into any contained From 28e8a1fdafa3b8c2c1879c10c2c0d315e358cddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesi=C5=84ski?= Date: Wed, 9 Mar 2016 00:09:04 +0000 Subject: [PATCH 2/7] More workarounds for OS X 10.7 #776 --- Sparkle/SUBinaryDeltaCommon.m | 4 ++-- Sparkle/SUFileManager.m | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Sparkle/SUBinaryDeltaCommon.m b/Sparkle/SUBinaryDeltaCommon.m index be3966ce..de247ee5 100644 --- a/Sparkle/SUBinaryDeltaCommon.m +++ b/Sparkle/SUBinaryDeltaCommon.m @@ -231,12 +231,12 @@ BOOL modifyPermissions(NSString *path, mode_t desiredPermissions) if (!attributes) { return NO; } - NSNumber *permissions = attributes[NSFilePosixPermissions]; + NSNumber *permissions = [attributes objectForKey:NSFilePosixPermissions]; if (!permissions) { return NO; } mode_t newMode = ([permissions unsignedShortValue] & ~PERMISSION_FLAGS) | desiredPermissions; - int (*changeModeFunc)(const char *, mode_t) = [attributes[NSFileType] isEqualToString:NSFileTypeSymbolicLink] ? lchmod : chmod; + int (*changeModeFunc)(const char *, mode_t) = [[attributes objectForKey:NSFileType] isEqualToString:NSFileTypeSymbolicLink] ? lchmod : chmod; if (changeModeFunc([path fileSystemRepresentation], newMode) != 0) { return NO; } diff --git a/Sparkle/SUFileManager.m b/Sparkle/SUFileManager.m index 725e78ac..d0fc3b00 100644 --- a/Sparkle/SUFileManager.m +++ b/Sparkle/SUFileManager.m @@ -151,7 +151,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) { } if (isDirectory != NULL) { - *isDirectory = [attributes[NSFileType] isEqualToString:NSFileTypeDirectory]; + *isDirectory = [[attributes objectForKey:NSFileType] isEqualToString:NSFileTypeDirectory]; } return YES; @@ -595,7 +595,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) { return NO; } - NSNumber *ownerID = matchFileAttributes[NSFileOwnerAccountID]; + NSNumber *ownerID = [matchFileAttributes objectForKey:NSFileOwnerAccountID]; if (ownerID == nil) { // shouldn't be possible to error here, but just in case if (error != NULL) { @@ -604,7 +604,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) { return NO; } - NSNumber *groupID = matchFileAttributes[NSFileGroupOwnerAccountID]; + NSNumber *groupID = [matchFileAttributes objectForKey:NSFileGroupOwnerAccountID]; if (groupID == nil) { // shouldn't be possible to error here, but just in case if (error != NULL) { @@ -613,8 +613,8 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) { return NO; } - NSNumber *targetOwnerID = targetFileAttributes[NSFileOwnerAccountID]; - NSNumber *targetGroupID = targetFileAttributes[NSFileGroupOwnerAccountID]; + NSNumber *targetOwnerID = [targetFileAttributes objectForKey:NSFileOwnerAccountID]; + NSNumber *targetGroupID = [targetFileAttributes objectForKey:NSFileGroupOwnerAccountID]; if ((targetOwnerID != nil && [ownerID isEqualToNumber:targetOwnerID]) && (targetGroupID != nil && [groupID isEqualToNumber:targetGroupID])) { // Assume they're the same even if we don't check every file recursively From 317423ae78aaa7ee62ed29ad7624522d8743f5eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesi=C5=84ski?= Date: Wed, 9 Mar 2016 00:33:59 +0000 Subject: [PATCH 3/7] One more attr fix #776 --- Sparkle/SUPipedUnarchiver.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sparkle/SUPipedUnarchiver.m b/Sparkle/SUPipedUnarchiver.m index 7317143d..dc0b5192 100644 --- a/Sparkle/SUPipedUnarchiver.m +++ b/Sparkle/SUPipedUnarchiver.m @@ -62,7 +62,8 @@ SULog(@"Extracting using '%@' '%@' < '%@' '%@'", command, [args componentsJoinedByString:@"' '"], self.archivePath, destination); // Get the file size. - NSUInteger expectedLength = [[[NSFileManager defaultManager] attributesOfItemAtPath:self.archivePath error:nil][NSFileSize] unsignedIntegerValue]; + NSDictionary *attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:self.archivePath error:nil]; + NSUInteger expectedLength = [[attributes objectForKey:NSFileSize] unsignedIntegerValue]; if (expectedLength > 0) { NSFileHandle *archiveInput = [NSFileHandle fileHandleForReadingAtPath:self.archivePath]; From 34a78d59fc65d113512637e2f02c1ea61236aa0e Mon Sep 17 00:00:00 2001 From: kleuter Date: Wed, 9 Mar 2016 12:07:51 +0100 Subject: [PATCH 4/7] Fixed crash on 10.7 - subscript operator not available https://github.com/sparkle-project/Sparkle/issues/776 related --- Sparkle/SUOperatingSystem.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Sparkle/SUOperatingSystem.m b/Sparkle/SUOperatingSystem.m index 85c18ebc..d9f1e90a 100644 --- a/Sparkle/SUOperatingSystem.m +++ b/Sparkle/SUOperatingSystem.m @@ -20,10 +20,11 @@ { NSOperatingSystemVersion version = { 0, 0, 0 }; NSURL *coreServices = [[NSFileManager defaultManager] URLForDirectory:NSCoreServiceDirectory inDomain:NSSystemDomainMask appropriateForURL:nil create:NO error:nil]; - NSArray *components = [[NSDictionary dictionaryWithContentsOfURL:[coreServices URLByAppendingPathComponent:@"SystemVersion.plist"]][@"ProductVersion"] componentsSeparatedByString:@"."]; - version.majorVersion = components.count > 0 ? [components[0] integerValue] : 0; - version.minorVersion = components.count > 1 ? [components[1] integerValue] : 0; - version.patchVersion = components.count > 2 ? [components[2] integerValue] : 0; + NSDictionary *dictionary = [NSDictionary dictionaryWithContentsOfURL:[coreServices URLByAppendingPathComponent:@"SystemVersion.plist"]]; + NSArray *components = [ [dictionary objectForKey: @"ProductVersion"] componentsSeparatedByString:@"."]; + version.majorVersion = components.count > 0 ? [ [components objectAtIndex:0] integerValue] : 0; + version.minorVersion = components.count > 1 ? [ [components objectAtIndex:1] integerValue] : 0; + version.patchVersion = components.count > 2 ? [ [components objectAtIndex:2] integerValue] : 0; return version; } #endif From 77511c8f196ebd99a007524a1dd0c4fefaae8ef7 Mon Sep 17 00:00:00 2001 From: kleuter Date: Wed, 9 Mar 2016 12:07:51 +0100 Subject: [PATCH 5/7] Fixed crash on 10.7 - subscript operator not available https://github.com/sparkle-project/Sparkle/issues/776 related --- Sparkle/SUOperatingSystem.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Sparkle/SUOperatingSystem.m b/Sparkle/SUOperatingSystem.m index 85c18ebc..d9f1e90a 100644 --- a/Sparkle/SUOperatingSystem.m +++ b/Sparkle/SUOperatingSystem.m @@ -20,10 +20,11 @@ { NSOperatingSystemVersion version = { 0, 0, 0 }; NSURL *coreServices = [[NSFileManager defaultManager] URLForDirectory:NSCoreServiceDirectory inDomain:NSSystemDomainMask appropriateForURL:nil create:NO error:nil]; - NSArray *components = [[NSDictionary dictionaryWithContentsOfURL:[coreServices URLByAppendingPathComponent:@"SystemVersion.plist"]][@"ProductVersion"] componentsSeparatedByString:@"."]; - version.majorVersion = components.count > 0 ? [components[0] integerValue] : 0; - version.minorVersion = components.count > 1 ? [components[1] integerValue] : 0; - version.patchVersion = components.count > 2 ? [components[2] integerValue] : 0; + NSDictionary *dictionary = [NSDictionary dictionaryWithContentsOfURL:[coreServices URLByAppendingPathComponent:@"SystemVersion.plist"]]; + NSArray *components = [ [dictionary objectForKey: @"ProductVersion"] componentsSeparatedByString:@"."]; + version.majorVersion = components.count > 0 ? [ [components objectAtIndex:0] integerValue] : 0; + version.minorVersion = components.count > 1 ? [ [components objectAtIndex:1] integerValue] : 0; + version.patchVersion = components.count > 2 ? [ [components objectAtIndex:2] integerValue] : 0; return version; } #endif From 1c8d54166b7829ec12dc659983c66be2b347d98e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesi=C5=84ski?= Date: Fri, 11 Mar 2016 09:11:12 +0000 Subject: [PATCH 6/7] v1.14.0 --- CHANGELOG | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b514cb8d..d730c9db 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,15 +1,17 @@ -# 1.14.0 +# 1.14.0 (Mar 11, 2016) +* Disable javascript by default and make it opt-in (Zorg) * URL-encoding of appcast URLs is preserved (Kornel Lesiński) * Delegate is asked for fallback updates if delta update fails (Kornel Lesiński) +* Fixed crash on 10.7 - subscript operator not available (kleuter) * Fixed check of feed URL before delegate had a chance to set it (Kornel Lesiński) * Re-added support for password-protected dmg images (Andrew K. Boyd) * Added warning about ATS blocking (Kornel Lesiński) * Translation fixes for pt-BR. (vitu) * Add some Japanese lozalized strings (1024jp) * Made test app available in all languages #695 (LIU Dongyuan / 柳东原) -* Removed a test resource from the framework bundle (Karl Moskowski) * Czech localizations update (Frantisek Erben) +* Removed a test resource from the framework bundle (Karl Moskowski) * Test if the updated app is the frontmost one (Zorg) * UI Tests for the Test Application (Zorg) From 698e737b565365b006c9bcd0406907b24321dd90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesi=C5=84ski?= Date: Sat, 12 Mar 2016 01:16:51 +0000 Subject: [PATCH 7/7] CocoaPods --- Makefile | 2 ++ Sparkle.podspec | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f46efad9..f27e6e8c 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,8 @@ localizable-strings: release: xcodebuild -scheme Distribution -configuration Release -derivedDataPath "$(BUILDDIR)" build open -R "$(BUILDDIR)/Build/Products/Release/Sparkle-"*.tar.bz2 + cat Sparkle.podspec + @echo "Don't forget to update CocoaPods!" build: xcodebuild clean build diff --git a/Sparkle.podspec b/Sparkle.podspec index 889a31e7..e895c250 100644 --- a/Sparkle.podspec +++ b/Sparkle.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Sparkle" - s.version = "1.13.1" + s.version = "1.14.0" s.summary = "A software update framework for OS X" s.description = "Sparkle is an easy-to-use software update framework for Cocoa developers." s.homepage = "http://sparkle-project.org"