Compare commits

..
33 Commits
Author SHA1 Message Date
Kornel d5222353e6 Merge pull request #1458 from BitShift-Tech/appcast-generation-file-extention
SUFeedUrl generate appcast file extension (let fix)
2019-08-21 10:57:45 +01:00
Tom Vos 2657a41d55 Update ArchiveItem.swift
feedURl was a let and therefore not assignable
2019-08-21 11:16:06 +02:00
Kornel 08d3ff747d Merge pull request #1454
SUFeedUrl generate appcast file extension
2019-08-21 09:58:08 +01:00
Tom Vos fedb22e224 Update ArchiveItem.swift
The *ing methods didn't alter the value, they provided a new value which was not assigned to anything.
2019-08-21 10:20:37 +02:00
Kornel 8293c3c6ae Merge pull request #1457 from LeoNatan/master
Fix incorrect and inconsistent selectors and delegate methods
2019-08-20 02:58:35 +01:00
Leo Natan 181f813b01 Fix incorrect and inconsistent selectors and delegate methods. 2019-08-20 04:12:33 +03:00
Kornel a10a974609 Merge pull request #1456 from webjib/patch-1
Update Sparkle.strings
2019-08-19 14:38:39 +01:00
Jean-Baptiste f8572f79cb Update Sparkle.strings
Issue #1429
https://github.com/sparkle-project/Sparkle/issues/1429
2019-08-19 15:18:14 +02:00
Kornel 2b54753090 add delegate userDidSkipThisVersion (#1409)
add delegate userDidSkipThisVersion
2019-08-14 09:40:01 +01:00
bono yusuke 2db2fffab9 Update SUUIBasedUpdateDriver.m 2019-08-14 17:12:16 +09:00
Tom Vos 035bfc4919 Fix typo 2019-08-13 12:18:42 +02:00
Tom Vos 48fc202f36 Processed requested changes
Instead of using find and replace, use the correct methods on URL to change the file name and extention.
2019-08-13 12:17:12 +02:00
Tom Vos 28ff3069ff Update ArchiveItem.swift
When the SUFeedURL extention is "php", replace filename.php with appcast.xml in generate_appcast
2019-08-13 09:45:10 +02:00
Kornel 795ce1278d Merge pull request #1445 from fujisoft/patch-1
Update Japanese localization #1429
2019-08-03 15:48:27 +01:00
fujisoft 6ac853271d Update Japanese localization
#1429
2019-08-03 13:38:13 +09:00
Kornel 7e5e91888f Merge pull request #1444 from jfenton-tsc/fix/normalize-should-respect-specified-bundle-name
check if SUBundleName is set before normalizing
2019-08-03 00:00:55 +01:00
Jake Fenton b0d29ae798 check if SUBundleName is set before normalizing
When changing the name of an app, there's a couple things to do in order
to ensure auto-updates still work:

1. set SUBundle Name. This basically tells Sparkle "ey, expect an app
of {SUBundleName}.(app|pkg) instead of the normal name."
2. set `SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME` in
commonConfig.xccconfig to reset the name of the app.

in (2), we always used the host's bundle name, instead of checking to
see if SUBundleName was set, which means normalization doesn't work as
expected during app name changes.
2019-08-02 09:29:12 -04:00
Kornel 09bbf9fdc6 Merge pull request #1443 from gotow/master
In 'newer than latest' alert, show displayVersionString instead of versionString
2019-08-02 10:49:28 +01:00
gotow f2bd7ea2b2 Update SUUIBasedUpdateDriver.m 2019-08-01 22:35:28 -06:00
Kornel 35deefdc0c Merge pull request #1439 from whakkee/master
cast to NSInteger to get rid of warning on Xcode 11
2019-07-14 21:19:51 +01:00
Marga Keuvelaar 3e53979236 cast to NSInteger to get rid of warning on Xcode 11 2019-07-12 21:53:29 +02:00
Kornel f8971098be Reset timers after computer sleep (#1437)
Update SUUpdater.m
2019-07-09 18:45:13 +01:00
CoreCode efd1840f35 Update SUUpdater.m 2019-07-08 20:51:16 +02:00
Kornel 17dbdf98e1 Merge pull request #1435 from Yakuhzi/master
Support providing private key as argument
2019-07-05 22:59:20 +02:00
Yakuhzi 79f110a17b Support providing private key as argument 2019-07-05 13:12:11 +02:00
Kornel 5ab0baf84c Merge pull request #1431 from vitu/master
BR update of new string on Sparkle.strings
2019-07-02 11:39:22 +01:00
BR Lingo 578dac0ad7 BR update of new string on Sparkle.strings
Translation for string added by CoreCode.
2019-06-30 02:56:55 -04:00
BR Lingo 920b5bac5e Merge pull request #2 from sparkle-project/master
Update from original repo
2019-06-30 02:45:09 -04:00
Kornel 9ae7224a47 Changelog 2019-06-29 14:41:52 +01:00
Kornel 685be61bc3 Use recommended locale names 2019-06-29 14:41:06 +01:00
Kornel 9be76d3d5a Build with hardened runtime 2019-06-29 14:41:06 +01:00
BobZombie f9b534a6b6 add delegate userDidSkipThisVersion 2019-05-17 17:15:41 +09:00
BR Lingo 9453761aef Merge pull request #1 from sparkle-project/master
Hey, self. Please let me in.
2018-06-09 00:38:49 -04:00
17 changed files with 126 additions and 45 deletions

No files matched your search

+14 -3
View File
@@ -1,9 +1,20 @@
# 1.22.0a1
# 1.22.0
* Enabled "Hardened Runtime" build option for Apple's notarization requirement
* Add delegate methods to suppress update alerts (George Nachman)
* Disambiguate signing error messages (Nate Weaver)
* Fix warnings when using modules (nivekkagicom)
* Improved error when running from translocated location (Michael Buckley)
* Add phased rollout feature (#1381) (Fabian Jäger)
* Ignore non-standard permissions in delta updates instead of failing the build (Kornel Lesiński)
* Notify user when installed version is newer than the latest in the appcast (CoreCode)
* Block-based alternatives to `NSInvocation`-based delegate methods (Fabian Jäger)
* Pass item to updaterShouldShowUpdateAlertForScheduledUpdate delegate method (George Nachman)
* Separate the ed25519 sources into a new static library (Tony Arnold)
* Correction of Czech localization inconsistency (#1403) (vojtakonarik)
* Disambiguate signing error messages (Nate Weaver)
* Use `XMLNode.Options.nodePrettyPrint` in `generate_appcast` instead of trying to add whitespace manually (fumoboy007)
* Annotate SUHost for nullability (Michael Buckley)
* Use SUAVAILABLE macro (Christiaan Hofman)
* Fix warnings when using modules (nivekkagicom)
# 1.21.3
+1
View File
@@ -32,6 +32,7 @@ PRODUCT_BUNDLE_IDENTIFIER = org.sparkle-project.Sparkle.${PRODUCT_NAME:rfc1034id
GCC_PREPROCESSOR_DEFINITIONS_COMMON = SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME=$(SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME) SPARKLE_AUTOMATED_DOWNGRADES=$(SPARKLE_AUTOMATED_DOWNGRADES) SPARKLE_APPEND_VERSION_NUMBER=$(SPARKLE_APPEND_VERSION_NUMBER) SPARKLE_BUNDLE_IDENTIFIER=\"$(SPARKLE_BUNDLE_IDENTIFIER)\" SPARKLE_RELAUNCH_TOOL_NAME=\"$(SPARKLE_RELAUNCH_TOOL_NAME)\" SPARKLE_FILEOP_TOOL_NAME=\"$(SPARKLE_FILEOP_TOOL_NAME)\"
ENABLE_HARDENED_RUNTIME = YES;
CLANG_ENABLE_OBJC_ARC = YES
GCC_ENABLE_PASCAL_STRINGS = NO
GCC_NO_COMMON_BLOCKS = YES;
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Sparkle"
s.version = "1.21.3"
s.version = "1.22.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"
+15 -20
View File
@@ -784,6 +784,8 @@
5D1AF58F0FD767AD0065DB48 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; };
5D1AF5990FD767E50065DB48 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
5F1510A11C96E591006E1629 /* testnamespaces.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = testnamespaces.xml; sourceTree = "<group>"; };
5FA8757822C7A12C00FC6A2F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
5FA8757922C7A12C00FC6A2F /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
610134710DD250470049ACDF /* SUUpdateDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUUpdateDriver.h; sourceTree = "<group>"; };
610134720DD250470049ACDF /* SUUpdateDriver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUUpdateDriver.m; sourceTree = "<group>"; };
610134790DD2541A0049ACDF /* SUProbingUpdateDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUProbingUpdateDriver.h; sourceTree = "<group>"; };
@@ -858,8 +860,6 @@
61B5F90209C4CEE200B25A18 /* Sparkle Test App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Sparkle Test App.app"; sourceTree = BUILT_PRODUCTS_DIR; };
61B5F90409C4CEE200B25A18 /* TestApplication-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TestApplication-Info.plist"; sourceTree = "<group>"; };
61B5F92409C4CFC900B25A18 /* main.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
61B5F92B09C4CFD800B25A18 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
61B5F92D09C4CFD800B25A18 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
61B5FB9409C4F04600B25A18 /* SUAppcast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUAppcast.h; sourceTree = "<group>"; };
61B5FB9509C4F04600B25A18 /* SUAppcast.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUAppcast.m; sourceTree = "<group>"; };
61B5FC3F09C4FD4000B25A18 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
@@ -1014,8 +1014,8 @@
buildActionMask = 2147483647;
files = (
EA4311FC229D65E400A5503D /* libbsdiff.a in Frameworks */,
EA4311BD229D5FF000A5503D /* libed25519.a in Frameworks */,
5AE13FBD1E0DA39B000D2C2C /* libbz2.tbd in Frameworks */,
EA4311BD229D5FF000A5503D /* libed25519.a in Frameworks */,
5AAD006C1E0C2DBF00AF411E /* libxar.tbd in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -1032,8 +1032,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
EA4311FD229D65FC00A5503D /* libbsdiff.a in Frameworks */,
5D06E9050FD68D7D005AE3F6 /* Foundation.framework in Frameworks */,
EA4311FD229D65FC00A5503D /* libbsdiff.a in Frameworks */,
5D06E8FF0FD68D6D005AE3F6 /* libbz2.dylib in Frameworks */,
5D1AF58B0FD7678C0065DB48 /* libxar.1.dylib in Frameworks */,
5D1AF5900FD767AD0065DB48 /* libxml2.dylib in Frameworks */,
@@ -1045,9 +1045,9 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
EA4311FE229D660B00A5503D /* libbsdiff.a in Frameworks */,
14732BD119610A1200593899 /* AppKit.framework in Frameworks */,
14732BD019610A0D00593899 /* Foundation.framework in Frameworks */,
EA4311FE229D660B00A5503D /* libbsdiff.a in Frameworks */,
721CF1AB1AD764EB00D9AC09 /* libbz2.dylib in Frameworks */,
721CF1AA1AD7647000D9AC09 /* libxar.1.dylib in Frameworks */,
14652F8019A9740F00959E44 /* Security.framework in Frameworks */,
@@ -1060,9 +1060,9 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
EA4311E5229D644700A5503D /* libed25519.a in Frameworks */,
14950073195FCE4E00BC5B5B /* AppKit.framework in Frameworks */,
14950072195FCE4B00BC5B5B /* Foundation.framework in Frameworks */,
EA4311E5229D644700A5503D /* libed25519.a in Frameworks */,
61B5F90F09C4CF3A00B25A18 /* Sparkle.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -1088,12 +1088,12 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
EA4311FF229D662600A5503D /* libbsdiff.a in Frameworks */,
EA4311E4229D643300A5503D /* libed25519.a in Frameworks */,
1495006E195FCE1100BC5B5B /* AppKit.framework in Frameworks */,
1495006F195FCE1800BC5B5B /* Foundation.framework in Frameworks */,
61177A1F0D1112E900749C97 /* IOKit.framework in Frameworks */,
EA4311FF229D662600A5503D /* libbsdiff.a in Frameworks */,
5D06E8FD0FD68D6B005AE3F6 /* libbz2.dylib in Frameworks */,
EA4311E4229D643300A5503D /* libed25519.a in Frameworks */,
5D1AF58A0FD7678C0065DB48 /* libxar.1.dylib in Frameworks */,
5D1AF82B0FD768180065DB48 /* libz.dylib in Frameworks */,
61B5F8F709C4CEB300B25A18 /* Security.framework in Frameworks */,
@@ -1128,12 +1128,12 @@
5AB8F19F214DA72000A1187F /* generate_keys */,
5A5ADED7214EDE4900DF0099 /* sign_update */,
55C14BB7136EEF1500649790 /* Autoupdate.app */,
EA4311EA229D651300A5503D /* libbsdiff.a */,
EA4311A0229D5FBC00A5503D /* libed25519.a */,
61B5F90209C4CEE200B25A18 /* Sparkle Test App.app */,
612279D90DB5470200AB99EA /* Sparkle Unit Tests.xctest */,
8DC2EF5B0486A6940098B216 /* Sparkle.framework */,
726B2B5D1C645FC900388755 /* UI Tests.xctest */,
EA4311A0229D5FBC00A5503D /* libed25519.a */,
EA4311EA229D651300A5503D /* libbsdiff.a */,
);
name = Products;
sourceTree = "<group>";
@@ -1183,13 +1183,13 @@
089C1665FE841158C02AAC07 /* Framework Resources */ = {
isa = PBXGroup;
children = (
E1D4DDF821C1C5F8003D32E7 /* DarkAqua.css */,
8DC2EF5A0486A6940098B216 /* Sparkle-Info.plist */,
61AAE8220A321A7F00D8810D /* Sparkle.strings */,
55C14BDA136EF20D00649790 /* SUAutomaticUpdateAlert.xib */,
55C14BD8136EF00C00649790 /* SUStatus.xib */,
55C14BF0136EF26100649790 /* SUUpdateAlert.xib */,
55C14C05136EF2C700649790 /* SUUpdatePermissionPrompt.xib */,
E1D4DDF821C1C5F8003D32E7 /* DarkAqua.css */,
);
name = "Framework Resources";
sourceTree = "<group>";
@@ -2031,14 +2031,9 @@
};
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "Sparkle" */;
compatibilityVersion = "Xcode 6.3";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
Italian,
zh_TW,
en,
ca,
@@ -2160,13 +2155,13 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E1D4DDF921C1C5F8003D32E7 /* DarkAqua.css in Resources */,
61AAE8280A321A7F00D8810D /* Sparkle.strings in Resources */,
55C14BEE136EF20D00649790 /* SUAutomaticUpdateAlert.xib in Resources */,
615AE3D00D64DC40001CA7BD /* SUModelTranslation.plist in Resources */,
55C14BEF136EF21700649790 /* SUStatus.xib in Resources */,
55C14C04136EF26100649790 /* SUUpdateAlert.xib in Resources */,
55C14C19136EF2C700649790 /* SUUpdatePermissionPrompt.xib in Resources */,
E1D4DDF921C1C5F8003D32E7 /* DarkAqua.css in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2746,7 +2741,7 @@
1A985A3A1C5C32A50001163A /* da */,
1A985A341C5C329E0001163A /* de */,
1A985A531C5C32BD0001163A /* el */,
61B5F92B09C4CFD800B25A18 /* English */,
5FA8757822C7A12C00FC6A2F /* en */,
1A985A3B1C5C32A60001163A /* es */,
1A985A3C1C5C32A70001163A /* fi */,
1A985A331C5C329D0001163A /* fr */,
@@ -2782,7 +2777,7 @@
61B5F92C09C4CFD800B25A18 /* MainMenu.xib */ = {
isa = PBXVariantGroup;
children = (
61B5F92D09C4CFD800B25A18 /* English */,
5FA8757922C7A12C00FC6A2F /* en */,
);
name = MainMenu.xib;
sourceTree = "<group>";
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
+2 -2
View File
@@ -62,9 +62,9 @@ static NSString *SPUURLRequestNetworkServiceTypeKey = @"SPUURLRequestNetworkServ
- (void)encodeWithCoder:(NSCoder *)coder
{
[coder encodeObject:self.url forKey:SPUURLRequestURLKey];
[coder encodeInteger:self.cachePolicy forKey:SPUURLRequestCachePolicyKey];
[coder encodeInteger:(NSInteger)self.cachePolicy forKey:SPUURLRequestCachePolicyKey];
[coder encodeDouble:self.timeoutInterval forKey:SPUURLRequestTimeoutIntervalKey];
[coder encodeInteger:self.networkServiceType forKey:SPUURLRequestNetworkServiceTypeKey];
[coder encodeInteger:(NSInteger)self.networkServiceType forKey:SPUURLRequestNetworkServiceTypeKey];
if (self.httpHeaderFields != nil) {
[coder encodeObject:self.httpHeaderFields forKey:SPUURLRequestHttpHeaderFieldsKey];
+8 -2
View File
@@ -152,8 +152,14 @@
{
NSBundle *bundle = host.bundle;
assert(bundle != nil);
NSString *normalizedAppPath = [[[bundle bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.%@", [host objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleNameKey], [[bundle bundlePath] pathExtension]]];
NSString * baseBundleName = [host objectForInfoDictionaryKey:@"SUBundleName"];
if (baseBundleName == nil) {
baseBundleName = [host objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleNameKey];
}
NSString *normalizedAppPath = [[[bundle bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.%@", baseBundleName, [[bundle bundlePath] pathExtension]]];
// Roundtrip string through fileSystemRepresentation to ensure it uses filesystem's Unicode normalization
// rather than arbitrary Unicode form from Info.plist - #1017
+5 -1
View File
@@ -126,7 +126,7 @@
alert.messageText = SULocalizedString(@"You're up-to-date!", "Status message shown when the user checks for updates but is already current or the feed doesn't contain any updates.");
if (self.latestAppcastItemComparisonResult == NSOrderedDescending ) { // this means the user is a 'newer than latest' version. give a slight hint to the user instead of wrongly claiming this version is identical to the latest feed version.
alert.informativeText = [NSString stringWithFormat:SULocalizedString(@"%@ %@ is currently the newest version available.\n(You are currently running version %@.)", nil), [self.host name], self.latestAppcastItem.versionString, [self.host displayVersion]];
alert.informativeText = [NSString stringWithFormat:SULocalizedString(@"%@ %@ is currently the newest version available.\n(You are currently running version %@.)", nil), [self.host name], self.latestAppcastItem.displayVersionString, [self.host displayVersion]];
}
else {
alert.informativeText = [NSString stringWithFormat:SULocalizedString(@"%@ %@ is currently the newest version available.", nil), [self.host name], [self.host displayVersion]];
@@ -165,6 +165,7 @@
{
self.updateAlert = nil;
[self.host setObject:nil forUserDefaultsKey:SUSkippedVersionKey];
id<SUUpdaterPrivate> updater = self.updater;
switch (choice) {
case SUInstallUpdateChoice:
[self didDismissAlertPermanently:NO forItem:item];
@@ -178,6 +179,9 @@
break;
case SUSkipThisVersionChoice:
if ([[updater delegate] respondsToSelector:@selector(updater:userDidSkipThisVersion:)]) {
[[updater delegate] updater:self.updater userDidSkipThisVersion:self.updateItem];
}
[self didDismissAlertPermanently:YES forItem:item];
[self.host setObject:[self.updateItem versionString] forUserDefaultsKey:SUSkippedVersionKey];
[self abortUpdate];
+23
View File
@@ -37,6 +37,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
@interface SUUpdater () <SUUpdaterPrivate>
@property (strong) NSTimer *checkTimer;
@property (assign) BOOL shouldRescheduleOnWake;
@property (strong) NSBundle *sparkleBundle;
- (instancetype)initForBundle:(NSBundle *)bundle;
@@ -59,6 +60,7 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
@synthesize delegate;
@synthesize checkTimer;
@synthesize shouldRescheduleOnWake;
@synthesize userAgentString = customUserAgentString;
@synthesize httpHeaders;
@synthesize driver;
@@ -113,6 +115,9 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
if (self) {
[self registerAsObserver];
}
[NSWorkspace.sharedWorkspace.notificationCenter addObserver:self selector:@selector(receiveSleepNote) name:NSWorkspaceWillSleepNotification object:NULL];
[NSWorkspace.sharedWorkspace.notificationCenter addObserver:self selector:@selector(receiveWakeNote) name:NSWorkspaceDidWakeNotification object:NULL];
id updater = [sharedUpdaters objectForKey:[NSValue valueWithNonretainedObject:bundle]];
if (updater)
@@ -294,6 +299,24 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
self.checkTimer = [NSTimer scheduledTimerWithTimeInterval:delayUntilCheck target:self selector:@selector(checkForUpdatesInBackground) userInfo:nil repeats:NO]; // Timer is non-repeating, may have invalidated itself, so we had to retain it.
}
- (void)receiveSleepNote
{
if (self.checkTimer)
{
[self.checkTimer invalidate];
self.checkTimer = nil;
self.shouldRescheduleOnWake = YES;
}
else
self.shouldRescheduleOnWake = NO;
}
- (void)receiveWakeNote
{
if (self.shouldRescheduleOnWake) // the reason for rescheduling the update-check timer is that NSTimer does behave as if the time the Mac spends asleep did not exist at all, which can significantly prolong the time between update checks
[self scheduleNextUpdateCheck];
}
- (void)checkForUpdatesInBackground
{
BOOL automatic = [self automaticallyDownloadsUpdates];
+7
View File
@@ -141,6 +141,13 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey;
*/
- (void)updaterDidNotFindUpdate:(SUUpdater *)updater;
/*!
Called when the user clicks the Skip This Version button.
\param updater The SUUpdater instance.
*/
- (void)updater:(SUUpdater *)updater userDidSkipThisVersion:(SUAppcastItem *)item;
/*!
Called immediately before downloading the specified update.
+1 -1
View File
@@ -8,7 +8,7 @@
"%@ %@ is currently the newest version available." = "%1$@ %2$@ est la version la plus récente disponible.";
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ est la version la plus récente disponible.\n(You are currently running version %3$@.)";
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ est la version la plus récente disponible.\n(vous utilisez actuellement la version %3$@)";
/* 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 ; vous utilisez la version %3$@. Voulez-vous le télécharger maintenant ?";
+1 -1
View File
@@ -8,7 +8,7 @@
"%@ %@ is currently the newest version available." = "%1$@ %2$@は現在入手できる最新バージョンです。";
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@は現在入手できる最新バージョンです。\n(You are currently running version %3$@.)";
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@は現在入手できる最新バージョンです。\n(現在使用中のバージョンは%3$@です。)";
/* Description text for SUUpdateAlert when the update is downloadable. */
"%@ %@ is now available--you have %@. Would you like to download it now?" = "%1$@ %2$@が入手できます(使用中のバージョンは%3$@です)。今すぐダウンロードしますか?";
+1 -1
View File
@@ -6,7 +6,7 @@
"%@ %@ is currently the newest version available." = "%1$@ %2$@ é a versão mais recente disponível.";
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ é a versão mais recente disponível.\n(You are currently running version %3$@.)";
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ é a versão mais recente disponível.\n(Você está usando a versão %3$@.)";
/* Description text for SUUpdateAlert when the update is downloadable. */
"%@ %@ is now available--you have %@. Would you like to download it now?" = "%1$@ %2$@ está disponível – sua versão é %3$@. Deseja transferi-lo agora?";
+5 -1
View File
@@ -93,7 +93,11 @@ class ArchiveItem: CustomStringConvertible {
var feedURL:URL? = nil;
if let feedURLStr = infoPlist["SUFeedURL"] as? String {
feedURL = URL(string: feedURLStr);
feedURL = URL(string: feedURLStr)
if feedURL?.pathExtension == "php" {
feedURL = feedURL!.deletingLastPathComponent()
feedURL = feedURL!.appendingPathComponent("appcast.xml")
}
}
try self.init(version: version,
+34 -12
View File
@@ -25,22 +25,39 @@ func printUsage() {
)
}
func loadPrivateKeys(_ privateDSAKey: SecKey?) -> PrivateKeys {
func loadPrivateKeys(_ privateDSAKey: SecKey?, _ privateEdString: String?) -> PrivateKeys {
var privateEdKey: Data?;
var publicEdKey: Data?;
var item: CFTypeRef?;
let res = SecItemCopyMatching([
kSecClass as String: kSecClassGenericPassword,
kSecAttrService as String: "https://sparkle-project.org",
kSecAttrAccount as String: "ed25519",
kSecAttrProtocol as String: kSecAttrProtocolSSH,
kSecReturnData as String: kCFBooleanTrue,
] as CFDictionary, &item);
if res == errSecSuccess, let encoded = item as? Data, let keys = Data(base64Encoded: encoded) {
var keys: Data?
// private + public key is provided as argument
if let privateEdString = privateEdString {
if privateEdString.count == 128, let data = privateEdString.data(using: .utf8) {
keys = data
} else {
print("Warning: Private key not found in the argument. Please provide a valid key.");
}
}
// get keys from kechain instead
else {
let res = SecItemCopyMatching([
kSecClass as String: kSecClassGenericPassword,
kSecAttrService as String: "https://sparkle-project.org",
kSecAttrAccount as String: "ed25519",
kSecAttrProtocol as String: kSecAttrProtocolSSH,
kSecReturnData as String: kCFBooleanTrue,
] as CFDictionary, &item);
if res == errSecSuccess, let encoded = item as? Data, let data = Data(base64Encoded: encoded) {
keys = data
} else {
print("Warning: Private key not found in the Keychain (\(res)). Please run the generate_keys tool");
}
}
if let keys = keys {
privateEdKey = keys[0..<64];
publicEdKey = keys[64...];
} else {
print("Warning: Private key not found in the Keychain (\(res)). Please run the generate_keys tool");
}
return PrivateKeys(privateDSAKey: privateDSAKey, privateEdKey: privateEdKey, publicEdKey: publicEdKey);
}
@@ -53,6 +70,7 @@ func main() {
}
var privateDSAKey: SecKey? = nil;
var privateEdString: String? = nil;
// this was typical usage for DSA keys
if args.count == 3 || (args.count == 4 && args[1] == "-f") {
@@ -98,13 +116,17 @@ func main() {
exit(1)
}
}
// private + public EdDSA keys are provided via command line argument
else if args.count == 4 && args[1] == "-s" {
privateEdString = args[2]
}
else if args.count != 2 {
printUsage()
exit(1)
}
let archivesSourceDir = URL(fileURLWithPath: args.last!, isDirectory: true)
let keys = loadPrivateKeys(privateDSAKey)
let keys = loadPrivateKeys(privateDSAKey, privateEdString)
do {
let allUpdates = try makeAppcast(archivesSourceDir: archivesSourceDir, keys: keys, verbose:verbose);