From 423ee5a9d690a835cd8a8827e4c4df07cecf9dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesin=CC=81ski?= Date: Wed, 15 Mar 2017 21:31:00 +0000 Subject: [PATCH 01/86] Ensure UI code always runs on the main thread --- Sparkle/SUAutomaticUpdateDriver.m | 37 ++++++++------- Sparkle/SUUIBasedUpdateDriver.m | 76 ++++++++++++++++-------------- Sparkle/SUUpdatePermissionPrompt.m | 28 ++++++----- 3 files changed, 75 insertions(+), 66 deletions(-) diff --git a/Sparkle/SUAutomaticUpdateDriver.m b/Sparkle/SUAutomaticUpdateDriver.m index 44fb18fd..400e8367 100644 --- a/Sparkle/SUAutomaticUpdateDriver.m +++ b/Sparkle/SUAutomaticUpdateDriver.m @@ -51,26 +51,29 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2 self.interruptible = NO; [self invalidateShowUpdateAlertTimer]; - if (self.alert) { - [self.alert close]; - } + dispatch_async(dispatch_get_main_queue(), ^{ + if (self.alert) { + [self.alert close]; + } - self.alert = [[SUAutomaticUpdateAlert alloc] initWithAppcastItem:self.updateItem host:self.host completionBlock:^(SUAutomaticInstallationChoice choice) { - [self automaticUpdateAlertFinishedWithChoice:choice]; - }]; + self.alert = [[SUAutomaticUpdateAlert alloc] initWithAppcastItem:self.updateItem host:self.host completionBlock:^(SUAutomaticInstallationChoice choice) { + [self automaticUpdateAlertFinishedWithChoice:choice]; + }]; - // If the app is a menubar app or the like, we need to focus it first and alter the - // update prompt to behave like a normal window. Otherwise if the window were hidden - // there may be no way for the application to be activated to make it visible again. - if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) { - [[self.alert window] setHidesOnDeactivate:NO]; - [NSApp activateIgnoringOtherApps:YES]; - } + // If the app is a menubar app or the like, we need to focus it first and alter the + // update prompt to behave like a normal window. Otherwise if the window were hidden + // there may be no way for the application to be activated to make it visible again. + if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) { + [[self.alert window] setHidesOnDeactivate:NO]; + [NSApp activateIgnoringOtherApps:YES]; + } - if ([NSApp isActive]) - [[self.alert window] makeKeyAndOrderFront:self]; - else - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive:) name:NSApplicationDidBecomeActiveNotification object:NSApp]; + if ([NSApp isActive]) { + [[self.alert window] makeKeyAndOrderFront:self]; + } else { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive:) name:NSApplicationDidBecomeActiveNotification object:NSApp]; + } + }); } - (void)unarchiverDidFinish:(id)__unused ua diff --git a/Sparkle/SUUIBasedUpdateDriver.m b/Sparkle/SUUIBasedUpdateDriver.m index 5e1de6f3..4df9ffda 100644 --- a/Sparkle/SUUIBasedUpdateDriver.m +++ b/Sparkle/SUUIBasedUpdateDriver.m @@ -66,33 +66,35 @@ return; } - self.updateAlert = [[SUUpdateAlert alloc] initWithAppcastItem:self.updateItem host:self.host completionBlock:^(SUUpdateAlertChoice choice) { - [self updateAlertFinishedWithChoice:choice]; - }]; + dispatch_async(dispatch_get_main_queue(), ^{ + self.updateAlert = [[SUUpdateAlert alloc] initWithAppcastItem:self.updateItem host:self.host completionBlock:^(SUUpdateAlertChoice choice) { + [self updateAlertFinishedWithChoice:choice]; + }]; - id versDisp = nil; - if ([[updater delegate] respondsToSelector:@selector(versionDisplayerForUpdater:)]) { - versDisp = [[updater delegate] versionDisplayerForUpdater:self.updater]; - } - [self.updateAlert setVersionDisplayer:versDisp]; - - // If the app is a menubar app or the like, we need to focus it first and alter the - // update prompt to behave like a normal window. Otherwise if the window were hidden - // there may be no way for the application to be activated to make it visible again. - if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) { - [[self.updateAlert window] setHidesOnDeactivate:NO]; - [NSApp activateIgnoringOtherApps:YES]; - } - - // Only show the update alert if the app is active; otherwise, we'll wait until it is. - if ([NSApp isActive]) { - NSWindow *window = [self.updateAlert window]; - if ([self shouldDisableKeyboardShortcutForInstallButton]) { - [self.updateAlert disableKeyboardShortcutForInstallButton]; + id versDisp = nil; + if ([[updater delegate] respondsToSelector:@selector(versionDisplayerForUpdater:)]) { + versDisp = [[updater delegate] versionDisplayerForUpdater:self.updater]; } - [window makeKeyAndOrderFront:self]; - } else - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive:) name:NSApplicationDidBecomeActiveNotification object:NSApp]; + [self.updateAlert setVersionDisplayer:versDisp]; + + // If the app is a menubar app or the like, we need to focus it first and alter the + // update prompt to behave like a normal window. Otherwise if the window were hidden + // there may be no way for the application to be activated to make it visible again. + if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) { + [[self.updateAlert window] setHidesOnDeactivate:NO]; + [NSApp activateIgnoringOtherApps:YES]; + } + + // Only show the update alert if the app is active; otherwise, we'll wait until it is. + if ([NSApp isActive]) { + NSWindow *window = [self.updateAlert window]; + if ([self shouldDisableKeyboardShortcutForInstallButton]) { + [self.updateAlert disableKeyboardShortcutForInstallButton]; + } + [window makeKeyAndOrderFront:self]; + } else + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive:) name:NSApplicationDidBecomeActiveNotification object:NSApp]; + }); } - (BOOL)shouldDisableKeyboardShortcutForInstallButton { @@ -313,20 +315,22 @@ - (void)showAlert:(NSAlert *)alert { - id updater = self.updater; - if ([[updater delegate] respondsToSelector:@selector(updaterWillShowModalAlert:)]) { - [[updater delegate] updaterWillShowModalAlert:self.updater]; - } + dispatch_sync(dispatch_get_main_queue(), ^{ + id updater = self.updater; + if ([[updater delegate] respondsToSelector:@selector(updaterWillShowModalAlert:)]) { + [[updater delegate] updaterWillShowModalAlert:self.updater]; + } - // When showing a modal alert we need to ensure that background applications - // are focused to inform the user since there is no dock icon to notify them. - if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) { [NSApp activateIgnoringOtherApps:YES]; } + // When showing a modal alert we need to ensure that background applications + // are focused to inform the user since there is no dock icon to notify them. + if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) { [NSApp activateIgnoringOtherApps:YES]; } - [alert setIcon:[SUApplicationInfo bestIconForHost:self.host]]; - [alert runModal]; + [alert setIcon:[SUApplicationInfo bestIconForHost:self.host]]; + [alert runModal]; - if ([[updater delegate] respondsToSelector:@selector(updaterDidShowModalAlert:)]) - [[updater delegate] updaterDidShowModalAlert:self.updater]; + if ([[updater delegate] respondsToSelector:@selector(updaterDidShowModalAlert:)]) + [[updater delegate] updaterDidShowModalAlert:self.updater]; + }); } @end diff --git a/Sparkle/SUUpdatePermissionPrompt.m b/Sparkle/SUUpdatePermissionPrompt.m index 7f1c0055..d3773a7c 100644 --- a/Sparkle/SUUpdatePermissionPrompt.m +++ b/Sparkle/SUUpdatePermissionPrompt.m @@ -72,20 +72,22 @@ static NSString *const SUUpdatePermissionPromptTouchBarIndentifier = @"" SPARKLE + (void)promptWithHost:(SUHost *)host systemProfile:(NSArray *)profile reply:(void (^)(SUUpdatePermissionResponse *))reply { - // If this is a background application we need to focus it in order to bring the prompt - // to the user's attention. Otherwise the prompt would be hidden behind other applications and - // the user would not know why the application was paused. - if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) { - [[NSApplication sharedApplication] activateIgnoringOtherApps:YES]; - } - - 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]; - NSWindow *window = [prompt window]; - if (window) { - [NSApp runModalForWindow:window]; + dispatch_async(dispatch_get_main_queue(), ^{ + // If this is a background application we need to focus it in order to bring the prompt + // to the user's attention. Otherwise the prompt would be hidden behind other applications and + // the user would not know why the application was paused. + if ([SUApplicationInfo isBackgroundApplication:[NSApplication sharedApplication]]) { + [[NSApplication sharedApplication] activateIgnoringOtherApps:YES]; } - } + + 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]; + NSWindow *window = [prompt window]; + if (window) { + [NSApp runModalForWindow:window]; + } + } + }); } - (NSString *)description { return [NSString stringWithFormat:@"%@ <%@>", [self class], [self.host bundlePath]]; } From bb83e9a0da1b93392d5c77efbda6a2150f3b012b Mon Sep 17 00:00:00 2001 From: 1024jp <1024jp@wolfrosch.com> Date: Sun, 4 Jun 2017 10:55:45 +0900 Subject: [PATCH 02/86] Updated Japanese translation to reflect change on 55be13c --- Sparkle/ja.lproj/Sparkle.strings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sparkle/ja.lproj/Sparkle.strings b/Sparkle/ja.lproj/Sparkle.strings index bd009cba..a5ed4122 100644 --- a/Sparkle/ja.lproj/Sparkle.strings +++ b/Sparkle/ja.lproj/Sparkle.strings @@ -2,7 +2,7 @@ "%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "%1$@ %2$@ がダウンロードされました! 今すぐ %1$@ をインストールして再起動しますか?"; -"%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$@ は、ディスクイメージや光学式ドライブなどの読み出し専用ボリュームから起動している場合アップデートできません。%1$@ をアプリケーションフォルダに移動し、そこから再起動したあとやり直してください。"; +"%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$@ は読み出し専用またはテンポラリな場所で開かれているためアップデートできません。%1$@ をアプリケーションフォルダに移動し、そこから再起動したあとやり直してください。"; "%@ %@ is currently the newest version available." = "%1$@ %2$@ は現在入手できる最新バージョンです。"; From 33bf6732eadae06fd34e2b20749cb9e3214796eb Mon Sep 17 00:00:00 2001 From: Memphiz Date: Wed, 7 Jun 2017 22:08:28 +0200 Subject: [PATCH 03/86] [AppcastItem] - parse and save the sparkle:os attribute of the enclosure element and add isOsxUpdate method to item class --- Sparkle/SUAppcastItem.h | 2 ++ Sparkle/SUAppcastItem.m | 16 +++++++++++++++- Sparkle/SUConstants.h | 5 +++++ Sparkle/SUConstants.m | 3 +++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Sparkle/SUAppcastItem.h b/Sparkle/SUAppcastItem.h index 9ed52c9e..071514cc 100644 --- a/Sparkle/SUAppcastItem.h +++ b/Sparkle/SUAppcastItem.h @@ -27,6 +27,7 @@ SU_EXPORT @interface SUAppcastItem : NSObject @property (strong, readonly) NSURL *fileURL; @property (nonatomic, readonly) uint64_t contentLength; @property (copy, readonly) NSString *versionString; +@property (copy, readonly) NSString *osString; @property (copy, readonly) NSString *displayVersionString; @property (copy, readonly) NSDictionary *deltaUpdates; @property (strong, readonly) NSURL *infoURL; @@ -37,6 +38,7 @@ SU_EXPORT @interface SUAppcastItem : NSObject @property (getter=isDeltaUpdate, readonly) BOOL deltaUpdate; @property (getter=isCriticalUpdate, readonly) BOOL criticalUpdate; +@property (getter=isOsxUpdate, readonly) BOOL osxUpdate; @property (getter=isInformationOnlyUpdate, readonly) BOOL informationOnlyUpdate; // Returns the dictionary provided in initWithDictionary; this might be useful later for extensions. diff --git a/Sparkle/SUAppcastItem.m b/Sparkle/SUAppcastItem.m index 26cba3e7..f70c0589 100644 --- a/Sparkle/SUAppcastItem.m +++ b/Sparkle/SUAppcastItem.m @@ -23,6 +23,7 @@ @property (copy, readwrite) NSString *maximumSystemVersion; @property (strong, readwrite) NSURL *fileURL; @property (copy, readwrite) NSString *versionString; +@property (copy, readwrite) NSString *osString; @property (copy, readwrite) NSString *displayVersionString; @property (copy, readwrite) NSDictionary *deltaUpdates; @property (strong, readwrite) NSURL *infoURL; @@ -43,6 +44,7 @@ @synthesize releaseNotesURL; @synthesize title; @synthesize versionString; +@synthesize osString; @synthesize propertiesDictionary; - (BOOL)isDeltaUpdate @@ -56,6 +58,17 @@ return [[self.propertiesDictionary objectForKey:SUAppcastElementTags] containsObject:SUAppcastElementCriticalUpdate]; } +- (BOOL)isOsxUpdate +{ + BOOL result = true; + + if (self.osString != nil && [self.osString caseInsensitiveCompare:SUAppcastAttributeValueOsx] != NSOrderedSame) + { + result = false; + } + return result; +} + - (BOOL)isInformationOnlyUpdate { return self.infoURL && !self.fileURL; @@ -150,8 +163,9 @@ } if (enclosure) { self.DSASignature = [enclosure objectForKey:SUAppcastAttributeDSASignature]; + self.osString = [enclosure objectForKey:SUAppcastAttributeOsType]; } - + self.versionString = newVersion; self.minimumSystemVersion = [dict objectForKey:SUAppcastElementMinimumSystemVersion]; self.maximumSystemVersion = [dict objectForKey:SUAppcastElementMaximumSystemVersion]; diff --git a/Sparkle/SUConstants.h b/Sparkle/SUConstants.h index 33abaab6..84d6e363 100644 --- a/Sparkle/SUConstants.h +++ b/Sparkle/SUConstants.h @@ -21,6 +21,8 @@ extern const NSTimeInterval SUDefaultUpdateCheckInterval; extern NSString *const SUBundleIdentifier; +extern NSString *const SUAppcastAttributeValueOsx; + // ----------------------------------------------------------------------------- // Notifications: // ----------------------------------------------------------------------------- @@ -64,6 +66,9 @@ extern NSString *const SUAppcastAttributeDeltaFrom; extern NSString *const SUAppcastAttributeDSASignature; extern NSString *const SUAppcastAttributeShortVersionString; extern NSString *const SUAppcastAttributeVersion; +extern NSString *const SUAppcastAttributeOsType; + + extern NSString *const SUAppcastElementCriticalUpdate; extern NSString *const SUAppcastElementDeltas; diff --git a/Sparkle/SUConstants.m b/Sparkle/SUConstants.m index 5e883f6f..8edff128 100644 --- a/Sparkle/SUConstants.m +++ b/Sparkle/SUConstants.m @@ -21,6 +21,8 @@ const NSTimeInterval SUDefaultUpdateCheckInterval = DEBUG ? 60 : (60 * 60 * 24); NSString *const SUBundleIdentifier = @SPARKLE_BUNDLE_IDENTIFIER; +NSString *const SUAppcastAttributeValueOsx = @"osx"; + NSString *const SUTechnicalErrorInformationKey = @"SUTechnicalErrorInformation"; NSString *const SUHasLaunchedBeforeKey = @"SUHasLaunchedBefore"; @@ -54,6 +56,7 @@ NSString *const SUAppcastAttributeDeltaFrom = @"sparkle:deltaFrom"; NSString *const SUAppcastAttributeDSASignature = @"sparkle:dsaSignature"; NSString *const SUAppcastAttributeShortVersionString = @"sparkle:shortVersionString"; NSString *const SUAppcastAttributeVersion = @"sparkle:version"; +NSString *const SUAppcastAttributeOsType = @"sparkle:os"; NSString *const SUAppcastElementCriticalUpdate = @"sparkle:criticalUpdate"; NSString *const SUAppcastElementDeltas = @"sparkle:deltas"; From 193036b2c49ccef27ddd391b4eb5a43b102856c1 Mon Sep 17 00:00:00 2001 From: Memphiz Date: Wed, 7 Jun 2017 22:09:05 +0200 Subject: [PATCH 04/86] [BasicUpdateDriver] - extend hostSupportsItem method to also check the sparkle:os attribute from the enclosure element to decide if an update item is valid for the host --- Sparkle/SUBasicUpdateDriver.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index 6769690c..94041ddc 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -115,12 +115,13 @@ + (BOOL)hostSupportsItem:(SUAppcastItem *)ui { + BOOL osxSupported = [ui isOsxUpdate]; if (([ui minimumSystemVersion] == nil || [[ui minimumSystemVersion] isEqualToString:@""]) && - ([ui maximumSystemVersion] == nil || [[ui maximumSystemVersion] isEqualToString:@""])) { return YES; } + ([ui maximumSystemVersion] == nil || [[ui maximumSystemVersion] isEqualToString:@""])) { return osxSupported; } BOOL minimumVersionOK = TRUE; BOOL maximumVersionOK = TRUE; - + id versionComparator = [[SUStandardVersionComparator alloc] init]; // Check minimum and maximum System Version @@ -131,7 +132,7 @@ maximumVersionOK = [versionComparator compareVersion:[ui maximumSystemVersion] toVersion:[SUOperatingSystem systemVersionString]] != NSOrderedAscending; } - return minimumVersionOK && maximumVersionOK; + return minimumVersionOK && maximumVersionOK && osxSupported; } - (BOOL)isItemNewer:(SUAppcastItem *)ui From 6d0c734c2691fbcab61b69bcb20ab8194ad92c18 Mon Sep 17 00:00:00 2001 From: Kornel Date: Wed, 7 Jun 2017 23:54:57 +0100 Subject: [PATCH 05/86] Rename OSX macOS --- Sparkle/SUAppcastItem.h | 2 +- Sparkle/SUAppcastItem.m | 6 +++--- Sparkle/SUBasicUpdateDriver.m | 10 ++++++---- Sparkle/SUConstants.h | 2 +- Sparkle/SUConstants.m | 2 +- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Sparkle/SUAppcastItem.h b/Sparkle/SUAppcastItem.h index 071514cc..5c861ddd 100644 --- a/Sparkle/SUAppcastItem.h +++ b/Sparkle/SUAppcastItem.h @@ -38,7 +38,7 @@ SU_EXPORT @interface SUAppcastItem : NSObject @property (getter=isDeltaUpdate, readonly) BOOL deltaUpdate; @property (getter=isCriticalUpdate, readonly) BOOL criticalUpdate; -@property (getter=isOsxUpdate, readonly) BOOL osxUpdate; +@property (getter=isMacOsUpdate, readonly) BOOL macOsUpdate; @property (getter=isInformationOnlyUpdate, readonly) BOOL informationOnlyUpdate; // Returns the dictionary provided in initWithDictionary; this might be useful later for extensions. diff --git a/Sparkle/SUAppcastItem.m b/Sparkle/SUAppcastItem.m index 4314504f..3fb1d6cc 100644 --- a/Sparkle/SUAppcastItem.m +++ b/Sparkle/SUAppcastItem.m @@ -58,11 +58,11 @@ return [[self.propertiesDictionary objectForKey:SUAppcastElementTags] containsObject:SUAppcastElementCriticalUpdate]; } -- (BOOL)isOsxUpdate +- (BOOL)isMacOsUpdate { BOOL result = true; - - if (self.osString != nil && [self.osString caseInsensitiveCompare:SUAppcastAttributeValueOsx] != NSOrderedSame) + + if (self.osString != nil && [self.osString caseInsensitiveCompare:SUAppcastAttributeValueMacOS] != NSOrderedSame) { result = false; } diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index 6b3b1799..42d6e185 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -115,13 +115,15 @@ + (BOOL)hostSupportsItem:(SUAppcastItem *)ui { - BOOL osxSupported = [ui isOsxUpdate]; + BOOL osOK = [ui isMacOsUpdate]; if (([ui minimumSystemVersion] == nil || [[ui minimumSystemVersion] isEqualToString:@""]) && - ([ui maximumSystemVersion] == nil || [[ui maximumSystemVersion] isEqualToString:@""])) { return osxSupported; } + ([ui maximumSystemVersion] == nil || [[ui maximumSystemVersion] isEqualToString:@""])) { + return osOK; + } BOOL minimumVersionOK = TRUE; BOOL maximumVersionOK = TRUE; - + id versionComparator = [[SUStandardVersionComparator alloc] init]; // Check minimum and maximum System Version @@ -132,7 +134,7 @@ maximumVersionOK = [versionComparator compareVersion:[ui maximumSystemVersion] toVersion:[SUOperatingSystem systemVersionString]] != NSOrderedAscending; } - return minimumVersionOK && maximumVersionOK && osxSupported; + return minimumVersionOK && maximumVersionOK && osOK; } - (BOOL)isItemNewer:(SUAppcastItem *)ui diff --git a/Sparkle/SUConstants.h b/Sparkle/SUConstants.h index a5a7bda5..9f377e68 100644 --- a/Sparkle/SUConstants.h +++ b/Sparkle/SUConstants.h @@ -21,7 +21,7 @@ extern const NSTimeInterval SUDefaultUpdateCheckInterval; extern NSString *const SUBundleIdentifier; -extern NSString *const SUAppcastAttributeValueOsx; +extern NSString *const SUAppcastAttributeValueMacOS; // ----------------------------------------------------------------------------- // Notifications: diff --git a/Sparkle/SUConstants.m b/Sparkle/SUConstants.m index fe22ef08..955a9c9e 100644 --- a/Sparkle/SUConstants.m +++ b/Sparkle/SUConstants.m @@ -21,7 +21,7 @@ const NSTimeInterval SUDefaultUpdateCheckInterval = DEBUG ? 60 : (60 * 60 * 24); NSString *const SUBundleIdentifier = @SPARKLE_BUNDLE_IDENTIFIER; -NSString *const SUAppcastAttributeValueOsx = @"osx"; +NSString *const SUAppcastAttributeValueMacOS = @"macos"; NSString *const SUTechnicalErrorInformationKey = @"SUTechnicalErrorInformation"; From 4438b69b5052f9f759827ec9d89c09f7794407fb Mon Sep 17 00:00:00 2001 From: Kornel Date: Wed, 7 Jun 2017 23:56:45 +0100 Subject: [PATCH 06/86] Simplified check --- Sparkle/SUAppcastItem.m | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Sparkle/SUAppcastItem.m b/Sparkle/SUAppcastItem.m index 3fb1d6cc..c4293034 100644 --- a/Sparkle/SUAppcastItem.m +++ b/Sparkle/SUAppcastItem.m @@ -60,13 +60,7 @@ - (BOOL)isMacOsUpdate { - BOOL result = true; - - if (self.osString != nil && [self.osString caseInsensitiveCompare:SUAppcastAttributeValueMacOS] != NSOrderedSame) - { - result = false; - } - return result; + return self.osString == nil || [self.osString isEqualToString:SUAppcastAttributeValueMacOS]; } - (BOOL)isInformationOnlyUpdate From 3c14c950efa42d6a80fed847e0e2dc1b95b94110 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Sun, 18 Jun 2017 20:33:24 -0700 Subject: [PATCH 07/86] Include bin files in CocoaPods installation This updates the podspec to include the bin scripts in Pods directory when using CocoaPods. This way users don't also have to download the Sparkle repo out of band to sign releases. --- Sparkle.podspec | 1 + 1 file changed, 1 insertion(+) diff --git a/Sparkle.podspec b/Sparkle.podspec index ccf1eb4f..2170b3fc 100644 --- a/Sparkle.podspec +++ b/Sparkle.podspec @@ -22,6 +22,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/sparkle-project/Sparkle/releases/download/#{s.version}/Sparkle-#{s.version}.tar.bz2" } s.source_files = 'Sparkle.framework/Versions/A/Headers/*.h' + s.preserve_paths = 'bin/*' s.public_header_files = 'Sparkle.framework/Versions/A/Headers/*.h' s.vendored_frameworks = 'Sparkle.framework' s.xcconfig = { From c4db636d0b524b1eede677ef5276cdb36bf146be Mon Sep 17 00:00:00 2001 From: Eitot Date: Fri, 23 Jun 2017 05:13:04 +0200 Subject: [PATCH 08/86] Update Dutch localization with some style changes This reflects Apple's localizations a bit better. --- Sparkle/nl.lproj/SUAutomaticUpdateAlert.xib | 6 +-- Sparkle/nl.lproj/SUUpdateAlert.xib | 6 +-- Sparkle/nl.lproj/SUUpdatePermissionPrompt.xib | 14 +++--- Sparkle/nl.lproj/Sparkle.strings | 46 +++++++++---------- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/Sparkle/nl.lproj/SUAutomaticUpdateAlert.xib b/Sparkle/nl.lproj/SUAutomaticUpdateAlert.xib index cf75d6d6..99637bdb 100644 --- a/Sparkle/nl.lproj/SUAutomaticUpdateAlert.xib +++ b/Sparkle/nl.lproj/SUAutomaticUpdateAlert.xib @@ -57,7 +57,7 @@ + + + + + + + + + + + + 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 68/86] 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 @@ -