From 503a29208436305940747eee5e473b78ecef8147 Mon Sep 17 00:00:00 2001 From: Csaba Horony Date: Thu, 12 Apr 2018 16:41:06 +0200 Subject: [PATCH 01/28] added localization files for Hungarian translation --- Sparkle.xcodeproj/project.pbxproj | 12 +- Sparkle/hu.lproj/SUAutomaticUpdateAlert.xib | 118 +++++++++ Sparkle/hu.lproj/SUUpdateAlert.xib | 247 ++++++++++++++++++ Sparkle/hu.lproj/SUUpdatePermissionPrompt.xib | 226 ++++++++++++++++ Sparkle/hu.lproj/Sparkle.strings | 89 +++++++ 5 files changed, 690 insertions(+), 2 deletions(-) create mode 100644 Sparkle/hu.lproj/SUAutomaticUpdateAlert.xib create mode 100644 Sparkle/hu.lproj/SUUpdateAlert.xib create mode 100644 Sparkle/hu.lproj/SUUpdatePermissionPrompt.xib create mode 100644 Sparkle/hu.lproj/Sparkle.strings diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 7c8d4c59..9a8d7e18 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -475,6 +475,11 @@ 0263187714FEBB42005EBF43 /* uk */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = uk; path = uk.lproj/SUUpdatePermissionPrompt.xib; sourceTree = ""; }; 0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 0A8DAD73207FA6F300FFD934 /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/Sparkle.strings; sourceTree = ""; }; + 0A8DAD74207FA6F300FFD934 /* hu */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = hu; path = hu.lproj/SUAutomaticUpdateAlert.xib; sourceTree = ""; }; + 0A8DAD75207FA6F300FFD934 /* hu */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = hu; path = hu.lproj/SUUpdateAlert.xib; sourceTree = ""; }; + 0A8DAD76207FA6F400FFD934 /* hu */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = hu; path = hu.lproj/SUUpdatePermissionPrompt.xib; sourceTree = ""; }; + 0A8DAD77207FA6F400FFD934 /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/InfoPlist.strings; sourceTree = ""; }; 1420DF4D196247B500203BB0 /* build-docs.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "build-docs.sh"; sourceTree = ""; }; 1420DF4E196247B500203BB0 /* Doxyfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Doxyfile; sourceTree = ""; }; 1420DF4F196247F900203BB0 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; @@ -513,7 +518,6 @@ 1A985A3B1C5C32A60001163A /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; 1A985A3C1C5C32A70001163A /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/InfoPlist.strings; sourceTree = ""; }; 1A985A3D1C5C32A80001163A /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/InfoPlist.strings; sourceTree = ""; }; - 1A985A3E1C5C32A90001163A /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/InfoPlist.strings; sourceTree = ""; }; 1A985A3F1C5C32AA0001163A /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = id; path = id.lproj/InfoPlist.strings; sourceTree = ""; }; 1A985A401C5C32AA0001163A /* is */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = is; path = is.lproj/InfoPlist.strings; sourceTree = ""; }; 1A985A411C5C32AB0001163A /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/InfoPlist.strings; sourceTree = ""; }; @@ -2236,6 +2240,7 @@ 0263187514FEBB42005EBF43 /* uk */, 55C14BEC136EF20D00649790 /* zh_CN */, 55C14BED136EF20D00649790 /* zh_TW */, + 0A8DAD74207FA6F300FFD934 /* hu */, ); name = SUAutomaticUpdateAlert.xib; sourceTree = ""; @@ -2270,6 +2275,7 @@ 0263187614FEBB42005EBF43 /* uk */, 55C14C02136EF26100649790 /* zh_CN */, 55C14C03136EF26100649790 /* zh_TW */, + 0A8DAD75207FA6F300FFD934 /* hu */, ); name = SUUpdateAlert.xib; sourceTree = ""; @@ -2304,6 +2310,7 @@ 0263187714FEBB42005EBF43 /* uk */, 55C14C17136EF2C700649790 /* zh_CN */, 55C14C18136EF2C700649790 /* zh_TW */, + 0A8DAD76207FA6F400FFD934 /* hu */, ); name = SUUpdatePermissionPrompt.xib; sourceTree = ""; @@ -2341,6 +2348,7 @@ 0263187214FEBB31005EBF43 /* uk */, 61131A090F846D0A00E97AF6 /* zh_CN */, 61131A0A0F846D1100E97AF6 /* zh_TW */, + 0A8DAD73207FA6F300FFD934 /* hu */, ); name = Sparkle.strings; sourceTree = ""; @@ -2361,7 +2369,6 @@ 1A985A331C5C329D0001163A /* fr */, 1A985A4B1C5C32B60001163A /* fr-CA */, 1A985A3D1C5C32A80001163A /* he */, - 1A985A3E1C5C32A90001163A /* hu */, 1A985A3F1C5C32AA0001163A /* id */, 1A985A401C5C32AA0001163A /* is */, 1A985A361C5C32A20001163A /* it */, @@ -2383,6 +2390,7 @@ 1A985A511C5C32BB0001163A /* uk */, 1A985A4A1C5C32B50001163A /* zh-Hans */, 1A985A351C5C329E0001163A /* zh-Hant */, + 0A8DAD77207FA6F400FFD934 /* hu */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Sparkle/hu.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/hu.lproj/SUAutomaticUpdateAlert.xib new file mode 100644 index 00000000..deb217f9 --- /dev/null +++ b/Sparkle/hu.lproj/SUAutomaticUpdateAlert.xib @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sparkle/hu.lproj/SUUpdateAlert.xib b/Sparkle/hu.lproj/SUUpdateAlert.xib new file mode 100644 index 00000000..bc4a21c3 --- /dev/null +++ b/Sparkle/hu.lproj/SUUpdateAlert.xib @@ -0,0 +1,247 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NSNegateBoolean + + + + + + + + + + + + + + + + + + NSNegateBoolean + + + + + + + + + + + + + + + + + + NSNegateBoolean + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sparkle/hu.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/hu.lproj/SUUpdatePermissionPrompt.xib new file mode 100644 index 00000000..c3d36ea7 --- /dev/null +++ b/Sparkle/hu.lproj/SUUpdatePermissionPrompt.xib @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + visibleKey + visibleValue + displayValue + displayKey + + + + + + + + + + + + + + + Anonymous system profile information is used to help us plan future development work. Please contact us if you have any questions about this. + +This is the information that would be sent: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SUIncludeProfile + SUSendProfileInfo + + + + + + + diff --git a/Sparkle/hu.lproj/Sparkle.strings b/Sparkle/hu.lproj/Sparkle.strings new file mode 100644 index 00000000..ecd2a001 --- /dev/null +++ b/Sparkle/hu.lproj/Sparkle.strings @@ -0,0 +1,89 @@ +"%1$@ %2$@ has been downloaded and is ready to use! This is an important update; would you like to install it and relaunch %1$@ now?" = "%1$@ %2$@ has been downloaded and is ready to use! This is an important update; would you like to install it and relaunch %1$@ now?"; + +"%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?"; + +"%1$@ can't be updated, because it was opened from a read-only or a temporary location. Use Finder to copy %1$@ to the Applications folder, relaunch it from there, and try again." = "%1$@ can't be updated, because it was opened from a read-only or a temporary location. Use Finder to copy %1$@ to the Applications folder, relaunch it from there, and try again."; + +"%@ %@ is currently the newest version available." = "%1$@ %2$@ is currently the newest version available."; + +/* Description text for SUUpdateAlert when the update is downloadable. */ +"%@ %@ is now available--you have %@. Would you like to download it now?" = "%1$@ %2$@ is now available—you have %3$@. Would you like to download it now?"; + +/* Description text for SUUpdateAlert when the update informational with no download. */ +"%@ %@ is now available--you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@ is now available—you have %3$@. Would you like to learn more about this update on the web?"; + +"%@ downloaded" = "%@ downloaded"; + +"%@ of %@" = "%1$@ of %2$@"; + +"A new version of %@ is available!" = "A new version of %@ is available!"; + +"A new version of %@ is ready to install!" = "A new version of %@ is ready to install!"; + +"An error occurred in retrieving update information. Please try again later." = "An error occurred in retrieving update information. Please try again later."; + +"An error occurred while downloading the update. Please try again later." = "An error occurred while downloading the update. Please try again later."; + +"An error occurred while extracting the archive. Please try again later." = "An error occurred while extracting the archive. Please try again later."; + +"An error occurred while installing the update. Please try again later." = "An error occurred while installing the update. Please try again later."; + +"An error occurred while parsing the update feed." = "An error occurred while parsing the update feed."; + +"An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@." = "An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@."; + +"An important update to %@ is ready to install" = "An important update to %@ is ready to install"; + +/* the unit for bytes */ +"B" = "B"; + +"Cancel" = "Cancel"; + +"Cancel Update" = "Cancel Update"; + +"Checking for updates..." = "Checking for updates…"; + +/* Take care not to overflow the status window. */ +"Downloading update..." = "Downloading update…"; + +/* Take care not to overflow the status window. */ +"Extracting update..." = "Extracting update…"; + +/* the unit for gigabytes */ +"GB" = "GB"; + +"Install and Relaunch" = "Install and Relaunch"; + +/* Take care not to overflow the status window. */ +"Installing update..." = "Installing update…"; + +/* the unit for kilobytes */ +"KB" = "KB"; + +/* Alternative name for "Install" button if we have a paid update or other update + without a download but with a URL. */ +"Learn More..." = "Learn More…"; + +/* the unit for megabytes */ +"MB" = "MB"; + +/* OK button. */ +"OK" = "OK"; + +/* Status message on progress window once download has finished. */ +"Ready to Install" = "Ready to Install"; + +/* Message that is optionally shown at startup to allow users to turn on/off update checks. */ +"Should %1$@ automatically check for updates? You can always check for updates manually from the %1$@ menu." = "Should %1$@ automatically check for updates? You can always check for updates manually from the %1$@ menu."; + +"The update is improperly signed." = "The update is improperly signed."; + +"Update Error!" = "Update Error!"; + +"Updating %@" = "Updating %@"; + +/* 'Error' message when the user checks for updates but is already current or the feed doesn't contain any updates. (not necessarily shown in UI) */ +"You already have the newest version of %@." = "You already have the newest version of %@."; + +/* Status message shown when the user checks for updates but is already current or the feed doesn't contain any updates. */ +"You're up-to-date!" = "You’re up-to-date!"; From 5bc8f3e535754244daedf04d5f5920b1430cb604 Mon Sep 17 00:00:00 2001 From: Csaba Horony Date: Fri, 13 Apr 2018 10:29:39 +0200 Subject: [PATCH 02/28] Hungarian localization --- Sparkle/hu.lproj/SUAutomaticUpdateAlert.xib | 24 +++---- Sparkle/hu.lproj/SUUpdateAlert.xib | 26 ++++---- Sparkle/hu.lproj/SUUpdatePermissionPrompt.xib | 16 ++--- Sparkle/hu.lproj/Sparkle.strings | 66 +++++++++---------- 4 files changed, 65 insertions(+), 67 deletions(-) diff --git a/Sparkle/hu.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/hu.lproj/SUAutomaticUpdateAlert.xib index deb217f9..fd910c4b 100644 --- a/Sparkle/hu.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/hu.lproj/SUAutomaticUpdateAlert.xib @@ -18,11 +18,11 @@ - + - + @@ -34,7 +34,7 @@ - + @@ -46,7 +46,7 @@ - + @@ -58,9 +58,9 @@ - + + + + + + + + + + + + diff --git a/Sparkle/fi.lproj/SUUpdateAlert.xib b/Sparkle/fi.lproj/SUUpdateAlert.xib new file mode 100644 index 00000000..22b544d1 --- /dev/null +++ b/Sparkle/fi.lproj/SUUpdateAlert.xib @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NSNegateBoolean + + + + + + + + + + + + + + + + + + NSNegateBoolean + + + + + + + + + + + + + + + + + + NSNegateBoolean + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sparkle/fi.lproj/SUUpdatePermissionPrompt.xib b/Sparkle/fi.lproj/SUUpdatePermissionPrompt.xib new file mode 100644 index 00000000..c99d50b1 --- /dev/null +++ b/Sparkle/fi.lproj/SUUpdatePermissionPrompt.xib @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + visibleKey + visibleValue + displayValue + displayKey + + + + + + + + + + + + + + + Anonymous system profile information is used to help us plan future development work. Please contact us if you have any questions about this. + +This is the information that would be sent: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SUIncludeProfile + SUSendProfileInfo + + + + + + + diff --git a/Sparkle/fi.lproj/Sparkle.strings b/Sparkle/fi.lproj/Sparkle.strings index 8c412406..dcef7e66 100644 --- a/Sparkle/fi.lproj/Sparkle.strings +++ b/Sparkle/fi.lproj/Sparkle.strings @@ -28,8 +28,12 @@ "Cancel" = "Kumoa"; +"Cancel Update" = "Peruuta päivitykset"; + "Check for updates on startup?" = "Tarkista päivityksiä käynnistyksen yhteydessä?"; +"Checking for updates..." = "Tarkistetaan päivityksiä…"; + "Downloading update..." = "Haen päivitystä…"; "Extracting update..." = "Puran päivitystä…"; From 9ae41fe4abe3085ae7e16b5653ecd91588a56c92 Mon Sep 17 00:00:00 2001 From: Kent Sutherland Date: Thu, 14 Jun 2018 20:31:20 +0200 Subject: [PATCH 22/28] Explicitly specify types to silence "Messaging unqualified id" warning that's new in Xcode 10. Removed __has_feature(objc_generics) check and use generisc to help silence the warnings. --- Sparkle/Autoupdate/Autoupdate.m | 2 +- Sparkle/SPUURLRequest.m | 2 +- Sparkle/SUAppcast.h | 5 ----- Sparkle/SUAppcastItem.m | 4 ++-- Sparkle/SUAutomaticUpdateAlert.m | 2 +- Sparkle/SUBinaryDeltaCommon.m | 2 +- Sparkle/SUDSAVerifier.m | 2 +- Sparkle/SUFileManager.m | 8 ++++---- Sparkle/SUHost.m | 2 +- Sparkle/SUOperatingSystem.m | 2 +- Sparkle/SUPipedUnarchiver.m | 2 +- Sparkle/SUStatusController.m | 2 +- Sparkle/SUUpdateAlert.m | 4 ++-- Sparkle/SUUpdatePermissionPrompt.h | 2 +- Sparkle/SUUpdatePermissionPrompt.m | 8 ++++---- Sparkle/SUUpdater.h | 4 ---- Sparkle/SUUpdater.m | 8 ++++---- Sparkle/SUUpdaterDelegate.h | 4 ---- TestApplication/SUTestApplicationDelegate.m | 2 +- TestApplication/SUTestWebServer.m | 2 +- fileop/fileop.m | 16 ++++++++-------- 21 files changed, 36 insertions(+), 49 deletions(-) diff --git a/Sparkle/Autoupdate/Autoupdate.m b/Sparkle/Autoupdate/Autoupdate.m index 44cf3a59..ea4083f8 100644 --- a/Sparkle/Autoupdate/Autoupdate.m +++ b/Sparkle/Autoupdate/Autoupdate.m @@ -232,7 +232,7 @@ int main(int __unused argc, const char __unused *argv[]) { @autoreleasepool { - NSArray *args = [[NSProcessInfo processInfo] arguments]; + NSArray *args = [[NSProcessInfo processInfo] arguments]; if (args.count < 5 || args.count > 7) { return EXIT_FAILURE; } diff --git a/Sparkle/SPUURLRequest.m b/Sparkle/SPUURLRequest.m index fad9fcd5..13e4ad3a 100644 --- a/Sparkle/SPUURLRequest.m +++ b/Sparkle/SPUURLRequest.m @@ -50,7 +50,7 @@ static NSString *SPUURLRequestNetworkServiceTypeKey = @"SPUURLRequestNetworkServ + (instancetype)URLRequestWithRequest:(NSURLRequest *)request { - return [[[self class] alloc] initWithURL:request.URL cachePolicy:request.cachePolicy timeoutInterval:request.timeoutInterval httpHeaderFields:request.allHTTPHeaderFields networkServiceType:request.networkServiceType]; + return [(SPUURLRequest *)[[self class] alloc] initWithURL:request.URL cachePolicy:request.cachePolicy timeoutInterval:request.timeoutInterval httpHeaderFields:request.allHTTPHeaderFields networkServiceType:request.networkServiceType]; } + (BOOL)supportsSecureCoding diff --git a/Sparkle/SUAppcast.h b/Sparkle/SUAppcast.h index f2f43389..34276b7d 100644 --- a/Sparkle/SUAppcast.h +++ b/Sparkle/SUAppcast.h @@ -22,12 +22,7 @@ NS_ASSUME_NONNULL_BEGIN SU_EXPORT @interface SUAppcast : NSObject @property (copy, nullable) NSString *userAgentString; - -#if __has_feature(objc_generics) @property (copy, nullable) NSDictionary *httpHeaders; -#else -@property (copy, nullable) NSDictionary *httpHeaders; -#endif - (void)fetchAppcastFromURL:(NSURL *)url inBackground:(BOOL)bg completionBlock:(void (^)(NSError *_Nullable))err; - (SUAppcast *)copyWithoutDeltaUpdates; diff --git a/Sparkle/SUAppcastItem.m b/Sparkle/SUAppcastItem.m index c4293034..89e4580a 100644 --- a/Sparkle/SUAppcastItem.m +++ b/Sparkle/SUAppcastItem.m @@ -55,7 +55,7 @@ - (BOOL)isCriticalUpdate { - return [[self.propertiesDictionary objectForKey:SUAppcastElementTags] containsObject:SUAppcastElementCriticalUpdate]; + return [(NSArray *)[self.propertiesDictionary objectForKey:SUAppcastElementTags] containsObject:SUAppcastElementCriticalUpdate]; } - (BOOL)isMacOsUpdate @@ -97,7 +97,7 @@ // Separate the url by underscores and take the last component, as that'll be closest to the end, // then we remove the extension. Hopefully, this will be the version. - NSArray *fileComponents = [[enclosure objectForKey:SURSSAttributeURL] componentsSeparatedByString:@"_"]; + NSArray *fileComponents = [(NSString *)[enclosure objectForKey:SURSSAttributeURL] componentsSeparatedByString:@"_"]; if ([fileComponents count] > 1) { newVersion = [[fileComponents lastObject] stringByDeletingPathExtension]; } diff --git a/Sparkle/SUAutomaticUpdateAlert.m b/Sparkle/SUAutomaticUpdateAlert.m index f0e7fea9..6ecc20b1 100644 --- a/Sparkle/SUAutomaticUpdateAlert.m +++ b/Sparkle/SUAutomaticUpdateAlert.m @@ -110,7 +110,7 @@ static NSString *const SUAutomaticUpdateAlertTouchBarIndentifier = @"" SPARKLE_B - (NSTouchBar *)makeTouchBar { - NSTouchBar *touchBar = [[NSClassFromString(@"NSTouchBar") alloc] init]; + NSTouchBar *touchBar = [(NSTouchBar *)[NSClassFromString(@"NSTouchBar") alloc] init]; touchBar.defaultItemIdentifiers = @[SUAutomaticUpdateAlertTouchBarIndentifier,]; touchBar.principalItemIdentifier = SUAutomaticUpdateAlertTouchBarIndentifier; touchBar.delegate = self; diff --git a/Sparkle/SUBinaryDeltaCommon.m b/Sparkle/SUBinaryDeltaCommon.m index b5731cbe..8ede8dcb 100644 --- a/Sparkle/SUBinaryDeltaCommon.m +++ b/Sparkle/SUBinaryDeltaCommon.m @@ -242,7 +242,7 @@ BOOL modifyPermissions(NSString *path, mode_t desiredPermissions) return NO; } mode_t newMode = ([permissions unsignedShortValue] & ~PERMISSION_FLAGS) | desiredPermissions; - int (*changeModeFunc)(const char *, mode_t) = [[attributes objectForKey:NSFileType] isEqualToString:NSFileTypeSymbolicLink] ? lchmod : chmod; + int (*changeModeFunc)(const char *, mode_t) = [(NSString *)[attributes objectForKey:NSFileType] isEqualToString:NSFileTypeSymbolicLink] ? lchmod : chmod; if (changeModeFunc([path fileSystemRepresentation], newMode) != 0) { return NO; } diff --git a/Sparkle/SUDSAVerifier.m b/Sparkle/SUDSAVerifier.m index a0fa38a9..8aa6a2e2 100644 --- a/Sparkle/SUDSAVerifier.m +++ b/Sparkle/SUDSAVerifier.m @@ -34,7 +34,7 @@ return NO; } - SUDSAVerifier *verifier = [[self alloc] initWithPublicKeyData:[pkeyString dataUsingEncoding:NSUTF8StringEncoding]]; + SUDSAVerifier *verifier = [(SUDSAVerifier *)[self alloc] initWithPublicKeyData:[pkeyString dataUsingEncoding:NSUTF8StringEncoding]]; if (!verifier) { return NO; diff --git a/Sparkle/SUFileManager.m b/Sparkle/SUFileManager.m index 1ab95cbf..03fdaaa9 100644 --- a/Sparkle/SUFileManager.m +++ b/Sparkle/SUFileManager.m @@ -71,12 +71,12 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) { + (instancetype)defaultManager { - return [[self alloc] initWithAuthorizationToolPath:nil]; + return [(SUFileManager *)[self alloc] initWithAuthorizationToolPath:nil]; } + (instancetype)fileManagerWithAuthorizationToolPath:(NSString *)authorizationToolPath { - return [[self alloc] initWithAuthorizationToolPath:authorizationToolPath]; + return [(SUFileManager *)[self alloc] initWithAuthorizationToolPath:authorizationToolPath]; } - (instancetype)fileManagerByPreservingAuthorizationRights @@ -269,7 +269,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) { } if (isDirectory != NULL) { - *isDirectory = [[attributes objectForKey:NSFileType] isEqualToString:NSFileTypeDirectory]; + *isDirectory = [(NSString *)[attributes objectForKey:NSFileType] isEqualToString:NSFileTypeDirectory]; } return YES; @@ -304,7 +304,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) { - (BOOL)_removeQuarantineWithAuthenticationAtRootURL:(NSURL *)rootURL error:(NSError *__autoreleasing *)error { // Because this is a system utility, it's fine to follow the symbolic link if one exists - if (![_fileManager fileExistsAtPath:@(XATTR_UTILITY_PATH)]) { + if (![_fileManager fileExistsAtPath:(NSString *)@(XATTR_UTILITY_PATH)]) { if (error != NULL) { *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileNoSuchFileError userInfo:@{ NSLocalizedDescriptionKey: @"xattr utility does not exist on this system." }]; } diff --git a/Sparkle/SUHost.m b/Sparkle/SUHost.m index fe7345cd..658aa9ae 100644 --- a/Sparkle/SUHost.m +++ b/Sparkle/SUHost.m @@ -161,7 +161,7 @@ - (BOOL)boolForInfoDictionaryKey:(NSString *)key { - return [[self objectForInfoDictionaryKey:key] boolValue]; + return [(NSNumber *)[self objectForInfoDictionaryKey:key] boolValue]; } - (id)objectForUserDefaultsKey:(NSString *)defaultName diff --git a/Sparkle/SUOperatingSystem.m b/Sparkle/SUOperatingSystem.m index fada18c3..6cda6499 100644 --- a/Sparkle/SUOperatingSystem.m +++ b/Sparkle/SUOperatingSystem.m @@ -32,7 +32,7 @@ NSURL *url = [coreServices URLByAppendingPathComponent:@"SystemVersion.plist"]; assert(url != nil); NSDictionary *dictionary = [NSDictionary dictionaryWithContentsOfURL:url]; - NSArray *components = [ [dictionary objectForKey: @"ProductVersion"] componentsSeparatedByString:@"."]; + NSArray *components = [ (NSString *)[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; diff --git a/Sparkle/SUPipedUnarchiver.m b/Sparkle/SUPipedUnarchiver.m index 3c3e2005..1aa17163 100644 --- a/Sparkle/SUPipedUnarchiver.m +++ b/Sparkle/SUPipedUnarchiver.m @@ -100,7 +100,7 @@ // Get the file size. NSDictionary *attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:self.archivePath error:nil]; - NSUInteger expectedLength = [[attributes objectForKey:NSFileSize] unsignedIntegerValue]; + NSUInteger expectedLength = [(NSNumber *)[attributes objectForKey:NSFileSize] unsignedIntegerValue]; if (expectedLength > 0) { NSFileHandle *archiveInput = [NSFileHandle fileHandleForReadingAtPath:self.archivePath]; diff --git a/Sparkle/SUStatusController.m b/Sparkle/SUStatusController.m index 79661065..7bb932ab 100644 --- a/Sparkle/SUStatusController.m +++ b/Sparkle/SUStatusController.m @@ -136,7 +136,7 @@ static NSString *const SUStatusControllerTouchBarIndentifier = @"" SPARKLE_BUNDL - (NSTouchBar *)makeTouchBar { - NSTouchBar *touchBar = [[NSClassFromString(@"NSTouchBar") alloc] init]; + NSTouchBar *touchBar = [(NSTouchBar *)[NSClassFromString(@"NSTouchBar") alloc] init]; touchBar.defaultItemIdentifiers = @[ SUStatusControllerTouchBarIndentifier,]; touchBar.principalItemIdentifier = SUStatusControllerTouchBarIndentifier; touchBar.delegate = self; diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index c635274f..f6e4eec5 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -263,7 +263,7 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE return finalString; } -- (void)webView:(WebView *)sender didFinishLoadForFrame:frame +- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame { if ([frame parentFrame] == nil) { self.webViewFinishedLoading = YES; @@ -329,7 +329,7 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE - (NSTouchBar *)makeTouchBar { - NSTouchBar *touchBar = [[NSClassFromString(@"NSTouchBar") alloc] init]; + NSTouchBar *touchBar = [(NSTouchBar *)[NSClassFromString(@"NSTouchBar") alloc] init]; touchBar.defaultItemIdentifiers = @[SUUpdateAlertTouchBarIndentifier,]; touchBar.principalItemIdentifier = SUUpdateAlertTouchBarIndentifier; touchBar.delegate = self; diff --git a/Sparkle/SUUpdatePermissionPrompt.h b/Sparkle/SUUpdatePermissionPrompt.h index 53f8b0da..7d1fdffd 100644 --- a/Sparkle/SUUpdatePermissionPrompt.h +++ b/Sparkle/SUUpdatePermissionPrompt.h @@ -24,7 +24,7 @@ typedef NS_ENUM(NSInteger, SUPermissionPromptResult) { + (void)promptWithHost:(SUHost *)host systemProfile:(NSArray *)profile reply:(void (^)(SUUpdatePermissionResponse *))reply; - (IBAction)toggleMoreInfo:(id)sender; -- (IBAction)finishPrompt:(id)sender; +- (IBAction)finishPrompt:(NSButton *)sender; @end #endif diff --git a/Sparkle/SUUpdatePermissionPrompt.m b/Sparkle/SUUpdatePermissionPrompt.m index 4000fd85..f038af2b 100644 --- a/Sparkle/SUUpdatePermissionPrompt.m +++ b/Sparkle/SUUpdatePermissionPrompt.m @@ -52,7 +52,7 @@ static NSString *const SUUpdatePermissionPromptTouchBarIndentifier = @"" SPARKLE - (BOOL)shouldAskAboutProfile { - return [[self.host objectForInfoDictionaryKey:SUEnableSystemProfilingKey] boolValue]; + return [(NSNumber *)[self.host objectForInfoDictionaryKey:SUEnableSystemProfilingKey] boolValue]; } - (instancetype)initWithHost:(SUHost *)aHost systemProfile:(NSArray *)profile reply:(void (^)(SUUpdatePermissionResponse *))reply @@ -80,7 +80,7 @@ static NSString *const SUUpdatePermissionPromptTouchBarIndentifier = @"" SPARKLE } if (![NSApp modalWindow]) { // do not prompt if there is is another modal window on screen - SUUpdatePermissionPrompt *prompt = [[[self class] alloc] initWithHost:host systemProfile:profile reply:reply]; + SUUpdatePermissionPrompt *prompt = [(SUUpdatePermissionPrompt *)[[self class] alloc] initWithHost:host systemProfile:profile reply:reply]; NSWindow *window = [prompt window]; if (window) { [NSApp runModalForWindow:window]; @@ -159,7 +159,7 @@ static NSString *const SUUpdatePermissionPromptTouchBarIndentifier = @"" SPARKLE [self.moreInfoView setHidden:!self.isShowingMoreInfo]; } -- (IBAction)finishPrompt:(id)sender +- (IBAction)finishPrompt:(NSButton *)sender { SUUpdatePermissionResponse *response = [[SUUpdatePermissionResponse alloc] initWithAutomaticUpdateChecks:([sender tag] == 1) sendSystemProfile:self.shouldSendProfile]; self.reply(response); @@ -170,7 +170,7 @@ static NSString *const SUUpdatePermissionPromptTouchBarIndentifier = @"" SPARKLE - (NSTouchBar *)makeTouchBar { - NSTouchBar *touchBar = [[NSClassFromString(@"NSTouchBar") alloc] init]; + NSTouchBar *touchBar = [(NSTouchBar *)[NSClassFromString(@"NSTouchBar") alloc] init]; touchBar.defaultItemIdentifiers = @[SUUpdatePermissionPromptTouchBarIndentifier,]; touchBar.principalItemIdentifier = SUUpdatePermissionPromptTouchBarIndentifier; touchBar.delegate = self; diff --git a/Sparkle/SUUpdater.h b/Sparkle/SUUpdater.h index a4744755..bc1d4916 100644 --- a/Sparkle/SUUpdater.h +++ b/Sparkle/SUUpdater.h @@ -160,11 +160,7 @@ SU_EXPORT @interface SUUpdater : NSObject The keys of this dictionary are HTTP header fields (NSString) and values are corresponding values (NSString) */ -#if __has_feature(objc_generics) @property (copy) NSDictionary *httpHeaders; -#else -@property (copy) NSDictionary *httpHeaders; -#endif /*! A property indicating whether or not the user's system profile information is sent when checking for updates. diff --git a/Sparkle/SUUpdater.m b/Sparkle/SUUpdater.m index 3c2815bc..51ab7361 100644 --- a/Sparkle/SUUpdater.m +++ b/Sparkle/SUUpdater.m @@ -88,7 +88,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults if (bundle == nil) bundle = [NSBundle mainBundle]; id updater = [sharedUpdaters objectForKey:[NSValue valueWithNonretainedObject:bundle]]; if (updater == nil) { - updater = [[[self class] alloc] initForBundle:bundle]; + updater = [(SUUpdater *)[[self class] alloc] initForBundle:bundle]; } return updater; } @@ -315,7 +315,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults } // Do not use reachability for a preflight check. This can be deceptive and a bad idea. Apple does not recommend doing it. - SUUpdateDriver *theUpdateDriver = [[(automatic ? [SUAutomaticUpdateDriver class] : [SUScheduledUpdateDriver class])alloc] initWithUpdater:self]; + SUUpdateDriver *theUpdateDriver = [(SUBasicUpdateDriver *)[(automatic ? [SUAutomaticUpdateDriver class] : [SUScheduledUpdateDriver class])alloc] initWithUpdater:self]; [self checkForUpdatesWithDriver:theUpdateDriver]; } @@ -537,7 +537,7 @@ static NSString *escapeURLComponent(NSString *str) { const NSTimeInterval oneWeek = 60 * 60 * 24 * 7; sendingSystemProfile &= (-[lastSubmitDate timeIntervalSinceNow] >= oneWeek); - NSArray *parameters = @[]; + NSArray *> *parameters = @[]; if ([self.delegate respondsToSelector:@selector(feedParametersForUpdater:sendingSystemProfile:)]) { parameters = [parameters arrayByAddingObjectsFromArray:[self.delegate feedParametersForUpdater:self sendingSystemProfile:sendingSystemProfile]]; } @@ -550,7 +550,7 @@ static NSString *escapeURLComponent(NSString *str) { // Build up the parameterized URL. NSMutableArray *parameterStrings = [NSMutableArray array]; - for (NSDictionary *currentProfileInfo in parameters) { + for (NSDictionary *currentProfileInfo in parameters) { [parameterStrings addObject:[NSString stringWithFormat:@"%@=%@", escapeURLComponent([[currentProfileInfo objectForKey:@"key"] description]), escapeURLComponent([[currentProfileInfo objectForKey:@"value"] description])]]; } diff --git a/Sparkle/SUUpdaterDelegate.h b/Sparkle/SUUpdaterDelegate.h index ec5586f5..86d1eb9e 100644 --- a/Sparkle/SUUpdaterDelegate.h +++ b/Sparkle/SUUpdaterDelegate.h @@ -64,11 +64,7 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey; \return An array of dictionaries with keys: "key", "value", "displayKey", "displayValue", the latter two being specifically for display to the user. */ -#if __has_feature(objc_generics) - (NSArray *> *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile; -#else -- (NSArray *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile; -#endif /*! Returns a custom appcast URL. diff --git a/TestApplication/SUTestApplicationDelegate.m b/TestApplication/SUTestApplicationDelegate.m index 42380108..5cdc3c82 100644 --- a/TestApplication/SUTestApplicationDelegate.m +++ b/TestApplication/SUTestApplicationDelegate.m @@ -30,7 +30,7 @@ static NSString * const UPDATED_VERSION = @"2.0"; NSBundle *mainBundle = [NSBundle mainBundle]; // Check if we are already up to date - if ([[mainBundle objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleVersionKey] isEqualToString:UPDATED_VERSION]) { + if ([(NSString *)[mainBundle objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleVersionKey] isEqualToString:UPDATED_VERSION]) { NSAlert *alreadyUpdatedAlert = [[NSAlert alloc] init]; alreadyUpdatedAlert.messageText = @"Update succeeded!"; alreadyUpdatedAlert.informativeText = @"This is the updated version of Sparkle Test App.\n\nDelete and rebuild the app to test updates again."; diff --git a/TestApplication/SUTestWebServer.m b/TestApplication/SUTestWebServer.m index 2ca31e8e..47a4ab09 100644 --- a/TestApplication/SUTestWebServer.m +++ b/TestApplication/SUTestWebServer.m @@ -96,7 +96,7 @@ NSString *requestLine = lines.count >= 3 ? [lines objectAtIndex:0] : nil; NSArray *parts = requestLine ? [requestLine componentsSeparatedByString:@" "] : nil; // Only process GET requests for existing files - if ([[parts objectAtIndex:0] isEqualToString:@"GET"]) { + if ([(NSString *)[parts objectAtIndex:0] isEqualToString:@"GET"]) { // Use NSURL to strip out query parameters NSString *path = [NSURL URLWithString:[parts objectAtIndex:1] relativeToURL:nil].path; NSString *filePath = [self.workingDirectory stringByAppendingString:path]; diff --git a/fileop/fileop.m b/fileop/fileop.m index 397ccb79..4eec69c9 100644 --- a/fileop/fileop.m +++ b/fileop/fileop.m @@ -85,11 +85,11 @@ int main(int argc, const char *argv[]) // This tool should be executed as root, so we should not try to authorize SUFileManager *fileManager = [SUFileManager defaultManager]; - if ([command isEqualToString:@(SUFileOpRemoveQuarantineCommand)]) { + if ([command isEqualToString:(NSString *)@(SUFileOpRemoveQuarantineCommand)]) { if (![fileManager releaseItemFromQuarantineAtRootURL:fileURL error:NULL]) { exit(SUQuarantineRemovalFailure); } - } else if ([command isEqualToString:@(SUFileOpCopyCommand)]) { + } else if ([command isEqualToString:(NSString *)@(SUFileOpCopyCommand)]) { if (destinationURL != nil) { if (![fileManager copyItemAtURL:fileURL toURL:destinationURL error:NULL]) { exit(SUCopyFailure); @@ -97,7 +97,7 @@ int main(int argc, const char *argv[]) } else { exit(SUInvalidOrNoDestination | SUCopyFailure); } - } else if ([command isEqualToString:@(SUFileOpMoveCommand)]) { + } else if ([command isEqualToString:(NSString *)@(SUFileOpMoveCommand)]) { if (destinationURL != nil) { if (![fileManager moveItemAtURL:fileURL toURL:destinationURL error:NULL]) { exit(SUMoveFailure); @@ -105,7 +105,7 @@ int main(int argc, const char *argv[]) } else { exit(SUInvalidOrNoDestination | SUMoveFailure); } - } else if ([command isEqualToString:@(SUFileOpChangeOwnerAndGroupCommand)]) { + } else if ([command isEqualToString:(NSString *)@(SUFileOpChangeOwnerAndGroupCommand)]) { if (destinationURL != nil) { if (![fileManager changeOwnerAndGroupOfItemAtRootURL:fileURL toMatchURL:destinationURL error:NULL]) { exit(SUChangeOwnerAndGroupFailure); @@ -113,19 +113,19 @@ int main(int argc, const char *argv[]) } else { exit(SUInvalidOrNoDestination | SUChangeOwnerAndGroupFailure); } - } else if ([command isEqualToString:@(SUFileOpUpdateModificationAndAccessTimeCommand)]) { + } else if ([command isEqualToString:(NSString *)@(SUFileOpUpdateModificationAndAccessTimeCommand)]) { if (![fileManager updateModificationAndAccessTimeOfItemAtURL:fileURL error:NULL]) { exit(SUTouchFailure); } - } else if ([command isEqualToString:@(SUFileOpMakeDirectoryCommand)]) { + } else if ([command isEqualToString:(NSString *)@(SUFileOpMakeDirectoryCommand)]) { if (![fileManager makeDirectoryAtURL:fileURL error:NULL]) { exit(SUMakeDirectoryFailure); } - } else if ([command isEqualToString:@(SUFileOpRemoveCommand)]) { + } else if ([command isEqualToString:(NSString *)@(SUFileOpRemoveCommand)]) { if (![fileManager removeItemAtURL:fileURL error:NULL]) { exit(SURemoveFailure); } - } else if ([command isEqualToString:@(SUFileOpInstallCommand)]) { + } else if ([command isEqualToString:(NSString *)@(SUFileOpInstallCommand)]) { // The one command that can *only* be run as the root user NSString *installerPath = @"/usr/sbin/installer"; From 3034eca85b174b9fdac1058e4a31cde5edf20177 Mon Sep 17 00:00:00 2001 From: Kent Sutherland Date: Thu, 14 Jun 2018 20:31:58 +0200 Subject: [PATCH 23/28] Updated readme to indicate that the 10.11 SDK is required to compile Xcode 7 was released with 10.11, the reference to the 10.8 SDK is out of date. --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 58c7e5f4..d54435c6 100644 --- a/README.markdown +++ b/README.markdown @@ -30,7 +30,7 @@ Secure and reliable software update framework for Cocoa developers. ## Requirements * Runtime: macOS 10.7 or greater -* Build: Xcode 7 and 10.8 SDK or greater +* Build: Xcode 7 and 10.11 SDK or greater * HTTPS server for serving updates (see [App Transport Security](http://sparkle-project.org/documentation/app-transport-security/)) ## Usage From 50c12d1c2bef52b81e27470100ef30aeb4e589bc Mon Sep 17 00:00:00 2001 From: Kornel Date: Tue, 19 Jun 2018 22:36:19 +0100 Subject: [PATCH 24/28] Bump --- CHANGELOG | 15 +++++++++++++++ Configurations/ConfigCommon.xcconfig | 6 +++--- Sparkle.podspec | 2 +- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index c68454b4..46acec69 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,18 @@ +# 1.20.0 + + * `generate_appcast` option to read private key directly from the keychain (Tamás Lustyik) + * Add delegate callbacks for fininshed download and extraction related events (Csaba Horony) + * Don't check for updates if Do Not Disturb is on (Kornel) + * Expose `CodesigningVerifier`, add codesign info API (sunuslee) + * Improve 'read-only' error message (#1192) (Adrian Thomas) + * Threading fixes: + * Fix potential hang with `dispatch_sync` to main thread (Brian Bergstrand) + * Fix closeCheckingWindow called from background thread (Alexey Martemyanov) + * Updated Finnish language resources (Jason Pollack) + * Hungarian localization (Csaba Horony) + * Log more information about authentication requests (Kornel) + * Explicitly specify types to silence "Messaging unqualified id" warning that's new in Xcode 10. Removed __has_feature(objc_generics) check and use generisc to help silence the warnings. (Kent Sutherland) + # 1.19.0 * Refactoring of downloader code to avoid deprecated methods (Deadpikle) diff --git a/Configurations/ConfigCommon.xcconfig b/Configurations/ConfigCommon.xcconfig index a89af949..d12b76ae 100644 --- a/Configurations/ConfigCommon.xcconfig +++ b/Configurations/ConfigCommon.xcconfig @@ -16,9 +16,9 @@ SPARKLE_AUTOMATED_DOWNGRADES = 0 SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME = 0 SPARKLE_VERSION_MAJOR = 1 -SPARKLE_VERSION_MINOR = 19 -SPARKLE_VERSION_PATCH = 1 -SPARKLE_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH) +SPARKLE_VERSION_MINOR = 20 +SPARKLE_VERSION_PATCH = 0 +SPARKLE_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)b1 CURRENT_PROJECT_VERSION = $(SPARKLE_VERSION) ALWAYS_SEARCH_USER_PATHS = NO diff --git a/Sparkle.podspec b/Sparkle.podspec index 7dfa6245..7b215070 100644 --- a/Sparkle.podspec +++ b/Sparkle.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Sparkle" - s.version = "1.19.1" + s.version = "1.20.0b1" s.summary = "A software update framework for macOS" s.description = "Sparkle is an easy-to-use software update framework for Cocoa developers." s.homepage = "http://sparkle-project.org" From 75835a5874d824ccc22ae751efccc134c298ded4 Mon Sep 17 00:00:00 2001 From: Leo Natan Date: Wed, 20 Jun 2018 15:29:50 +0300 Subject: [PATCH 25/28] Fix compilation issues on Xcode 10 with new build system --- Sparkle.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 7a911728..911e2e7d 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -1870,6 +1870,7 @@ files = ( ); inputPaths = ( + $BUILT_PRODUCTS_DIR/$INFOPLIST_PATH, ); name = "Run Script: Set Git Version Info"; outputPaths = ( @@ -1885,6 +1886,7 @@ files = ( ); inputPaths = ( + $BUILT_PRODUCTS_DIR/$INFOPLIST_PATH, ); name = "Run Script: Set Git Version Info"; outputPaths = ( From 558be041213c80325997419ae02d095aadcfc9b3 Mon Sep 17 00:00:00 2001 From: Ken Arroyo Ohori Date: Wed, 27 Jun 2018 21:22:56 -0500 Subject: [PATCH 26/28] New Spanish localisation --- Sparkle/es.lproj/Sparkle.strings | 66 ++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/Sparkle/es.lproj/Sparkle.strings b/Sparkle/es.lproj/Sparkle.strings index 09293904..195d3959 100644 --- a/Sparkle/es.lproj/Sparkle.strings +++ b/Sparkle/es.lproj/Sparkle.strings @@ -1,43 +1,47 @@ -"%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "%1$@ %2$@ se han descargado y están listos para utilizar. ¿Le gustaría instalar e iniciar %1$@ ahora?"; +"%1$@ %2$@ has been downloaded and is ready to use! This is an important update; would you like to install it and relaunch %1$@ now?" = "¡%1$@ %2$@ se ha descargado y está lista para usarse! Ésta es una actualización importante. ¿Te gustaría instalarla y volver a abrir %1$@ ahora?"; -"%1$@ can't be updated, because it was opened from a read-only or a temporary location. Use Finder to copy %1$@ to the Applications folder, relaunch it from there, and try again." = "%1$@ no se puede actualizar cuando se ejecuta desde un volumen de sólo lectura como imagen de disco o medio óptico. Mueva %1$@ a su carpeta de Aplicaciones y trate de iniciarlo desde allí."; +"%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "¡%1$@ %2$@ se ha descargado y está lista para usarse! ¿Te gustaría instalarla y volver a abrir %1$@ ahora?"; -"%@ %@ is currently the newest version available." = "%1$@ %2$@ es la última versión disponible."; +"%1$@ can't be updated, because it was opened from a read-only or a temporary location. Use Finder to copy %1$@ to the Applications folder, relaunch it from there, and try again." = "%1$@ no se puede actualizar porque fue abierta desde una ubicación temporal o de solo lectura. Usa Finder para copiar %1$@ a la carpeta Aplicaciones, vuélvela a abrir desde ahí e inténtalo de nuevo."; + +"%@ %@ is currently the newest version available." = "%1$@ %2$@ es la versión más nueva disponible."; /* Description text for SUUpdateAlert when the update is downloadable. */ -"%@ %@ is now available--you have %@. Would you like to download it now?" = "%1$@ %2$@ está disponible (usted tiene la %3$@). ¿Desea descargarla ahora?"; +"%@ %@ is now available--you have %@. Would you like to download it now?" = "%1$@ %2$@ ya está disponible (tienes la %3$@). ¿Quisieras descargarla ahora?"; /* Description text for SUUpdateAlert when the update informational with no download. */ -"%@ %@ is now available--you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@ is now available--you have %3$@. Would you like to learn more about this update on the web?"; +"%@ %@ is now available--you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@ ya está disponible--tú tienes la %3$@. ¿Quisieras aprender más acerca de esta actualización en la red?"; "%@ downloaded" = "%@ descargado"; "%@ of %@" = "%1$@ de %2$@"; -"A new version of %@ is available!" = "¡Hay una nueva versión de %@ !"; +"A new version of %@ is available!" = "¡Una nueva versión de %@ está disponible!"; -"A new version of %@ is ready to install!" = "¡Una versión nueva de %@ está lista para instalar!"; +"A new version of %@ is ready to install!" = "¡Una nueva versión de %@ está lista para instalarse!"; -"An error occurred in retrieving update information. Please try again later." = "Ocurrió un error al recopilar información sobre la actualización. Por favor, inténtelo de nuevo más tarde."; +"An error occurred in retrieving update information. Please try again later." = "Ocurrió un error al recopilar información sobre la actualización. Por favor inténtalo de nuevo más tarde."; -"An error occurred while downloading the update. Please try again later." = "Ocurrió un error mientras se descargaba la actualización. Por favor intente de nuevo más tarde."; +"An error occurred while downloading the update. Please try again later." = "Ocurrió un error al descargar la actualización. Por favor inténtalo de nuevo más tarde."; -"An error occurred while extracting the archive. Please try again later." = "Ocurrió un error al extraer el archivo. Por favor, inténtelo de nuevo más tarde."; +"An error occurred while extracting the archive. Please try again later." = "Ocurrió un error al extraer el archivo. Por favor inténtalo de nuevo más tarde."; -"An error occurred while installing the update. Please try again later." = "Ocurrió un error mientras se instalaba la actualización. Por favor intente de nuevo más tarde."; +"An error occurred while installing the update. Please try again later." = "Ocurrió un error al instalar la actualización. Por favor inténtalo de nuevo más tarde."; -"An error occurred while parsing the update feed." = "Ocurrió un error mientras se analizaba la entrada de la actualización."; +"An error occurred while parsing the update feed." = "Ocurrió un error al analizar la información de la actualización."; -"An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@." = "Ocurrió un error mientras se re-iniciaba %1$@, pero la nueva versión estará disponible la próxima vez que ejecute %1$@."; +"An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@." = "Ocurrió un error al volver a abrir %1$@, pero la nueva versión estará disponible la próxima vez que abras %1$@."; + +"An important update to %@ is ready to install" = "Una actualización importante para %@ está lista para instalarse"; /* the unit for bytes */ -"B" = "O"; +"B" = "B"; "Cancel" = "Cancelar"; "Cancel Update" = "Cancelar actualización"; -"Checking for updates..." = "Buscando actualizaciones …"; +"Checking for updates..." = "Buscando actualizaciones…"; /* Take care not to overflow the status window. */ "Downloading update..." = "Descargando actualización…"; @@ -46,34 +50,40 @@ "Extracting update..." = "Extrayendo actualización…"; /* the unit for gigabytes */ -"GB" = "GO"; +"GB" = "GB"; -"Install and Relaunch" = "Instalar y volver a arrancar"; +"Install and Relaunch" = "Instalar y volver a abrir"; /* Take care not to overflow the status window. */ "Installing update..." = "Instalando actualización…"; /* the unit for kilobytes */ -"KB" = "KO"; +"KB" = "KB"; + +/* Alternative name for "Install" button if we have a paid update or other update + without a download but with a URL. */ +"Learn More..." = "Más información…"; /* the unit for megabytes */ "MB" = "MB"; -"OK" = "OK"; +/* OK button. */ +"OK" = "Aceptar"; -"Ready to Install" = "Preparado para instalar"; +/* Status message on progress window once download has finished. */ +"Ready to Install" = "Listo para instalarse"; -"Should %1$@ automatically check for updates? You can always check for updates manually from the %1$@ menu." = "¿Debería automáticamente %1$@ buscar las actualizaciones? Puede hacerlo también manualmente desde el menú %1$@."; +/* Message that is optionally shown at startup to allow users to turn on/off update checks. */ +"Should %1$@ automatically check for updates? You can always check for updates manually from the %1$@ menu." = "¿Debería %1$@ buscar actualizaciones automáticamente? Siempre puedes buscar actualizaciones manualmente desde el menú %1$@."; + +"The update is improperly signed." = "La actualización está firmada incorrectamente."; "Update Error!" = "¡Error de actualización!"; "Updating %@" = "Actualizando %@"; -"You already have the newest version of %@." = "Ya tiene la versión más reciente de %@."; +/* 'Error' message when the user checks for updates but is already current or the feed doesn't contain any updates. (not necessarily shown in UI) */ +"You already have the newest version of %@." = "Ya tienes la versión más nueva de %@."; -"You're up-to-date!" = "Ya tiene la versión más reciente"; - -/* Alternative name for "Install" button if we have a paid update or other update - without a download but with a URL. */ - -"Learn More..." = "Más información…"; +/* Status message shown when the user checks for updates but is already current or the feed doesn't contain any updates. */ +"You're up-to-date!" = "¡Está actualizado!"; From 360c2ce7a929503c8ab7e02530fe4f5fadbc9f7d Mon Sep 17 00:00:00 2001 From: sagecook Date: Tue, 17 Jul 2018 11:33:58 -0400 Subject: [PATCH 27/28] Fix binary delta creation on network drives Closes #1156 --- Sparkle/SUBinaryDeltaCreate.m | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/Sparkle/SUBinaryDeltaCreate.m b/Sparkle/SUBinaryDeltaCreate.m index 2f3b3fdf..7ee037e4 100644 --- a/Sparkle/SUBinaryDeltaCreate.m +++ b/Sparkle/SUBinaryDeltaCreate.m @@ -90,6 +90,15 @@ static NSDictionary *infoForFile(FTSENT *ent) INFO_SIZE_KEY: @(size) }; } +static bool isSymLink(const FTSENT *ent) +{ + if (ent->fts_info == FTS_SL) + { + return (true); + } + return false; +} + static bool aclExists(const FTSENT *ent) { // macOS does not currently support ACLs for symlinks @@ -254,7 +263,7 @@ BOOL createBinaryDelta(NSString *source, NSString *destination, NSString *patchF if (verbose) { fprintf(stderr, "Creating version %u.%u patch...\n", majorVersion, minorVersion); - fprintf(stderr, "Processing %s...", [source fileSystemRepresentation]); + fprintf(stderr, "Processing source, %s...", [source fileSystemRepresentation]); } FTSENT *ent = 0; @@ -320,7 +329,7 @@ BOOL createBinaryDelta(NSString *source, NSString *destination, NSString *patchF } if (verbose) { - fprintf(stderr, "\nProcessing %s...", [destination fileSystemRepresentation]); + fprintf(stderr, "\nProcessing destination, %s...", [destination fileSystemRepresentation]); } pathBuffer[0] = 0; @@ -371,7 +380,7 @@ BOOL createBinaryDelta(NSString *source, NSString *destination, NSString *patchF // inside an application, and since we don't preserve extended attribitutes anyway mode_t permissions = [info[INFO_PERMISSIONS_KEY] unsignedShortValue]; - if (!IS_VALID_PERMISSIONS(permissions)) { + if (!isSymLink(ent) && !IS_VALID_PERMISSIONS(permissions)) { if (verbose) { fprintf(stderr, "\n"); } @@ -439,6 +448,9 @@ BOOL createBinaryDelta(NSString *source, NSString *destination, NSString *patchF } NSString *temporaryFile = temporaryPatchFile(patchFile); + if (verbose) { + fprintf(stderr, "\nWriting to temporary file %s...", [temporaryFile fileSystemRepresentation]); + } xar_t x = xar_open([temporaryFile fileSystemRepresentation], WRITE); if (!x) { if (verbose) { @@ -574,13 +586,19 @@ BOOL createBinaryDelta(NSString *source, NSString *destination, NSString *patchF xar_close(x); - unlink([patchFile fileSystemRepresentation]); - link([temporaryFile fileSystemRepresentation], [patchFile fileSystemRepresentation]); - unlink([temporaryFile fileSystemRepresentation]); - + NSFileManager *filemgr; + filemgr = [NSFileManager defaultManager]; + + [filemgr removeItemAtPath: patchFile error: NULL]; + if ([filemgr moveItemAtPath: temporaryFile toPath: patchFile error: NULL] != YES) + { + if (verbose) { + fprintf(stderr, "Failed to move temporary file, %s, to %s!\n", [temporaryFile fileSystemRepresentation], [patchFile fileSystemRepresentation]); + } + return NO; + } if (verbose) { fprintf(stderr, "\nDone!\n"); } - return YES; } From e1d4b19ce729a93b3deef99e5725ac0d43591ec2 Mon Sep 17 00:00:00 2001 From: Kornel Date: Tue, 17 Jul 2018 16:37:50 +0100 Subject: [PATCH 28/28] Bump --- CHANGELOG | 5 ++++- Configurations/ConfigCommon.xcconfig | 2 +- Sparkle.podspec | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 46acec69..165dbac4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,14 +4,17 @@ * Add delegate callbacks for fininshed download and extraction related events (Csaba Horony) * Don't check for updates if Do Not Disturb is on (Kornel) * Expose `CodesigningVerifier`, add codesign info API (sunuslee) - * Improve 'read-only' error message (#1192) (Adrian Thomas) * Threading fixes: * Fix potential hang with `dispatch_sync` to main thread (Brian Bergstrand) * Fix closeCheckingWindow called from background thread (Alexey Martemyanov) + * Improve 'read-only' error message (#1192) (Adrian Thomas) + * New Spanish localisation (Ken Arroyo Ohori) * Updated Finnish language resources (Jason Pollack) * Hungarian localization (Csaba Horony) * Log more information about authentication requests (Kornel) * Explicitly specify types to silence "Messaging unqualified id" warning that's new in Xcode 10. Removed __has_feature(objc_generics) check and use generisc to help silence the warnings. (Kent Sutherland) + * Fix binary delta creation on network drives (sagecook) + * Fix compilation issues on Xcode 10 with new build system (Leo Natan) # 1.19.0 diff --git a/Configurations/ConfigCommon.xcconfig b/Configurations/ConfigCommon.xcconfig index d12b76ae..d025a688 100644 --- a/Configurations/ConfigCommon.xcconfig +++ b/Configurations/ConfigCommon.xcconfig @@ -18,7 +18,7 @@ SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME = 0 SPARKLE_VERSION_MAJOR = 1 SPARKLE_VERSION_MINOR = 20 SPARKLE_VERSION_PATCH = 0 -SPARKLE_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)b1 +SPARKLE_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH) CURRENT_PROJECT_VERSION = $(SPARKLE_VERSION) ALWAYS_SEARCH_USER_PATHS = NO diff --git a/Sparkle.podspec b/Sparkle.podspec index 7b215070..705c3c4a 100644 --- a/Sparkle.podspec +++ b/Sparkle.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Sparkle" - s.version = "1.20.0b1" + s.version = "1.20.0" s.summary = "A software update framework for macOS" s.description = "Sparkle is an easy-to-use software update framework for Cocoa developers." s.homepage = "http://sparkle-project.org"