Compare commits

..
Author SHA1 Message Date
Zorg 75d16851c1 Remove support for interactive base pkg installs 2022-08-06 22:50:58 -07:00
Zorg 4cb6719c6b Critical update alerts may not show up as promptly as they should when automatically installing them (#2221)
Wait for appcast item registration before finishing automatic update driver.

This fixes a potential race issue where sometimes the automatic update driver on completion would sometimes not trigger to prompt an update alert immediately for critical updates. Note in this case, the update would still be installed on app termination and would still be scheduled to alert the user on the regular update check interval, so this issue is not severe.
2022-08-06 11:28:47 -07:00
Zorg 2c81393ec2 Remove module imports from framework headers (#2217)
Framework headers should not be using them. The warning these aim to suppress (-Wauto-import) is also going away.
2022-07-29 22:01:04 -07:00
Zorg 983d19580b Fix handle applying patches when files aren't writeable (#2216) 2022-07-23 10:37:29 -07:00
Zorg 6cbe8444a0 Refine update alert when no release notes are shown (#2206)
* Set layout constraint constant between buttons and description to 20

* Disable update alert resizing when no release notes are available

* Fix layout constraint warning

* Set alert autosave frame name only when release notes are shown
2022-07-17 20:56:17 -07:00
Zorg 45a9099082 Reject DSA only configurations for setting up the updater (#2207)
The one exception is an updater that is targeted to update another / non-main bundle.

Note we still allow configuration of not using DSA or EdDSA with the deprecation warning in tact.
2022-07-17 20:55:31 -07:00
Jie aa72b3f639 Hide automatic install check box when allowsAutomaticUpdates is disabled (#2202) 2022-07-17 16:45:02 -07:00
Zorg 372f0504a5 Bump minimum deployment target to macOS 10.13 (#2196) 2022-07-17 16:43:24 -07:00
Zorg 470296a90e Remove outdated model translation plist (#2195) 2022-07-17 15:57:43 -07:00
Zorg 242ae2c392 Disable implicit dependencies for runnable schemes (#2171)
Also add missing explicit dependencies from targets
2022-07-17 15:52:16 -07:00
Sparkle-Bot 059ce91287 Update Package management files for version 2.2.1 2022-07-16 13:34:05 +00:00
Zorg cc0007de3a Update CHANGELOG 2022-07-16 06:25:46 -07:00
VinBoiSoft fe69cab530 Update Italian localization (#2192) 2022-07-09 12:43:10 -07:00
Zorg 14e511f901 Fix memory leaks when using generate_appcast (#2193)
We fix one memory leak when calculating sha's, one memory leak in the xar delta applying path, and avoid creating Bundles for reading the Sparkle framework version.

There are some other small leaks with the xar delta creation/applying code but since it's a legacy implementation and the APIs are undocumented I don't want to touch it too much.

The biggest culprit here is the leak when calculating sha's I believe, if you have many archive items.
2022-07-09 12:22:36 -07:00
Pavel Moiseenko 80e60279ee Make dark scroll bar in dark theme (#2187) 2022-07-04 09:40:44 -07:00
Sparkle-Bot c1bf68f91f Update Package management files for version 2.2.0 2022-07-02 18:55:40 +00:00
Zorg 4622061d8f Add deprecation of -s flag in CHANGELOG 2022-07-02 09:45:00 -07:00
Zorg a7e5320d6a Update CHANGELOG 2022-07-01 21:58:58 -07:00
basilTandaONe 90221e7a0f Update Greek localizations (#2185)
Co-authored-by: aONe
2022-07-01 21:47:16 -07:00
aONe 7c1cc5627b Updated Greek translation (#2184)
Fixes #2175, from @seitsme
2022-07-01 19:08:13 -07:00
Zorg bececc3738 Reset opportune time for showing new updates after preference changes (#2183)
Reset opportune time for showing update notice when updater starts as well.

Also update updater header API documentation and add private protocol for gentle scheduled reminder APIs that the updater uses.
2022-07-01 19:06:27 -07:00
1024jp a6984d3c02 Update Japanese localization (#2182)
* Add unlocalized strings to Japanese localization

* Remove unwanted spaces in Japanese localization
2022-06-30 21:54:01 -07:00
Zorg 102c4a4009 Fix Greek translation in "You are currently running version" string (#2181) 2022-06-28 22:26:20 -07:00
Zorg d2fd9a50e0 Use recovery suggestion key for update permission error (#2180) 2022-06-26 18:41:55 -07:00
Zorg d544d456e0 Synchronize usage of XPC connections to main queue (#2178) 2022-06-25 21:29:44 -07:00
Zorg b1f6c161d1 Use snprintf instead of sprintf to fix compile warning (#2179) 2022-06-25 16:41:32 -07:00
Zorg 06daa03196 Fix installer status xpc service bundle ID (#2177)
The bundle ID name broke after I was renaming the XPC Services for 2.2.
2022-06-25 15:00:33 -07:00
Zorg e64b7649f2 Deprecate -s flag and add --ed-key-file option to generate_appcast (#2170) 2022-06-24 21:19:10 -07:00
103 changed files with 1098 additions and 1202 deletions

No files matched your search

+3 -1
View File
@@ -78,7 +78,9 @@
__weak AgentConnection *weakSelf = self; __weak AgentConnection *weakSelf = self;
newConnection.interruptionHandler = ^{ newConnection.interruptionHandler = ^{
[weakSelf.activeConnection invalidate]; dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf.activeConnection invalidate];
});
}; };
newConnection.invalidationHandler = ^{ newConnection.invalidationHandler = ^{
+44 -34
View File
@@ -34,6 +34,7 @@
#define FIRST_UPDATER_MESSAGE_TIMEOUT 18ull #define FIRST_UPDATER_MESSAGE_TIMEOUT 18ull
#define RETRIEVE_PROCESS_IDENTIFIER_TIMEOUT 8ull #define RETRIEVE_PROCESS_IDENTIFIER_TIMEOUT 8ull
#define UPDATER_APPCAST_ITEM_REGISTRATION_TIMEOUT 8ull
/** /**
* Show display progress UI after a delay from starting the final part of the installation. * Show display progress UI after a delay from starting the final part of the installation.
@@ -147,7 +148,9 @@ static const NSTimeInterval SUDisplayProgressTimeDelay = 0.7;
__weak AppInstaller *weakSelf = self; __weak AppInstaller *weakSelf = self;
newConnection.interruptionHandler = ^{ newConnection.interruptionHandler = ^{
[weakSelf.activeConnection invalidate]; dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf.activeConnection invalidate];
});
}; };
newConnection.invalidationHandler = ^{ newConnection.invalidationHandler = ^{
@@ -419,11 +422,36 @@ static const NSTimeInterval SUDisplayProgressTimeDelay = 0.7;
} else if (identifier == SPUSentUpdateAppcastItemData) { } else if (identifier == SPUSentUpdateAppcastItemData) {
SUAppcastItem *updateItem = (SUAppcastItem *)SPUUnarchiveRootObjectSecurely(data, [SUAppcastItem class]); SUAppcastItem *updateItem = (SUAppcastItem *)SPUUnarchiveRootObjectSecurely(data, [SUAppcastItem class]);
if (updateItem != nil) { if (updateItem != nil) {
SPUInstallationInfo *installationInfo = [[SPUInstallationInfo alloc] initWithAppcastItem:updateItem canSilentlyInstall:[self.installer canInstallSilently]]; // Note: older versions of Sparkle had interactive based pkg installers which could not be silently installed
SPUInstallationInfo *installationInfo = [[SPUInstallationInfo alloc] initWithAppcastItem:updateItem canSilentlyInstall:YES];
NSData *archivedData = SPUArchiveRootObjectSecurely(installationInfo); NSData *archivedData = SPUArchiveRootObjectSecurely(installationInfo);
if (archivedData != nil) { if (archivedData != nil) {
[self.agentConnection.agent registerInstallationInfoData:archivedData]; __block BOOL notifiedRegistrationCompleted = NO;
[self.agentConnection.agent registerInstallationInfoData:archivedData completionHandler:^{
dispatch_async(dispatch_get_main_queue(), ^{
if (!notifiedRegistrationCompleted) {
notifiedRegistrationCompleted = YES;
uint8_t targetTerminated = (uint8_t)self.terminationListener.terminated;
[self.communicator handleMessageWithIdentifier:SPUInstallerRegisteredAppcastItem data:[NSData dataWithBytes:&targetTerminated length:sizeof(targetTerminated)]];
}
});
}];
// Not receiving that we've registered the appcast item in a timely manner is not a fatal issue
// If this operation takes too long, just let assume the item will be registered
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(UPDATER_APPCAST_ITEM_REGISTRATION_TIMEOUT * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (!notifiedRegistrationCompleted) {
notifiedRegistrationCompleted = YES;
SULog(SULogLevelError, @"Warning: did not receive appcast item registration from Updater in timely manner. Proceeding..");
uint8_t targetTerminated = (uint8_t)self.terminationListener.terminated;
[self.communicator handleMessageWithIdentifier:SPUInstallerRegisteredAppcastItem data:[NSData dataWithBytes:&targetTerminated length:sizeof(targetTerminated)]];
}
});
} }
} }
} else if (identifier == SPUResumeInstallationToStage2 && data.length == sizeof(uint8_t) * 2) { } else if (identifier == SPUResumeInstallationToStage2 && data.length == sizeof(uint8_t) * 2) {
@@ -432,7 +460,7 @@ static const NSTimeInterval SUDisplayProgressTimeDelay = 0.7;
uint8_t showsUI = *((const uint8_t *)data.bytes + 1); uint8_t showsUI = *((const uint8_t *)data.bytes + 1);
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
// This flag has an impact on interactive type installations and showing UI progress during non-interactive installations // This flag has an impact on showing UI progress during non-interactive installations
self.shouldShowUI = (BOOL)showsUI; self.shouldShowUI = (BOOL)showsUI;
// Don't test if the application was alive initially, leave that to the progress agent if we decide to relaunch // Don't test if the application was alive initially, leave that to the progress agent if we decide to relaunch
self.shouldRelaunch = (BOOL)relaunch; self.shouldRelaunch = (BOOL)relaunch;
@@ -480,18 +508,10 @@ static const NSTimeInterval SUDisplayProgressTimeDelay = 0.7;
return; return;
} }
uint8_t canPerformSilentInstall = (uint8_t)[installer canInstallSilently];
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
self.installer = installer; self.installer = installer;
uint8_t targetTerminated = (uint8_t)self.terminationListener.terminated; [self.communicator handleMessageWithIdentifier:SPUInstallationFinishedStage1 data:[NSData data]];
uint8_t sendInformation[] = {canPerformSilentInstall, targetTerminated};
NSData *sendData = [NSData dataWithBytes:sendInformation length:sizeof(sendInformation)];
[self.communicator handleMessageWithIdentifier:SPUInstallationFinishedStage1 data:sendData];
self.performedStage1Installation = YES; self.performedStage1Installation = YES;
@@ -508,27 +528,18 @@ static const NSTimeInterval SUDisplayProgressTimeDelay = 0.7;
return; return;
} }
BOOL performedSecondStage = self.shouldShowUI || [self.installer canInstallSilently]; self.performedStage2Installation = YES;
if (performedSecondStage) {
self.performedStage2Installation = YES; dispatch_async(dispatch_get_main_queue(), ^{
uint8_t targetTerminated = (uint8_t)self.terminationListener.terminated;
dispatch_async(dispatch_get_main_queue(), ^{ NSData *sendData = [NSData dataWithBytes:&targetTerminated length:sizeof(targetTerminated)];
uint8_t targetTerminated = (uint8_t)self.terminationListener.terminated; [self.communicator handleMessageWithIdentifier:SPUInstallationFinishedStage2 data:sendData];
NSData *sendData = [NSData dataWithBytes:&targetTerminated length:sizeof(targetTerminated)];
[self.communicator handleMessageWithIdentifier:SPUInstallationFinishedStage2 data:sendData];
// Don't check if the target is already terminated, leave that to the progress agent
// We could be slightly off if there were multiple instances running
[self.agentConnection.agent sendTerminationSignal];
});
} else {
self.installer = nil;
dispatch_async(dispatch_get_main_queue(), ^{ // Don't check if the target is already terminated, leave that to the progress agent
[self cleanupAndExitWithStatus:EXIT_FAILURE error:[NSError errorWithDomain:SUSparkleErrorDomain code:SPUInstallerError userInfo:@{ NSLocalizedDescriptionKey: @"Error: Failed to resume installer on stage 2 because installation cannot be installed silently" }]]; // We could be slightly off if there were multiple instances running
}); [self.agentConnection.agent sendTerminationSignal];
} });
} }
- (void)finishInstallationAfterHostTermination - (void)finishInstallationAfterHostTermination
@@ -540,9 +551,8 @@ static const NSTimeInterval SUDisplayProgressTimeDelay = 0.7;
} }
// Show our installer progress UI tool if only after a certain amount of time passes, // Show our installer progress UI tool if only after a certain amount of time passes,
// and if our installer is silent (i.e, doesn't show progress on its own)
__block BOOL shouldShowUIProgress = YES; __block BOOL shouldShowUIProgress = YES;
if (self.shouldShowUI && [self.installer canInstallSilently]) { if (self.shouldShowUI) {
// Ask the updater if it is still alive // Ask the updater if it is still alive
// If they are, we will receive a pong response back // If they are, we will receive a pong response back
// Reset if we received a pong just to be on the safe side // Reset if we received a pong just to be on the safe side
+2
View File
@@ -17,6 +17,8 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithAppcastItem:(SUAppcastItem *)appcastItem canSilentlyInstall:(BOOL)canSilentyInstall; - (instancetype)initWithAppcastItem:(SUAppcastItem *)appcastItem canSilentlyInstall:(BOOL)canSilentyInstall;
@property (nonatomic, readonly) SUAppcastItem *appcastItem; @property (nonatomic, readonly) SUAppcastItem *appcastItem;
// Always YES in newer versions of Sparkle but kept around for compatibility
@property (nonatomic, readonly) BOOL canSilentlyInstall; @property (nonatomic, readonly) BOOL canSilentlyInstall;
@property (nonatomic) BOOL systemDomain; @property (nonatomic) BOOL systemDomain;
+2 -1
View File
@@ -23,7 +23,8 @@ typedef NS_ENUM(int32_t, SPUInstallerMessageType)
SPUInstallationFinishedStage2 = 7, SPUInstallationFinishedStage2 = 7,
SPUInstallationFinishedStage3 = 8, SPUInstallationFinishedStage3 = 8,
SPUUpdaterAlivePing = 9, SPUUpdaterAlivePing = 9,
SPUInstallerError = 10 SPUInstallerError = 10,
SPUInstallerRegisteredAppcastItem = 11,
}; };
typedef NS_ENUM(int32_t, SPUUpdaterMessageType) typedef NS_ENUM(int32_t, SPUUpdaterMessageType)
+5 -2
View File
@@ -23,7 +23,7 @@
BOOL SPUInstallerMessageTypeIsLegal(SPUInstallerMessageType oldMessageType, SPUInstallerMessageType newMessageType) BOOL SPUInstallerMessageTypeIsLegal(SPUInstallerMessageType oldMessageType, SPUInstallerMessageType newMessageType)
{ {
BOOL legal; BOOL legal = NO;
switch (newMessageType) { switch (newMessageType) {
case SPUInstallerNotStarted: case SPUInstallerNotStarted:
legal = (oldMessageType == SPUInstallerNotStarted); legal = (oldMessageType == SPUInstallerNotStarted);
@@ -45,7 +45,7 @@ BOOL SPUInstallerMessageTypeIsLegal(SPUInstallerMessageType oldMessageType, SPUI
legal = (oldMessageType == SPUInstallationStartedStage1); legal = (oldMessageType == SPUInstallationStartedStage1);
break; break;
case SPUInstallationFinishedStage2: case SPUInstallationFinishedStage2:
legal = (oldMessageType == SPUInstallationFinishedStage1); legal = (oldMessageType == SPUInstallationFinishedStage1 || oldMessageType == SPUInstallerRegisteredAppcastItem);
break; break;
case SPUInstallationFinishedStage3: case SPUInstallationFinishedStage3:
legal = (oldMessageType == SPUInstallationFinishedStage2); legal = (oldMessageType == SPUInstallationFinishedStage2);
@@ -56,6 +56,9 @@ BOOL SPUInstallerMessageTypeIsLegal(SPUInstallerMessageType oldMessageType, SPUI
// So just always allow these type of messages // So just always allow these type of messages
legal = YES; legal = YES;
break; break;
case SPUInstallerRegisteredAppcastItem:
legal = (oldMessageType == SPUInstallationFinishedStage1);
break;
} }
return legal; return legal;
} }
+2
View File
@@ -559,6 +559,8 @@ static compression_algorithm _compressionAlgorithmForMode(SPUDeltaCompressionMod
if ((commands & SPUDeltaItemCommandBinaryDiff) != 0 || S_ISREG(mode)) { if ((commands & SPUDeltaItemCommandBinaryDiff) != 0 || S_ISREG(mode)) {
// Regular files // Regular files
[fileManager removeItemAtPath:itemFilePath error:NULL];
char itemFilePathString[PATH_MAX + 1] = {0}; char itemFilePathString[PATH_MAX + 1] = {0};
if (![itemFilePath getFileSystemRepresentation:itemFilePathString maxLength:sizeof(itemFilePathString) - 1]) { if (![itemFilePath getFileSystemRepresentation:itemFilePathString maxLength:sizeof(itemFilePathString) - 1]) {
self.error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadInvalidFileNameError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Path to extract cannot be decoded and expressed as a file system representation: %@", itemFilePath] }]; self.error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadInvalidFileNameError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Path to extract cannot be decoded and expressed as a file system representation: %@", itemFilePath] }];
+5 -1
View File
@@ -348,7 +348,11 @@ static xar_file_t _xarAddFile(NSMutableDictionary<NSString *, NSValue *> *fileTa
continue; continue;
} }
NSString *relativePath = @(pathCString); NSString *relativePath = [[NSString alloc] initWithBytesNoCopy:pathCString length:strlen(pathCString) encoding:NSUTF8StringEncoding freeWhenDone:YES];
if (relativePath == nil) {
free(pathCString);
continue;
}
SPUDeltaItemCommands commands = 0; SPUDeltaItemCommands commands = 0;
{ {
+22 -27
View File
@@ -282,6 +282,21 @@ BOOL applyBinaryDelta(NSString *source, NSString *finalDestination, NSString *pa
clonedRelativePath = nil; clonedRelativePath = nil;
} }
// Decide if we need to preserve original file permissions from the original file
// applyBinaryDeltaToFile() normally preserves file permissions on the file it's replacing.
// However this is not possible if the destination file we're patching is not writable.
// We also need to preserve permissions for clones except when we'll be changing permissions later anyway.
BOOL needsToCopyFilePermissions;
if (![fileManager isWritableFileAtPath:destinationFilePath]) {
// Remove the file non-writable we're patching that may cause issues
[fileManager removeItemAtPath:destinationFilePath error:NULL];
// We will need to preserve permissons if there is no need to make permission changes later on
needsToCopyFilePermissions = (commands & SPUDeltaItemCommandModifyPermissions) == 0;
} else {
needsToCopyFilePermissions = ((commands & SPUDeltaItemCommandClone) != 0) && ((commands & SPUDeltaItemCommandModifyPermissions) == 0);
}
if (!applyBinaryDeltaToFile(tempDiffFile, sourceDiffFilePath, destinationFilePath)) { if (!applyBinaryDeltaToFile(tempDiffFile, sourceDiffFilePath, destinationFilePath)) {
if (verbose) { if (verbose) {
fprintf(stderr, "\n"); fprintf(stderr, "\n");
@@ -293,12 +308,7 @@ BOOL applyBinaryDelta(NSString *source, NSString *finalDestination, NSString *pa
return; return;
} }
// Preserve original file permissions from the original file if (needsToCopyFilePermissions) {
// Only necessary for clones because applyBinaryDeltaToFile() otherwise preserves
// file permissions on the file it's replacing. Also not necessary if we're going to
// change permissions later
if ((commands & SPUDeltaItemCommandClone) != 0 && (commands & SPUDeltaItemCommandModifyPermissions) == 0) {
struct stat sourceFileInfo = {0}; struct stat sourceFileInfo = {0};
if (lstat(sourceDiffFilePath.fileSystemRepresentation, &sourceFileInfo) != 0) { if (lstat(sourceDiffFilePath.fileSystemRepresentation, &sourceFileInfo) != 0) {
if (verbose) { if (verbose) {
@@ -398,32 +408,17 @@ BOOL applyBinaryDelta(NSString *source, NSString *finalDestination, NSString *pa
NSTask *dittoTask = [[NSTask alloc] init]; NSTask *dittoTask = [[NSTask alloc] init];
if (@available(macOS 10.13, *)) { dittoTask.executableURL = [NSURL fileURLWithPath:@"/usr/bin/ditto" isDirectory:NO];
dittoTask.executableURL = [NSURL fileURLWithPath:@"/usr/bin/ditto" isDirectory:NO];
} else {
dittoTask.launchPath = @"/usr/bin/ditto";
}
dittoTask.arguments = @[@"--hfsCompression", destination, finalDestination]; dittoTask.arguments = @[@"--hfsCompression", destination, finalDestination];
// If we fail to apply file system compression, we will try falling back to not doing this // If we fail to apply file system compression, we will try falling back to not doing this
BOOL failedToApplyFileSystemCompression = NO; BOOL failedToApplyFileSystemCompression = NO;
if (@available(macOS 10.13, *)) { NSError *launchError = nil;
NSError *launchError = nil; if (![dittoTask launchAndReturnError:&launchError]) {
if (![dittoTask launchAndReturnError:&launchError]) { failedToApplyFileSystemCompression = YES;
failedToApplyFileSystemCompression = YES;
fprintf(stderr, "\nWarning: failed to launch ditto task for file compression: %s", launchError.localizedDescription.UTF8String);
fprintf(stderr, "\nWarning: failed to launch ditto task for file compression: %s", launchError.localizedDescription.UTF8String);
}
} else {
@try {
[dittoTask launch];
} @catch (NSException *exception) {
failedToApplyFileSystemCompression = YES;
fprintf(stderr, "\nWarning: failed to launch ditto task for file compression: %s", exception.reason.UTF8String);
}
} }
if (!failedToApplyFileSystemCompression) { if (!failedToApplyFileSystemCompression) {
+1 -1
View File
@@ -329,7 +329,7 @@ NSString *displayHashFromRawHash(const unsigned char *hash)
{ {
char hexHash[CC_SHA1_DIGEST_LENGTH * 2 + 1] = {0}; char hexHash[CC_SHA1_DIGEST_LENGTH * 2 + 1] = {0};
for (size_t i = 0; i < CC_SHA1_DIGEST_LENGTH; i++) { for (size_t i = 0; i < CC_SHA1_DIGEST_LENGTH; i++) {
sprintf(hexHash + i * 2, "%02x", hash[i]); snprintf(hexHash + i * 2, 3, "%02x", hash[i]);
} }
return @(hexHash); return @(hexHash);
} }
+6 -24
View File
@@ -128,16 +128,8 @@
dispatch_semaphore_signal(terminationSemaphore); dispatch_semaphore_signal(terminationSemaphore);
}; };
if (@available(macOS 10.13, *)) { if (![task launchAndReturnError:&error]) {
if (![task launchAndReturnError:&error]) { goto reportError;
goto reportError;
}
} else {
@try {
[task launch];
} @catch (NSException *) {
goto reportError;
}
} }
[notifier notifyProgress:0.125]; [notifier notifyProgress:0.125];
@@ -221,20 +213,10 @@
task.standardOutput = [NSPipe pipe]; task.standardOutput = [NSPipe pipe];
task.standardError = [NSPipe pipe]; task.standardError = [NSPipe pipe];
NSError *launchCleanupError = nil;
if (@available(macOS 10.13, *)) { if (![task launchAndReturnError:&launchCleanupError]) {
NSError *launchCleanupError = nil; SULog(SULogLevelError, @"Failed to unmount %@", mountPoint);
if (![task launchAndReturnError:&launchCleanupError]) { SULog(SULogLevelError, @"Error: %@", launchCleanupError);
SULog(SULogLevelError, @"Failed to unmount %@", mountPoint);
SULog(SULogLevelError, @"Error: %@", launchCleanupError);
}
} else {
@try {
[task launch];
} @catch (NSException *exception) {
SULog(SULogLevelError, @"Failed to unmount %@", mountPoint);
SULog(SULogLevelError, @"Exception: %@", exception);
}
} }
} else { } else {
SULog(SULogLevelError, @"Can't mount DMG %@", self.archivePath); SULog(SULogLevelError, @"Can't mount DMG %@", self.archivePath);
-1
View File
@@ -50,7 +50,6 @@
{ {
SUUnarchiverNotifier *notifier = [[SUUnarchiverNotifier alloc] initWithCompletionBlock:completionBlock progressBlock:progressBlock]; SUUnarchiverNotifier *notifier = [[SUUnarchiverNotifier alloc] initWithCompletionBlock:completionBlock progressBlock:progressBlock];
// Flat packages must use guided package installs, not interactive
BOOL isDirectory = NO; BOOL isDirectory = NO;
if (![self.expectedInstallationType isEqualToString:SPUInstallationTypeGuidedPackage]) { if (![self.expectedInstallationType isEqualToString:SPUInstallationTypeGuidedPackage]) {
[notifier notifyFailureWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUUnarchivingError userInfo:@{ NSLocalizedDescriptionKey:[NSString stringWithFormat:@"Flat package does not have guided installation type but %@ instead", self.expectedInstallationType]}]]; [notifier notifyFailureWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUUnarchivingError userInfo:@{ NSLocalizedDescriptionKey:[NSString stringWithFormat:@"Flat package does not have guided installation type but %@ instead", self.expectedInstallationType]}]];
+9 -26
View File
@@ -56,30 +56,18 @@
task.standardError = nil; task.standardError = nil;
task.standardOutput = nil; task.standardOutput = nil;
if (@available(macOS 10.13, *)) { NSError *launchError = nil;
NSError *launchError = nil; if (![task launchAndReturnError:&launchError]) {
if (![task launchAndReturnError:&launchError]) { if (error != NULL) {
if (error != NULL) { NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:@{ NSLocalizedDescriptionKey: @"Guided package installer failed to launch" }];
NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:@{ NSLocalizedDescriptionKey: @"Guided package installer failed to launch" }];
if (launchError != nil) {
if (launchError != nil) { userInfo[NSUnderlyingErrorKey] = launchError;
userInfo[NSUnderlyingErrorKey] = launchError;
}
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:userInfo];
}
return NO;
}
} else {
@try {
[task launch];
} @catch (NSException *) {
if (error != NULL) {
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{ NSLocalizedDescriptionKey: @"Guided package installer task threw an exception" }];
} }
return NO; *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:userInfo];
} }
return NO;
} }
[task waitUntilExit]; [task waitUntilExit];
@@ -99,9 +87,4 @@
{ {
} }
- (BOOL)canInstallSilently
{
return YES;
}
@end @end
+1 -1
View File
@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
+ (nullable id<SUInstallerProtocol>)installerForHost:(SUHost *)host expectedInstallationType:(NSString *)expectedInstallationType updateDirectory:(NSString *)updateDirectory homeDirectory:(NSString *)homeDirectory userName:(NSString *)userName error:(NSError **)error; + (nullable id<SUInstallerProtocol>)installerForHost:(SUHost *)host expectedInstallationType:(NSString *)expectedInstallationType updateDirectory:(NSString *)updateDirectory homeDirectory:(NSString *)homeDirectory userName:(NSString *)userName error:(NSError **)error;
+ (nullable NSString *)installSourcePathInUpdateFolder:(NSString *)inUpdateFolder forHost:(SUHost *)host isPackage:(BOOL *)isPackagePtr isGuided:(nullable BOOL *)isGuidedPtr; + (nullable NSString *)installSourcePathInUpdateFolder:(NSString *)inUpdateFolder forHost:(SUHost *)host isPackage:(BOOL *)isPackagePtr;
@end @end
+3 -26
View File
@@ -8,7 +8,6 @@
#import "SUInstaller.h" #import "SUInstaller.h"
#import "SUPlainInstaller.h" #import "SUPlainInstaller.h"
#import "SUPackageInstaller.h"
#import "SUGuidedPackageInstaller.h" #import "SUGuidedPackageInstaller.h"
#import "SUHost.h" #import "SUHost.h"
#import "SUConstants.h" #import "SUConstants.h"
@@ -31,7 +30,7 @@
return aliasFlag.boolValue && directoryFlag.boolValue; return aliasFlag.boolValue && directoryFlag.boolValue;
} }
+ (nullable NSString *)installSourcePathInUpdateFolder:(NSString *)inUpdateFolder forHost:(SUHost *)host isPackage:(BOOL *)isPackagePtr isGuided:(BOOL *)isGuidedPtr + (nullable NSString *)installSourcePathInUpdateFolder:(NSString *)inUpdateFolder forHost:(SUHost *)host isPackage:(BOOL *)isPackagePtr
{ {
NSParameterAssert(inUpdateFolder); NSParameterAssert(inUpdateFolder);
NSParameterAssert(host); NSParameterAssert(host);
@@ -42,7 +41,6 @@
*bundleFileName = [[host bundlePath] lastPathComponent], *bundleFileName = [[host bundlePath] lastPathComponent],
*alternateBundleFileName = [[host name] stringByAppendingPathExtension:[[host bundlePath] pathExtension]]; *alternateBundleFileName = [[host name] stringByAppendingPathExtension:[[host bundlePath] pathExtension]];
BOOL isPackage = NO; BOOL isPackage = NO;
BOOL isGuided = YES;
NSString *fallbackPackagePath = nil; NSString *fallbackPackagePath = nil;
NSDirectoryEnumerator *dirEnum = [[NSFileManager defaultManager] enumeratorAtPath:inUpdateFolder]; NSDirectoryEnumerator *dirEnum = [[NSFileManager defaultManager] enumeratorAtPath:inUpdateFolder];
NSString *bundleFileNameNoExtension = [bundleFileName stringByDeletingPathExtension]; NSString *bundleFileNameNoExtension = [bundleFileName stringByDeletingPathExtension];
@@ -91,20 +89,8 @@
newAppDownloadPath = fallbackPackagePath; newAppDownloadPath = fallbackPackagePath;
} }
if (isPackage) {
// Guided (or now "normal") installs used to be opt-in (i.e, Sparkle would detect foo.sparkle_guided.pkg or foo.sparkle_guided.mpkg),
// but to get an interactive (or "unguided") install, the developer now must opt-out of guided installations.
// foo.app -> foo.sparkle_interactive.pkg or foo.sparkle_interactive.mpkg
if ([[[newAppDownloadPath stringByDeletingPathExtension] pathExtension] isEqualToString:@"sparkle_interactive"]) {
isGuided = NO;
}
}
if (isPackagePtr) if (isPackagePtr)
*isPackagePtr = isPackage; *isPackagePtr = isPackage;
if (isGuidedPtr)
*isGuidedPtr = isGuided;
if (!newAppDownloadPath) { if (!newAppDownloadPath) {
SULog(SULogLevelError, @"Searched %@ for %@.(app|pkg)", inUpdateFolder, bundleFileNameNoExtension); SULog(SULogLevelError, @"Searched %@ for %@.(app|pkg)", inUpdateFolder, bundleFileNameNoExtension);
@@ -115,8 +101,7 @@
+ (nullable id<SUInstallerProtocol>)installerForHost:(SUHost *)host expectedInstallationType:(NSString *)expectedInstallationType updateDirectory:(NSString *)updateDirectory homeDirectory:(NSString *)homeDirectory userName:(NSString *)userName error:(NSError * __autoreleasing *)error + (nullable id<SUInstallerProtocol>)installerForHost:(SUHost *)host expectedInstallationType:(NSString *)expectedInstallationType updateDirectory:(NSString *)updateDirectory homeDirectory:(NSString *)homeDirectory userName:(NSString *)userName error:(NSError * __autoreleasing *)error
{ {
BOOL isPackage = NO; BOOL isPackage = NO;
BOOL isGuided = NO; NSString *newDownloadPath = [self installSourcePathInUpdateFolder:updateDirectory forHost:host isPackage:&isPackage];
NSString *newDownloadPath = [self installSourcePathInUpdateFolder:updateDirectory forHost:host isPackage:&isPackage isGuided:&isGuided];
if (newDownloadPath == nil) { if (newDownloadPath == nil) {
if (error != NULL) { if (error != NULL) {
@@ -129,7 +114,7 @@
// We shouldn't implicitly trust the installation type fed into here from the appcast because the installation type helps us determine // We shouldn't implicitly trust the installation type fed into here from the appcast because the installation type helps us determine
// ahead of time whether or not this installer tool should be ran as root or not // ahead of time whether or not this installer tool should be ran as root or not
id <SUInstallerProtocol> installer = nil; id <SUInstallerProtocol> installer = nil;
if (isPackage && isGuided) { if (isPackage) {
if (![expectedInstallationType isEqualToString:SPUInstallationTypeGuidedPackage]) { if (![expectedInstallationType isEqualToString:SPUInstallationTypeGuidedPackage]) {
if (error != NULL) { if (error != NULL) {
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Found guided package installer but '%@=%@' was probably missing in the appcast item enclosure", SUAppcastAttributeInstallationType, SPUInstallationTypeGuidedPackage] }]; *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Found guided package installer but '%@=%@' was probably missing in the appcast item enclosure", SUAppcastAttributeInstallationType, SPUInstallationTypeGuidedPackage] }];
@@ -137,14 +122,6 @@
} else { } else {
installer = [[SUGuidedPackageInstaller alloc] initWithPackagePath:newDownloadPath homeDirectory:homeDirectory userName:userName]; installer = [[SUGuidedPackageInstaller alloc] initWithPackagePath:newDownloadPath homeDirectory:homeDirectory userName:userName];
} }
} else if (isPackage) {
if (![expectedInstallationType isEqualToString:SPUInstallationTypeInteractivePackage]) {
if (error != NULL) {
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Found package installer but '%@=%@' was probably missing in the appcast item enclosure", SUAppcastAttributeInstallationType, SPUInstallationTypeInteractivePackage] }];
}
} else {
installer = [[SUPackageInstaller alloc] initWithPackagePath:newDownloadPath];
}
} else { } else {
if (![expectedInstallationType isEqualToString:SPUInstallationTypeApplication]) { if (![expectedInstallationType isEqualToString:SPUInstallationTypeApplication]) {
if (error != NULL) { if (error != NULL) {
-5
View File
@@ -28,11 +28,6 @@ NS_ASSUME_NONNULL_BEGIN
// Should be able to be called from any thread // Should be able to be called from any thread
- (void)performCleanup; - (void)performCleanup;
// Indicates whether or not this installer can install the update silently in the background, without hindering the user
// If this returns NO, then the installation can fail if the user did not directly request for the install to occur.
// Should be thread safe
- (BOOL)canInstallSilently;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
-19
View File
@@ -1,19 +0,0 @@
//
// SUPackageInstaller.h
// Sparkle
//
// Created by Andy Matuschak on 4/10/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "SUInstallerProtocol.h"
// This is the deprecated package installation type, aka the "interactive" package installer
// For a more supported package installation, see SUGuidedPackageInstaller
@interface SUPackageInstaller : NSObject <SUInstallerProtocol>
- (instancetype)initWithPackagePath:(NSString *)packagePath;
@end
-82
View File
@@ -1,82 +0,0 @@
//
// SUPackageInstaller.m
// Sparkle
//
// Created by Andy Matuschak on 4/10/08.
// Copyright 2008 Andy Matuschak. All rights reserved.
//
#import "SUPackageInstaller.h"
#import "SUConstants.h"
#import "SUErrors.h"
#import "SULog.h"
#include "AppKitPrevention.h"
@interface SUPackageInstaller ()
@property (nonatomic, readonly, copy) NSString *packagePath;
@end
@implementation SUPackageInstaller
static NSString *SUOpenUtilityPath = @"/usr/bin/open";
@synthesize packagePath = _packagePath;
- (instancetype)initWithPackagePath:(NSString *)packagePath
{
self = [super init];
if (self != nil) {
_packagePath = [packagePath copy];
}
return self;
}
- (BOOL)performInitialInstallation:(NSError * __autoreleasing *)error
{
if (![[NSFileManager defaultManager] fileExistsAtPath:SUOpenUtilityPath]) {
if (error != NULL) {
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUMissingInstallerToolError userInfo:@{ NSLocalizedDescriptionKey: @"Couldn't find Apple's installer tool!" }];
}
return NO;
}
return YES;
}
- (BOOL)performFinalInstallationProgressBlock:(nullable void(^)(double))__unused cb error:(NSError *__autoreleasing*)error
{
// Run installer using the "open" command to ensure it is launched in front of current application.
// -W = wait until the app has quit.
// -n = Open another instance if already open.
// -b = app bundle identifier
NSArray *args = @[@"-W", @"-n", @"-b", @"com.apple.installer", self.packagePath];
// Known bug: if the installation fails or is canceled, Sparkle goes ahead and restarts, thinking everything is fine.
@try {
NSTask *installer = [NSTask launchedTaskWithLaunchPath:SUOpenUtilityPath arguments:args];
[installer waitUntilExit];
}
@catch (NSException *exception) {
SULog(SULogLevelError, @"Error: Failed to launch package installer: %@", exception);
if (error != NULL) {
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{ NSLocalizedDescriptionKey: @"Package installer failed to launch." }];
}
return NO;
}
return YES;
}
- (void)performCleanup
{
}
- (BOOL)canInstallSilently
{
return NO;
}
@end
+3 -13
View File
@@ -119,19 +119,9 @@
[task setArguments:[args arrayByAddingObject:destination]]; [task setArguments:[args arrayByAddingObject:destination]];
NSError *launchError = nil; NSError *launchError = nil;
if (@available(macOS 10.13, *)) { if (![task launchAndReturnError:&launchError]) {
if (![task launchAndReturnError:&launchError]) { [notifier notifyFailureWithError:launchError];
[notifier notifyFailureWithError:launchError]; return;
return;
}
} else {
@try {
[task launch];
} @catch (NSException *e) {
NSError *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUUnarchivingError userInfo:@{ NSLocalizedDescriptionKey:[NSString stringWithFormat:@"Extraction failed, -[NSTask launch] threw exception '%@'", e.description]}];
[notifier notifyFailureWithError:error];
return;
}
} }
NSFileHandle *archiveOutput = [pipe fileHandleForWriting]; NSFileHandle *archiveOutput = [pipe fileHandleForWriting];
+6 -15
View File
@@ -200,17 +200,13 @@
// First try swapping the application atomically // First try swapping the application atomically
NSError *swapError = nil; NSError *swapError = nil;
BOOL swappedApp; BOOL swappedApp;
if (@available(macOS 10.13, *)) { // If the app is normalized and the installation path differs, go through the old swap path
// If the app is normalized and the installation path differs, go through the old swap path if (SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME && ![oldURL.path isEqual:installationURL.path]) {
if (SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME && ![oldURL.path isEqual:installationURL.path]) {
swappedApp = NO;
} else {
// We will be cleaning up the temporary directory later in -performCleanup:
// We don't want to clean it up now because it can take some time
swappedApp = [fileManager swapItemAtURL:installationURL withItemAtURL:newTempURL error:&swapError];
}
} else {
swappedApp = NO; swappedApp = NO;
} else {
// We will be cleaning up the temporary directory later in -performCleanup:
// We don't want to clean it up now because it can take some time
swappedApp = [fileManager swapItemAtURL:installationURL withItemAtURL:newTempURL error:&swapError];
} }
if (!swappedApp) { if (!swappedApp) {
@@ -334,9 +330,4 @@
} }
} }
- (BOOL)canInstallSilently
{
return YES;
}
@end @end
+13 -1
View File
@@ -1,3 +1,9 @@
# 2.2.1
* Make scroll bar dark in dark theme for Release Notes by default (#2187) (Pavel Moiseenko)
* Fix memory leaks when using generate_appcast (#2193) (Zorg)
* Update Italian localization (#2192) (VinBoiSoft)
# 2.2.0 # 2.2.0
* Update Focus Improvements (#924) * Update Focus Improvements (#924)
@@ -13,6 +19,7 @@
* Rename XPC Service filenames for Sandboxing to show more friendly human-readable name in authorization dialog (Zorg) (#2096) * Rename XPC Service filenames for Sandboxing to show more friendly human-readable name in authorization dialog (Zorg) (#2096)
* Add support for running the framework and sparkle-cli as root (Zorg) (#2119) * Add support for running the framework and sparkle-cli as root (Zorg) (#2119)
* Fix issue where update cycle may not complete in unusual configuration if automatic checks are disabled + automatic downloading is enabled + install requires user interaction (Zorg) (#2133) * Fix issue where update cycle may not complete in unusual configuration if automatic checks are disabled + automatic downloading is enabled + install requires user interaction (Zorg) (#2133)
* Synchronize usage of XPC connections to main queue to fix potential race conditions (Zorg) (#2178)
* Update last update check time when choosing to install an update & relaunch (Zorg) (#2136) * Update last update check time when choosing to install an update & relaunch (Zorg) (#2136)
* Improve error reporting in the framework and sparkle-cli when installation fails with no write permission (Zorg) (#2157) * Improve error reporting in the framework and sparkle-cli when installation fails with no write permission (Zorg) (#2157)
* Use displayVersionString instead of versionString for OS version mismatch error message (samschott) (#2138) * Use displayVersionString instead of versionString for OS version mismatch error message (samschott) (#2138)
@@ -23,15 +30,20 @@
* Bump initial installer message timeouts and declare daemon/agents processes as Interactive (Zorg) (#2162) * Bump initial installer message timeouts and declare daemon/agents processes as Interactive (Zorg) (#2162)
* Add and improve translation strings and update pt-BR (BR Lingo) (#2094) * Add and improve translation strings and update pt-BR (BR Lingo) (#2094)
* Update localisations (Eitot) (#2113) * Update localisations (Eitot) (#2113)
* Update Greek localizations (seitsme) (#2184, #2185)
* Update Japanese localization (1024jp) (#2182)
* Replace deprecated code with newer APIs (Eitot) (#2112) * Replace deprecated code with newer APIs (Eitot) (#2112)
* Remove obsolete fallbacks for older OS versions (Eitot) (#2110) * Remove obsolete fallbacks for older OS versions (Eitot) (#2110)
* Remove SPUURLRequest (Zorg) (#2124) * Remove SPUURLRequest (Zorg) (#2124)
* Silence ivar deprecation warnings (Zorg) (#2099) * Silence ivar deprecation warnings (Zorg) (#2099)
* Fix Xcode 14 project warnings (Zorg) (#2147) * Fix Xcode 14 project warnings (Zorg) (#2147, #2179)
* Deprecate -s flag and add --ed-key-file option to generate_appcast (Zorg) (#2170)
* Update text for external licenses (Zorg) (#2164) * Update text for external licenses (Zorg) (#2164)
This update renames the bundled XPC Services, brings improvements to notifying users of new updates without disrupting their focus, and adds [gentle update reminder APIs](https://sparkle-project.org/documentation/gentle-reminders/) to further customize how Sparkle's standard user interface delivers new update alerts. This update renames the bundled XPC Services, brings improvements to notifying users of new updates without disrupting their focus, and adds [gentle update reminder APIs](https://sparkle-project.org/documentation/gentle-reminders/) to further customize how Sparkle's standard user interface delivers new update alerts.
The `-s` flag for passing a raw private EdDSA key to sign_update and generate_appcast is now deprecated. If you were using this option previously, please see the help pages of these tools for more information.
# 2.1.0 # 2.1.0
* New Binary Delta format (version 3) * New Binary Delta format (version 3)
+1 -1
View File
@@ -1 +1 @@
{"1.27.1": "https://github.com/sparkle-project/Sparkle/releases/download/1.27.1/Sparkle-1.27.1.tar.xz", "2.0.0-beta.6": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0-beta.6/Sparkle-2.0.0-beta.6.tar.xz", "2.0.0-rc.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0-rc.1/Sparkle-2.0.0-rc.1.tar.xz", "2.0.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0/Sparkle-2.0.0.tar.xz", "2.1.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0-beta.1/Sparkle-2.1.0-beta.1.tar.xz", "2.1.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0-beta.2/Sparkle-2.1.0-beta.2.tar.xz", "2.1.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0/Sparkle-2.1.0.tar.xz", "2.2.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.0-beta.1/Sparkle-2.2.0-beta.1.tar.xz", "2.2.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.0-beta.2/Sparkle-2.2.0-beta.2.tar.xz"} {"1.27.1": "https://github.com/sparkle-project/Sparkle/releases/download/1.27.1/Sparkle-1.27.1.tar.xz", "2.0.0-beta.6": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0-beta.6/Sparkle-2.0.0-beta.6.tar.xz", "2.0.0-rc.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0-rc.1/Sparkle-2.0.0-rc.1.tar.xz", "2.0.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0/Sparkle-2.0.0.tar.xz", "2.1.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0-beta.1/Sparkle-2.1.0-beta.1.tar.xz", "2.1.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0-beta.2/Sparkle-2.1.0-beta.2.tar.xz", "2.1.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0/Sparkle-2.1.0.tar.xz", "2.2.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.0-beta.1/Sparkle-2.2.0-beta.1.tar.xz", "2.2.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.0-beta.2/Sparkle-2.2.0-beta.2.tar.xz", "2.2.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.0/Sparkle-2.2.0.tar.xz", "2.2.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.1/Sparkle-2.2.1.tar.xz"}
+4 -4
View File
@@ -43,12 +43,12 @@ SPARKLE_ICON_NAME = AppIcon
// These variables must have a space after the '=' too // These variables must have a space after the '=' too
SPARKLE_VERSION_MAJOR = 2 SPARKLE_VERSION_MAJOR = 2
SPARKLE_VERSION_MINOR = 2 SPARKLE_VERSION_MINOR = 2
SPARKLE_VERSION_PATCH = 0 SPARKLE_VERSION_PATCH = 1
// This should be in SemVer format or empty, ie. "-beta.1" // This should be in SemVer format or empty, ie. "-beta.1"
// These variables must have a space after the '=' too // These variables must have a space after the '=' too
SPARKLE_VERSION_SUFFIX = -beta.2 SPARKLE_VERSION_SUFFIX =
CURRENT_PROJECT_VERSION = 2015 CURRENT_PROJECT_VERSION = 2017
MARKETING_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)$(SPARKLE_VERSION_SUFFIX) MARKETING_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)$(SPARKLE_VERSION_SUFFIX)
ALWAYS_SEARCH_USER_PATHS = NO ALWAYS_SEARCH_USER_PATHS = NO
@@ -56,7 +56,7 @@ ENABLE_STRICT_OBJC_MSGSEND = YES
GCC_SYMBOLS_PRIVATE_EXTERN = YES GCC_SYMBOLS_PRIVATE_EXTERN = YES
GCC_INLINES_ARE_PRIVATE_EXTERN = YES GCC_INLINES_ARE_PRIVATE_EXTERN = YES
ARCHS = $(ARCHS_STANDARD) ARCHS = $(ARCHS_STANDARD)
MACOSX_DEPLOYMENT_TARGET = 10.11 MACOSX_DEPLOYMENT_TARGET = 10.13
PRODUCT_NAME = ${TARGET_NAME} PRODUCT_NAME = ${TARGET_NAME}
PRODUCT_BUNDLE_IDENTIFIER = org.sparkle-project.Sparkle.${PRODUCT_NAME:rfc1034identifier} PRODUCT_BUNDLE_IDENTIFIER = org.sparkle-project.Sparkle.${PRODUCT_NAME:rfc1034identifier}
@@ -2,5 +2,5 @@
INFOPLIST_FILE = InstallerStatus/Info.plist INFOPLIST_FILE = InstallerStatus/Info.plist
WRAPPER_EXTENSION = xpc WRAPPER_EXTENSION = xpc
PRODUCT_BUNDLE_IDENTIFIER = ${INSTALLER_STATUS_NAME} PRODUCT_BUNDLE_IDENTIFIER = ${INSTALLER_STATUS_BUNDLE_ID}
PRODUCT_NAME = ${INSTALLER_STATUS_NAME} PRODUCT_NAME = ${INSTALLER_STATUS_NAME}
+8 -8
View File
@@ -19,8 +19,7 @@ The launcher then looks for the installer and agent application. If we are insid
The installer is first submitted. If it requires root privileges, it will ask for an admin user name and password. How it determines if root privileges are necessary is based on: The installer is first submitted. If it requires root privileges, it will ask for an admin user name and password. How it determines if root privileges are necessary is based on:
* If the installation type from the appcast is an interactive package based installer, then no root privileges are necessary because the package installer will ask for them. Note this type of installation is deprecated however. * If the installation type from the appcast is a guided package based installer, then root privileges are necessary because the system installer utility has to run as root.
* If the installation type from the appcast is a guided or regular package based installer, then root privileges are necessary because the system installer utility has to run as root.
* Otherwise the installation type is a normal application update, and root privileges are only needed if write permission or changing the owner is currently insufficient. * Otherwise the installation type is a normal application update, and root privileges are only needed if write permission or changing the owner is currently insufficient.
The installer makes sure, after extraction, that the expected installation type from the appcast matches the type of installation found within the archive. So this hint from the appcast is not just trusted implicitly. The installer makes sure, after extraction, that the expected installation type from the appcast matches the type of installation found within the archive. So this hint from the appcast is not just trusted implicitly.
@@ -69,28 +68,29 @@ When the installer gets the process identifier, it begins the installation. At t
### Starting the Installation ### Starting the Installation
The installer figures out what kind of installer to use (regular, guided pkg, interactive pkg) based on the type of file inside the archive. If the type of file doesn't match the expected installation type from the input installation data, then the installer aborts causing the updater to abort as well. The installer figures out what kind of installer to use (regular, guided pkg) based on the type of file inside the archive. If the type of file doesn't match the expected installation type from the input installation data, then the installer aborts causing the updater to abort as well.
Once the type of installer is found, the first stage of installation is performed: Once the type of installer is found, the first stage of installation is performed:
* Regular application installer 1st stage: Makes sure this update is not a downgrade. * Regular application installer 1st stage: Makes sure this update is not a downgrade.
* Guided Package installer 1st stage: Does nothing. * Guided Package installer 1st stage: Does nothing.
* Interactive Package installer (deprecated) 1st stage: Makes sure /usr/bin/open utility is available.
If the first stage fails, the installer aborts causing the updater to abort the update. If the first stage fails, the installer aborts causing the updater to abort the update.
Otherwise a `SPUInstallationFinishedStage1` message is sent back to the updater along with some data. This data includes whether the application bundle to relaunch is currently terminated, and whether the installation at later stages can be performed silently (that is, with no user interaction allowed). If we reach here, only the interactive package installer can't be performed silently. Otherwise a `SPUInstallationFinishedStage1` message is sent back to the updater.
The installer then listens and waits for the target application to relaunch terminates. If it is already terminated, then it resumes to stage 2 and 3 of the installation immediately on the assumption that the installer does not have permission to show UI interaction to the user. Thus if the installer has to show user interaction here and hasn't received an OK from the updater (it won't if the target application is already terminated), the install will fail. If the target is already terminated, the installer will also assume that the target should not be relaunched after installation. The installer then listens and waits for the target application to relaunch terminates. If it is already terminated, then it resumes to stage 2 and 3 of the installation immediately on the assumption that the installer does not have permission to show UI interaction to the user. Thus if the installer has to show user interaction here and hasn't received an OK from the updater (it won't if the target application is already terminated), the install will fail. If the target is already terminated, the installer will also assume that the target should not be relaunched after installation.
### Installation Waiting Period ### Installation Waiting Period
The updater receives `SPUInstallationFinishedStage1` message. The updater sends a message `SPUSentUpdateAppcastItemData` with the appcast data in case the updater may request for it later (due to installer resumability, discussed later). It also reads if the target has already been terminated (implying that the installer will continue installing the update immediately), and if the installation will be done silently. The updater receives `SPUInstallationFinishedStage1` message. The updater sends a message `SPUSentUpdateAppcastItemData` with the appcast data in case the updater may request for it later (due to installer resumability, discussed later).
The updater waits to receive a `SPUInstallerRegisteredAppcastItem` message indicating the installer registered receiving the appcast item data (it waits for this registration to avoid a race of asking for it later and not being provided with info). The updater also reads if the target has already been terminated (implying that the installer will continue installing the update immediately).
For UI based update drivers, the updater tells the user driver to show that the application is ready to be relaunched - the user can continue to install & relaunch the app. The user driver is only alerted however if the installation isn't happening immediately (that is, if the target application to relaunch is still alive). The user driver can decide whether to a) install b) install & relaunch or c) delay installation. If installation is delayed, it can be resumed later, or if the target application terminates, the installer will try to continue installation if it is capable to without user interaction. For UI based update drivers, the updater tells the user driver to show that the application is ready to be relaunched - the user can continue to install & relaunch the app. The user driver is only alerted however if the installation isn't happening immediately (that is, if the target application to relaunch is still alive). The user driver can decide whether to a) install b) install & relaunch or c) delay installation. If installation is delayed, it can be resumed later, or if the target application terminates, the installer will try to continue installation if it is capable to without user interaction.
For automatic based drivers, if the update is not going to be installed immediately and if it can be installed silently, the updater's delegate has a choice to handle the immediate installation of the update. If the delegate handles the installation, it can invoke a block that will trigger the automatic update driver to tell the installer to resume to stage 2 as detailed in step the "Continue to Installation" section - except without displaying any user interface and by relaunching the application afterwards. If the delegate handles the immediate installation, the automatic update driver will not abort, it will just leave the driver running until the installer requests for the app to be terminated later. This means the update can't be resumed later and the user driver won't be involved. For automatic based drivers, if the update is not going to be installed immediately, the updater's delegate has a choice to handle the immediate installation of the update. If the delegate handles the installation, it can invoke a block that will trigger the automatic update driver to tell the installer to resume to stage 2 as detailed in step the "Continue to Installation" section - except without displaying any user interface and by relaunching the application afterwards. If the delegate handles the immediate installation, the automatic update driver will not abort, it will just leave the driver running until the installer requests for the app to be terminated later. This means the update can't be resumed later and the user driver won't be involved.
Otherwise if the updater delegate doesn't handle immediate installation for automatic based drivers (assuming still the update is not going to be installed immediately), the update driver is aborted; the installer will still wait for the target to terminate however. If the update cannot be silently installed or if the update is marked as critical from the appcast, the update procedure is actually 'resumed' as a scheduled UI based update driver immediately. The update driver can also be 'resumed' later when the user initiates for an update manually or when a long duration (I think a week) has passed by without the user terminating the application. Note automatic based drivers are unable to do a resume, so only UI based ones can. Otherwise if the updater delegate doesn't handle immediate installation for automatic based drivers (assuming still the update is not going to be installed immediately), the update driver is aborted; the installer will still wait for the target to terminate however. If the update is marked as critical from the appcast, the update procedure is actually 'resumed' as a scheduled UI based update driver immediately. The update driver can also be 'resumed' later when the user initiates for an update manually or when a long duration (I think a week) has passed by without the user terminating the application. Note automatic based drivers are unable to do a resume, so only UI based ones can.
If an update driver is resumed (which cannot happen if the target applicaton is already terminated by the way), then the updater first requests the installer for the appcast item data that the installer received before. The updater does this by creating a temporary distinct connection for the purpose of querying for the installation status. The connection will give up if a short timeout passes. If the updater fails to retrieve resume data, it assumes that there's no update to resume and will start back from the beginning. The updater can use this data for showing release notes, etc. Note the updater and target application don't have to live in the same process, and the updater could choose to terminate and resume later as a new process - so having the installer keep the appcast item data is nice. If an update driver is resumed (which cannot happen if the target applicaton is already terminated by the way), then the updater first requests the installer for the appcast item data that the installer received before. The updater does this by creating a temporary distinct connection for the purpose of querying for the installation status. The connection will give up if a short timeout passes. If the updater fails to retrieve resume data, it assumes that there's no update to resume and will start back from the beginning. The updater can use this data for showing release notes, etc. Note the updater and target application don't have to live in the same process, and the updater could choose to terminate and resume later as a new process - so having the installer keep the appcast item data is nice.
+3 -1
View File
@@ -15,7 +15,9 @@ NS_ASSUME_NONNULL_BEGIN
@interface SUInstallerConnection : NSObject <SUInstallerConnectionProtocol> @interface SUInstallerConnection : NSObject <SUInstallerConnectionProtocol>
// Due to XPC reasons, this delegate is strongly referenced, until it's invalidated // Due to XPC reasons, this delegate is strongly referenced, until it's invalidated
- (instancetype)initWithDelegate:(id<SUInstallerCommunicationProtocol>)delegate; - (instancetype)initWithDelegate:(id<SUInstallerCommunicationProtocol>)delegate remote:(BOOL)remote;
- (instancetype)init NS_UNAVAILABLE;
@end @end
+67 -24
View File
@@ -25,21 +25,27 @@ static NSString *SUInstallerConnectionKeepAliveReason = @"Installer Connection K
@end @end
@implementation SUInstallerConnection @implementation SUInstallerConnection
{
BOOL _remote;
}
@synthesize delegate = _delegate; @synthesize delegate = _delegate;
@synthesize disabledAutomaticTermination = _disabledAutomaticTermination; @synthesize disabledAutomaticTermination = _disabledAutomaticTermination;
@synthesize invalidationBlock = _invalidationBlock; @synthesize invalidationBlock = _invalidationBlock;
@synthesize connection = _connection; @synthesize connection = _connection;
- (instancetype)initWithDelegate:(id<SUInstallerCommunicationProtocol>)delegate - (instancetype)initWithDelegate:(id<SUInstallerCommunicationProtocol>)delegate remote:(BOOL)remote
{ {
self = [super init]; self = [super init];
if (self != nil) { if (self != nil) {
_delegate = delegate; _delegate = delegate;
_remote = remote;
// If we are a XPC service, protect it from being terminated until the invalidation handler is set if (remote) {
_disabledAutomaticTermination = YES; // If we are a XPC service, protect it from being terminated until the invalidation handler is set
[[NSProcessInfo processInfo] disableAutomaticTermination:SUInstallerConnectionKeepAliveReason]; _disabledAutomaticTermination = YES;
[[NSProcessInfo processInfo] disableAutomaticTermination:SUInstallerConnectionKeepAliveReason];
}
} }
return self; return self;
} }
@@ -52,7 +58,7 @@ static NSString *SUInstallerConnectionKeepAliveReason = @"Installer Connection K
} }
} }
- (void)setInvalidationHandler:(void (^)(void))invalidationHandler - (void)_setInvalidationHandler:(void (^)(void))invalidationHandler
{ {
self.invalidationBlock = invalidationHandler; self.invalidationBlock = invalidationHandler;
@@ -60,7 +66,18 @@ static NSString *SUInstallerConnectionKeepAliveReason = @"Installer Connection K
[self enableAutomaticTermination]; [self enableAutomaticTermination];
} }
- (void)setServiceName:(NSString *)serviceName systemDomain:(BOOL)systemDomain - (void)setInvalidationHandler:(void (^)(void))invalidationHandler
{
if (_remote) {
dispatch_async(dispatch_get_main_queue(), ^{
[self _setInvalidationHandler:invalidationHandler];
});
} else {
[self _setInvalidationHandler:invalidationHandler];
}
}
- (void)_setServiceName:(NSString *)serviceName systemDomain:(BOOL)systemDomain
{ {
NSXPCConnectionOptions options = systemDomain ? NSXPCConnectionPrivileged : 0; NSXPCConnectionOptions options = systemDomain ? NSXPCConnectionPrivileged : 0;
NSXPCConnection *connection = [[NSXPCConnection alloc] initWithMachServiceName:serviceName options:options]; NSXPCConnection *connection = [[NSXPCConnection alloc] initWithMachServiceName:serviceName options:options];
@@ -74,41 +91,67 @@ static NSString *SUInstallerConnectionKeepAliveReason = @"Installer Connection K
__weak SUInstallerConnection *weakSelf = self; __weak SUInstallerConnection *weakSelf = self;
self.connection.interruptionHandler = ^{ self.connection.interruptionHandler = ^{
[weakSelf.connection invalidate]; dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf.connection invalidate];
});
}; };
self.connection.invalidationHandler = ^{ self.connection.invalidationHandler = ^{
SUInstallerConnection *strongSelf = weakSelf; dispatch_async(dispatch_get_main_queue(), ^{
if (strongSelf != nil) { SUInstallerConnection *strongSelf = weakSelf;
strongSelf.connection = nil; if (strongSelf != nil) {
[strongSelf invalidate]; strongSelf.connection = nil;
} [strongSelf _invalidate];
}
});
}; };
[self.connection resume]; [self.connection resume];
} }
- (void)handleMessageWithIdentifier:(int32_t)identifier data:(NSData *)data - (void)setServiceName:(NSString *)serviceName systemDomain:(BOOL)systemDomain
{ {
[(id<SUInstallerCommunicationProtocol>)self.connection.remoteObjectProxy handleMessageWithIdentifier:identifier data:data]; if (_remote) {
dispatch_async(dispatch_get_main_queue(), ^{
[self _setServiceName:serviceName systemDomain:systemDomain];
});
} else {
[self _setServiceName:serviceName systemDomain:systemDomain];
}
} }
// This method can be called by us or from a remote - (void)handleMessageWithIdentifier:(int32_t)identifier data:(NSData *)data
{
if (_remote) {
dispatch_async(dispatch_get_main_queue(), ^{
[(id<SUInstallerCommunicationProtocol>)self.connection.remoteObjectProxy handleMessageWithIdentifier:identifier data:data];
});
} else {
[(id<SUInstallerCommunicationProtocol>)self.connection.remoteObjectProxy handleMessageWithIdentifier:identifier data:data];
}
}
- (void)_invalidate
{
if (self.invalidationBlock != nil) {
self.invalidationBlock();
self.invalidationBlock = nil;
}
// Break the retain cycle
self.delegate = nil;
[self enableAutomaticTermination];
}
// This method can be called from us or a remote
- (void)invalidate - (void)invalidate
{ {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[self.connection invalidate]; [self.connection invalidate];
self.connection = nil; self.connection = nil;
if (self.invalidationBlock != nil) { [self _invalidate];
self.invalidationBlock();
self.invalidationBlock = nil;
}
// Break the retain cycle
self.delegate = nil;
[self enableAutomaticTermination];
}); });
} }
+1 -1
View File
@@ -26,7 +26,7 @@
newConnection.exportedInterface = [NSXPCInterface interfaceWithProtocol:@protocol(SUInstallerConnectionProtocol)]; newConnection.exportedInterface = [NSXPCInterface interfaceWithProtocol:@protocol(SUInstallerConnectionProtocol)];
newConnection.remoteObjectInterface = [NSXPCInterface interfaceWithProtocol:@protocol(SUInstallerCommunicationProtocol)]; newConnection.remoteObjectInterface = [NSXPCInterface interfaceWithProtocol:@protocol(SUInstallerCommunicationProtocol)];
SUInstallerConnection *exportedObject = [[SUInstallerConnection alloc] initWithDelegate:newConnection.remoteObjectProxy]; SUInstallerConnection *exportedObject = [[SUInstallerConnection alloc] initWithDelegate:newConnection.remoteObjectProxy remote:YES];
newConnection.exportedObject = exportedObject; newConnection.exportedObject = exportedObject;
-3
View File
@@ -375,14 +375,11 @@ static BOOL SPUUsesSystemDomainForBundlePath(NSString *path, NSString *installat
if (!rootUser) { if (!rootUser) {
if ([installationType isEqualToString:SPUInstallationTypeGuidedPackage]) { if ([installationType isEqualToString:SPUInstallationTypeGuidedPackage]) {
return YES; return YES;
} else if ([installationType isEqualToString:SPUInstallationTypeInteractivePackage]) {
return NO;
} else { } else {
return SPUSystemNeedsAuthorizationAccessForBundlePath(path); return SPUSystemNeedsAuthorizationAccessForBundlePath(path);
} }
} else { } else {
// If we are the root user we use the system domain even if we don't need escalated authorization. // If we are the root user we use the system domain even if we don't need escalated authorization.
// Note interactive package installations are not supported as root.
return YES; return YES;
} }
} }
+4
View File
@@ -12,4 +12,8 @@
// This object implements the protocol which we have defined. It provides the actual behavior for the service. It is 'exported' by the service to make it available to the process hosting the service over an NSXPCConnection. // This object implements the protocol which we have defined. It provides the actual behavior for the service. It is 'exported' by the service to make it available to the process hosting the service over an NSXPCConnection.
@interface SUInstallerStatus : NSObject <SUInstallerStatusProtocol> @interface SUInstallerStatus : NSObject <SUInstallerStatusProtocol>
- (instancetype)initWithRemote:(BOOL)remote;
- (instancetype)init NS_UNAVAILABLE;
@end @end
+66 -16
View File
@@ -19,16 +19,34 @@
@end @end
@implementation SUInstallerStatus @implementation SUInstallerStatus
{
BOOL _remote;
}
@synthesize invalidationBlock = _invalidationBlock; @synthesize invalidationBlock = _invalidationBlock;
@synthesize connection = _connection; @synthesize connection = _connection;
- (void)setInvalidationHandler:(void (^)(void))invalidationHandler - (instancetype)initWithRemote:(BOOL)remote
{ {
self.invalidationBlock = invalidationHandler; self = [super init];
if (self != nil) {
_remote = remote;
}
return self;
} }
- (void)setServiceName:(NSString *)serviceName - (void)setInvalidationHandler:(void (^)(void))invalidationHandler
{
if (_remote) {
dispatch_async(dispatch_get_main_queue(), ^{
self.invalidationBlock = invalidationHandler;
});
} else {
self.invalidationBlock = invalidationHandler;
}
}
- (void)_setServiceName:(NSString *)serviceName
{ {
NSXPCConnection *connection = [[NSXPCConnection alloc] initWithMachServiceName:serviceName options:(NSXPCConnectionOptions)0]; NSXPCConnection *connection = [[NSXPCConnection alloc] initWithMachServiceName:serviceName options:(NSXPCConnectionOptions)0];
@@ -38,41 +56,73 @@
__weak SUInstallerStatus *weakSelf = self; __weak SUInstallerStatus *weakSelf = self;
self.connection.interruptionHandler = ^{ self.connection.interruptionHandler = ^{
[weakSelf.connection invalidate]; dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf.connection invalidate];
});
}; };
self.connection.invalidationHandler = ^{ self.connection.invalidationHandler = ^{
SUInstallerStatus *strongSelf = weakSelf; dispatch_async(dispatch_get_main_queue(), ^{
if (strongSelf != nil) { SUInstallerStatus *strongSelf = weakSelf;
strongSelf.connection = nil; if (strongSelf != nil) {
[strongSelf invalidate]; strongSelf.connection = nil;
} [strongSelf _invokeInvalidationBlock];
}
});
}; };
[self.connection resume]; [self.connection resume];
} }
- (void)setServiceName:(NSString *)serviceName
{
if (_remote) {
dispatch_async(dispatch_get_main_queue(), ^{
[self _setServiceName:serviceName];
});
} else {
[self _setServiceName:serviceName];
}
}
- (void)probeStatusInfoWithReply:(void (^)(NSData * _Nullable installationInfoData))reply - (void)probeStatusInfoWithReply:(void (^)(NSData * _Nullable installationInfoData))reply
{ {
[(id<SUStatusInfoProtocol>)self.connection.remoteObjectProxy probeStatusInfoWithReply:reply]; if (_remote) {
dispatch_async(dispatch_get_main_queue(), ^{
[(id<SUStatusInfoProtocol>)self.connection.remoteObjectProxy probeStatusInfoWithReply:reply];
});
} else {
[(id<SUStatusInfoProtocol>)self.connection.remoteObjectProxy probeStatusInfoWithReply:reply];
}
} }
- (void)probeStatusConnectivityWithReply:(void (^)(void))reply - (void)probeStatusConnectivityWithReply:(void (^)(void))reply
{ {
[(id<SUStatusInfoProtocol>)self.connection.remoteObjectProxy probeStatusConnectivityWithReply:reply]; if (_remote) {
dispatch_async(dispatch_get_main_queue(), ^{
[(id<SUStatusInfoProtocol>)self.connection.remoteObjectProxy probeStatusConnectivityWithReply:reply];
});
} else {
[(id<SUStatusInfoProtocol>)self.connection.remoteObjectProxy probeStatusConnectivityWithReply:reply];
}
} }
// This method can be called by us or from a remote - (void)_invokeInvalidationBlock
{
if (self.invalidationBlock != nil) {
self.invalidationBlock();
self.invalidationBlock = nil;
}
}
// This method can be called from us or a remote
- (void)invalidate - (void)invalidate
{ {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[self.connection invalidate]; [self.connection invalidate];
self.connection = nil; self.connection = nil;
if (self.invalidationBlock != nil) { [self _invokeInvalidationBlock];
self.invalidationBlock();
self.invalidationBlock = nil;
}
}); });
} }
+1 -1
View File
@@ -25,7 +25,7 @@
newConnection.exportedInterface = [NSXPCInterface interfaceWithProtocol:@protocol(SUInstallerStatusProtocol)]; newConnection.exportedInterface = [NSXPCInterface interfaceWithProtocol:@protocol(SUInstallerStatusProtocol)];
// Next, set the object that the connection exports. All messages sent on the connection to this service will be sent to the exported object to handle. The connection retains the exported object. // Next, set the object that the connection exports. All messages sent on the connection to this service will be sent to the exported object to handle. The connection retains the exported object.
SUInstallerStatus *exportedObject = [SUInstallerStatus new]; SUInstallerStatus *exportedObject = [[SUInstallerStatus alloc] initWithRemote:YES];
newConnection.exportedObject = exportedObject; newConnection.exportedObject = exportedObject;
// Resuming the connection allows the system to deliver more incoming messages. // Resuming the connection allows the system to deliver more incoming messages.
+3 -3
View File
@@ -2,10 +2,10 @@
import PackageDescription import PackageDescription
// Version is technically not required here, SPM doesn't check // Version is technically not required here, SPM doesn't check
let version = "2.2.0-beta.2" let version = "2.2.1"
// Tag is required to point towards the right asset. SPM requires the tag to follow semantic versioning to be able to resolve it. // Tag is required to point towards the right asset. SPM requires the tag to follow semantic versioning to be able to resolve it.
let tag = "2.2.0-beta.2" let tag = "2.2.1"
let checksum = "8020ba7dfcc764e6e25b93d1b1906aadbe2c0d8a0a7e8c0e3205da80d575da7a" let checksum = "ce1e73dccebfd06c638ea9fc37451a690ea3137e1333406ec5dddb9e11b4e1b5"
let url = "https://github.com/sparkle-project/Sparkle/releases/download/\(tag)/Sparkle-for-Swift-Package-Manager.zip" let url = "https://github.com/sparkle-project/Sparkle/releases/download/\(tag)/Sparkle-for-Swift-Package-Manager.zip"
let package = Package( let package = Package(
+1 -1
View File
@@ -29,7 +29,7 @@ Please visit [Sparkle's website](http://sparkle-project.org) for up to date docu
## Requirements ## Requirements
* Runtime: macOS 10.11 or greater * Runtime: macOS 10.13 or greater for 2.3, macOS 10.11 or greater for 2.2.x
* Build: Latest major Xcode (stable or beta, whichever is latest) and one major version less. * Build: Latest major Xcode (stable or beta, whichever is latest) and one major version less.
* HTTPS server for serving updates (see [App Transport Security](http://sparkle-project.org/documentation/app-transport-security/)) * HTTPS server for serving updates (see [App Transport Security](http://sparkle-project.org/documentation/app-transport-security/))
+1
View File
@@ -1,5 +1,6 @@
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
html { html {
color-scheme: dark;
color: white; color: white;
background: transparent; background: transparent;
} }
-314
View File
@@ -1,314 +0,0 @@
<?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>ADP2,1</key>
<string>Developer Transition Kit</string>
<key>iMac1,1</key>
<string>iMac G3 (Rev A-D)</string>
<key>iMac4,1</key>
<string>iMac (Core Duo)</string>
<key>iMac4,2</key>
<string>iMac for Education (17 inch, Core Duo)</string>
<key>iMac5,1</key>
<string>iMac (Core 2 Duo, 17 or 20 inch, SuperDrive)</string>
<key>iMac5,2</key>
<string>iMac (Core 2 Duo, 17 inch, Combo Drive)</string>
<key>iMac6,1</key>
<string>iMac (Core 2 Duo, 24 inch, SuperDrive)</string>
<key>iMac7,1</key>
<string>iMac Intel Core 2 Duo (aluminum enclosure)</string>
<key>iMac8,1</key>
<string>iMac (Core 2 Duo, 20 or 24 inch, Early 2008 )</string>
<key>iMac9,1</key>
<string>iMac (Core 2 Duo, 20 or 24 inch, Early or Mid 2009 )</string>
<key>iMac10,1</key>
<string>iMac (Core 2 Duo, 21.5 or 27 inch, Late 2009 )</string>
<key>iMac11,1</key>
<string>iMac (Core i5 or i7, 27 inch Late 2009)</string>
<key>iMac11,2</key>
<string>21.5&quot; iMac (mid 2010)</string>
<key>iMac11,3</key>
<string>iMac (Core i5 or i7, 27 inch Mid 2010)</string>
<key>iMac12,1</key>
<string>iMac (Core i3 or i5 or i7, 21.5 inch Mid 2010 or Late 2011)</string>
<key>iMac12,2</key>
<string>iMac (Core i5 or i7, 27 inch Mid 2011)</string>
<key>iMac13,1</key>
<string>iMac (Core i3 or i5 or i7, 21.5 inch Late 2012 or Early 2013)</string>
<key>iMac13,2</key>
<string>iMac (Core i5 or i7, 27 inch Late 2012)</string>
<key>iMac14,1</key>
<string>iMac (Core i5, 21.5 inch Late 2013)</string>
<key>iMac14,2</key>
<string>iMac (Core i5 or i7, 27 inch Late 2013)</string>
<key>iMac14,3</key>
<string>iMac (Core i5 or i7, 21.5 inch Late 2013)</string>
<key>iMac14,4</key>
<string>iMac (Core i5, 21.5 inch Mid 2014)</string>
<key>iMac15,1</key>
<string>iMac (Retina 5K Core i5 or i7, 27 inch Late 2014 or Mid 2015)</string>
<key>iMac16,1</key>
<string>iMac (Core i5, 21,5 inch Late 2015)</string>
<key>iMac16,2</key>
<string>iMac (Retina 4K Core i5 or i7, 21.5 inch Late 2015)</string>
<key>iMac17,1</key>
<string>iMac (Retina 5K Core i5 or i7, 27 inch Late 2015)</string>
<key>MacBook1,1</key>
<string>MacBook (Core Duo)</string>
<key>MacBook2,1</key>
<string>MacBook (Core 2 Duo)</string>
<key>MacBook4,1</key>
<string>MacBook (Core 2 Duo Feb 2008)</string>
<key>MacBook5,1</key>
<string>MacBook (Core 2 Duo, Late 2008, Unibody)</string>
<key>MacBook5,2</key>
<string>MacBook (Core 2 Duo, Early 2009, White)</string>
<key>MacBook6,1</key>
<string>MacBook (Core 2 Duo, Late 2009, Unibody)</string>
<key>MacBook7,1</key>
<string>MacBook (Core 2 Duo, Mid 2010, White)</string>
<key>MacBook8,1</key>
<string>MacBook (Core M, 12 inch, Early 2015)</string>
<key>MacBookAir1,1</key>
<string>MacBook Air (Core 2 Duo, 13 inch, Early 2008)</string>
<key>MacBookAir2,1</key>
<string>MacBook Air (Core 2 Duo, 13 inch, Mid 2009)</string>
<key>MacBookAir3,1</key>
<string>MacBook Air (Core 2 Duo, 11 inch, Late 2010)</string>
<key>MacBookAir3,2</key>
<string>MacBook Air (Core 2 Duo, 13 inch, Late 2010)</string>
<key>MacBookAir4,1</key>
<string>MacBook Air (Core i5 or i7, 11 inch, Mid 2011)</string>
<key>MacBookAir4,2</key>
<string>MacBook Air (Core i5 or i7, 13 inch, Mid 2011)</string>
<key>MacBookAir5,1</key>
<string>MacBook Air (Core i5 or i7, 11 inch, Mid 2012)</string>
<key>MacBookAir5,2</key>
<string>MacBook Air (Core i5 or i7, 13 inch, Mid 2012)</string>
<key>MacBookAir6,1</key>
<string>MacBook Air (Core i5 or i7, 11 inch, Mid 2013 or Early 2014)</string>
<key>MacBookAir6,2</key>
<string>MacBook Air (Core i5 or i7, 13 inch, Mid 2013 or Early 2014)</string>
<key>MacBookAir7,1</key>
<string>MacBook Air (Core i5 or i7, 11 inch, Early 2015)</string>
<key>MacBookAir7,2</key>
<string>MacBook Air (Core i5 or i7, 13 inch, Early 2015)</string>
<key>MacBookPro1,1</key>
<string>MacBook Pro Core Duo (15-inch)</string>
<key>MacBookPro1,2</key>
<string>MacBook Pro Core Duo (17-inch)</string>
<key>MacBookPro2,1</key>
<string>MacBook Pro Core 2 Duo (17-inch)</string>
<key>MacBookPro2,2</key>
<string>MacBook Pro Core 2 Duo (15-inch)</string>
<key>MacBookPro3,1</key>
<string>MacBook Pro Core 2 Duo (15-inch LED, Core 2 Duo)</string>
<key>MacBookPro3,2</key>
<string>MacBook Pro Core 2 Duo (17-inch HD, Core 2 Duo)</string>
<key>MacBookPro4,1</key>
<string>MacBook Pro (Core 2 Duo Feb 2008)</string>
<key>MacBookPro5,1</key>
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
<key>MacBookPro5,2</key>
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
<key>MacBookPro5,3</key>
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
<key>MacBookPro5,4</key>
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
<key>MacBookPro5,5</key>
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
<key>MacBookPro6,1</key>
<string>MacBook Pro Intel Core i5, Intel Core i7 (mid 2010)</string>
<key>MacBookPro6,2</key>
<string>MacBook Pro Intel Core i5, Intel Core i7 (mid 2010)</string>
<key>MacBookPro7,1</key>
<string>MacBook Pro Intel Core 2 Duo (mid 2010)</string>
<key>MacBookPro8,1</key>
<string>MacBook Pro Intel Core i5, Intel Core i7, 13&quot; (early 2011)</string>
<key>MacBookPro8,2</key>
<string>MacBook Pro Intel Core i7, 15&quot; (early 2011)</string>
<key>MacBookPro8,3</key>
<string>MacBook Pro Intel Core i7, 17&quot; (early 2011)</string>
<key>MacBookPro9,1</key>
<string>MacBook Pro (15-inch, Mid 2012)</string>
<key>MacBookPro9,2</key>
<string>MacBook Pro (13-inch, Mid 2012)</string>
<key>MacBookPro10,1</key>
<string>MacBook Pro (Retina, Mid 2012)</string>
<key>MacBookPro10,2</key>
<string>MacBook Pro (Retina, 13-inch, Late 2012)</string>
<key>MacBookPro11,1</key>
<string>MacBook Pro (Retina, 13-inch, Late 2013)</string>
<key>MacBookPro11,2</key>
<string>MacBook Pro (Retina, 15-inch, Late 2013)</string>
<key>MacBookPro11,3</key>
<string>MacBook Pro (Retina, 15-inch, Late 2013)</string>
<key>MacbookPro11,4</key>
<string>MacBook Pro (Retina, 15-inch, Mid 2015)</string>
<key>MacbookPro11,5</key>
<string>MacBook Pro (Retina, 15-inch, Mid 2015)</string>
<key>MacbookPro12,1 </key>
<string>MacBook Pro (Retina, 13-inch, Early 2015)</string>
<key>Macmini1,1</key>
<string>Mac Mini (Core Solo/Duo)</string>
<key>Macmini2,1</key>
<string>Mac mini Intel Core</string>
<key>Macmini3,1</key>
<string>Mac mini Intel Core</string>
<key>Macmini4,1</key>
<string>Mac mini Intel Core (Mid 2010)</string>
<key>Macmini5,1</key>
<string>Mac mini (Core i5, Mid 2011)</string>
<key>Macmini5,2</key>
<string>Mac mini (Core i5 or Core i7, Mid 2011)</string>
<key>Macmini5,3</key>
<string>Mac mini (Core i7, Server, Mid 2011)</string>
<key>Macmini6,1</key>
<string>Mac mini (Core i5, Late 2012)</string>
<key>Macmini6,2</key>
<string>Mac mini (Core i7, Normal or Server, Late 2012)</string>
<key>Macmini7,1</key>
<string>Mac mini (Core i5 or Core i7, Late 2014)</string>
<key>MacPro1,1,Quad</key>
<string>Mac Pro</string>
<key>MacPro1,1</key>
<string>Mac Pro (four-core)</string>
<key>MacPro2,1</key>
<string>Mac Pro (eight-core)</string>
<key>MacPro3,1</key>
<string>Mac Pro (January 2008 4- or 8- core &quot;Harpertown&quot;)</string>
<key>MacPro4,1</key>
<string>Mac Pro (March 2009)</string>
<key>MacPro5,1</key>
<string>Mac Pro (2010 or 2012)</string>
<key>MacPro6,1</key>
<string>Mac Pro (Late 2013)</string>
<key>PowerBook1,1</key>
<string>PowerBook G3</string>
<key>PowerBook2,1</key>
<string>iBook G3</string>
<key>PowerBook2,2</key>
<string>iBook G3 (FireWire)</string>
<key>PowerBook2,3</key>
<string>iBook G3</string>
<key>PowerBook2,4</key>
<string>iBook G3</string>
<key>PowerBook3,1</key>
<string>PowerBook G3 (FireWire)</string>
<key>PowerBook3,2</key>
<string>PowerBook G4</string>
<key>PowerBook3,3</key>
<string>PowerBook G4 (Gigabit Ethernet)</string>
<key>PowerBook3,4</key>
<string>PowerBook G4 (DVI)</string>
<key>PowerBook3,5</key>
<string>PowerBook G4 (1GHz / 867MHz)</string>
<key>PowerBook4,1</key>
<string>iBook G3 (Dual USB, Late 2001)</string>
<key>PowerBook4,2</key>
<string>iBook G3 (16MB VRAM)</string>
<key>PowerBook4,3</key>
<string>iBook G3 Opaque 16MB VRAM, 32MB VRAM, Early 2003)</string>
<key>PowerBook5,1</key>
<string>PowerBook G4 (17 inch)</string>
<key>PowerBook5,2</key>
<string>PowerBook G4 (15 inch FW 800)</string>
<key>PowerBook5,3</key>
<string>PowerBook G4 (17-inch 1.33GHz)</string>
<key>PowerBook5,4</key>
<string>PowerBook G4 (15 inch 1.5/1.33GHz)</string>
<key>PowerBook5,5</key>
<string>PowerBook G4 (17-inch 1.5GHz)</string>
<key>PowerBook5,6</key>
<string>PowerBook G4 (15 inch 1.67GHz/1.5GHz)</string>
<key>PowerBook5,7</key>
<string>PowerBook G4 (17-inch 1.67GHz)</string>
<key>PowerBook5,8</key>
<string>PowerBook G4 (Double layer SD, 15 inch)</string>
<key>PowerBook5,9</key>
<string>PowerBook G4 (Double layer SD, 17 inch)</string>
<key>PowerBook6,1</key>
<string>PowerBook G4 (12 inch)</string>
<key>PowerBook6,2</key>
<string>PowerBook G4 (12 inch, DVI)</string>
<key>PowerBook6,3</key>
<string>iBook G4</string>
<key>PowerBook6,4</key>
<string>PowerBook G4 (12 inch 1.33GHz)</string>
<key>PowerBook6,5</key>
<string>iBook G4 (Early-Late 2004)</string>
<key>PowerBook6,7</key>
<string>iBook G4 (Mid 2005)</string>
<key>PowerBook6,8</key>
<string>PowerBook G4 (12 inch 1.5GHz)</string>
<key>PowerMac1,1</key>
<string>Power Macintosh G3 (Blue &amp; White)</string>
<key>PowerMac1,2</key>
<string>Power Macintosh G4 (PCI Graphics)</string>
<key>PowerMac2,1</key>
<string>iMac G3 (Slot-loading CD-ROM)</string>
<key>PowerMac2,2</key>
<string>iMac G3 (Summer 2000)</string>
<key>PowerMac3,1</key>
<string>Power Macintosh G4 (AGP Graphics)</string>
<key>PowerMac3,2</key>
<string>Power Macintosh G4 (AGP Graphics)</string>
<key>PowerMac3,3</key>
<string>Power Macintosh G4 (Gigabit Ethernet)</string>
<key>PowerMac3,4</key>
<string>Power Macintosh G4 (Digital Audio)</string>
<key>PowerMac3,5</key>
<string>Power Macintosh G4 (Quick Silver)</string>
<key>PowerMac3,6</key>
<string>Power Macintosh G4 (Mirrored Drive Door)</string>
<key>PowerMac4,1</key>
<string>iMac G3 (Early/Summer 2001)</string>
<key>PowerMac4,2</key>
<string>iMac G4 (Flat Panel)</string>
<key>PowerMac4,4</key>
<string>eMac</string>
<key>PowerMac4,5</key>
<string>iMac G4 (17-inch Flat Panel)</string>
<key>PowerMac5,1</key>
<string>Power Macintosh G4 Cube</string>
<key>PowerMac5,2</key>
<string>Power Mac G4 Cube</string>
<key>PowerMac6,1</key>
<string>iMac G4 (USB 2.0)</string>
<key>PowerMac6,3</key>
<string>iMac G4 (20-inch Flat Panel)</string>
<key>PowerMac6,4</key>
<string>eMac (USB 2.0, 2005)</string>
<key>PowerMac7,2</key>
<string>Power Macintosh G5</string>
<key>PowerMac7,3</key>
<string>Power Macintosh G5</string>
<key>PowerMac8,1</key>
<string>iMac G5</string>
<key>PowerMac8,2</key>
<string>iMac G5 (Ambient Light Sensor)</string>
<key>PowerMac9,1</key>
<string>Power Macintosh G5 (Late 2005)</string>
<key>PowerMac10,1</key>
<string>Mac Mini G4</string>
<key>PowerMac10,2</key>
<string>Mac Mini (Late 2005)</string>
<key>PowerMac11,2</key>
<string>Power Macintosh G5 (Late 2005)</string>
<key>PowerMac12,1</key>
<string>iMac G5 (iSight)</string>
<key>RackMac1,1</key>
<string>Xserve G4</string>
<key>RackMac1,2</key>
<string>Xserve G4 (slot-loading, cluster node)</string>
<key>RackMac3,1</key>
<string>Xserve G5</string>
<key>Xserve1,1</key>
<string>Xserve (Intel Xeon)</string>
<key>Xserve2,1</key>
<string>Xserve (January 2008 quad-core)</string>
<key>Xserve3,1</key>
<string>Xserve (early 2009)</string>
</dict>
</plist>
+3 -3
View File
@@ -16,7 +16,7 @@
</sparkle:fullReleaseNotesLink> </sparkle:fullReleaseNotesLink>
<pubDate>Wed, 09 Jan 2006 19:20:11 +0000</pubDate> <pubDate>Wed, 09 Jan 2006 19:20:11 +0000</pubDate>
<enclosure url="https://you.com/app/Your%20Great%20App%202.0.zip" length="1623481" type="application/octet-stream" sparkle:edSignature="WVyVJpOx+a5+vNWJVY79TRjFKveNk+VhGJf2iti4CZtJsJewIUGvh/1AKKEAFbH1qUwx+vro1ECuzOsMmumoBA==" /> <enclosure url="https://you.com/app/Your%20Great%20App%202.0.zip" length="1623481" type="application/octet-stream" sparkle:edSignature="WVyVJpOx+a5+vNWJVY79TRjFKveNk+VhGJf2iti4CZtJsJewIUGvh/1AKKEAFbH1qUwx+vro1ECuzOsMmumoBA==" />
<sparkle:minimumSystemVersion>10.11</sparkle:minimumSystemVersion> <sparkle:minimumSystemVersion>10.13</sparkle:minimumSystemVersion>
</item> </item>
<item> <item>
@@ -31,7 +31,7 @@
</sparkle:fullReleaseNotesLink> </sparkle:fullReleaseNotesLink>
<pubDate>Wed, 01 Jan 2006 12:20:11 +0000</pubDate> <pubDate>Wed, 01 Jan 2006 12:20:11 +0000</pubDate>
<enclosure url="https://you.com/app/Your%20Great%20App%201.5.zip" length="1472893" type="application/octet-stream" sparkle:edSignature="pNFd7KbcQSu+Mq7UYrbQXTPq82luht2ACXm/r2utp1u/Uv/5hWqctdT2jwQgMejW7DRoeV/hVr6J4VdZYdwWDw==" /> <enclosure url="https://you.com/app/Your%20Great%20App%201.5.zip" length="1472893" type="application/octet-stream" sparkle:edSignature="pNFd7KbcQSu+Mq7UYrbQXTPq82luht2ACXm/r2utp1u/Uv/5hWqctdT2jwQgMejW7DRoeV/hVr6J4VdZYdwWDw==" />
<sparkle:minimumSystemVersion>10.11</sparkle:minimumSystemVersion> <sparkle:minimumSystemVersion>10.13</sparkle:minimumSystemVersion>
</item> </item>
<!-- Now here's an example of a version with a weird internal version number (like an SVN revision) but a human-readable external one. --> <!-- Now here's an example of a version with a weird internal version number (like an SVN revision) but a human-readable external one. -->
@@ -48,7 +48,7 @@
<sparkle:shortVersionString>1.4</sparkle:shortVersionString> <sparkle:shortVersionString>1.4</sparkle:shortVersionString>
<pubDate>Wed, 25 Dec 2005 12:20:11 +0000</pubDate> <pubDate>Wed, 25 Dec 2005 12:20:11 +0000</pubDate>
<enclosure url="https://you.com/app/Your%20Great%20App%201.4.zip" sparkle:edSignature="Ody3D/ybSMH4T+P/oNj3LN4F0SA8RJGLEr1TI4UemrBAiJ9aEcDnYV3u58P75AbcFjI13jPYmHDUHXMSTFQbDw==" length="1472349" type="application/octet-stream" /> <enclosure url="https://you.com/app/Your%20Great%20App%201.4.zip" sparkle:edSignature="Ody3D/ybSMH4T+P/oNj3LN4F0SA8RJGLEr1TI4UemrBAiJ9aEcDnYV3u58P75AbcFjI13jPYmHDUHXMSTFQbDw==" length="1472349" type="application/octet-stream" />
<sparkle:minimumSystemVersion>10.11</sparkle:minimumSystemVersion> <sparkle:minimumSystemVersion>10.13</sparkle:minimumSystemVersion>
</item> </item>
</channel> </channel>
</rss> </rss>
+2 -2
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = "Sparkle" s.name = "Sparkle"
s.version = "2.2.0-beta.2" s.version = "2.2.1"
s.summary = "A software update framework for macOS" s.summary = "A software update framework for macOS"
s.description = "Sparkle is an easy-to-use software update framework for macOS." s.description = "Sparkle is an easy-to-use software update framework for macOS."
s.homepage = "https://sparkle-project.org" s.homepage = "https://sparkle-project.org"
@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
'Andy Matuschak' => 'andy@andymatuschak.org', 'Andy Matuschak' => 'andy@andymatuschak.org',
} }
s.platform = :osx, '10.11' s.platform = :osx, '10.13'
s.source = { :http => "https://github.com/sparkle-project/Sparkle/releases/download/#{s.version}/Sparkle-#{s.version}.tar.xz" } s.source = { :http => "https://github.com/sparkle-project/Sparkle/releases/download/#{s.version}/Sparkle-#{s.version}.tar.xz" }
s.source_files = 'Sparkle.framework/Versions/B/Headers/*.h' s.source_files = 'Sparkle.framework/Versions/B/Headers/*.h'
+95 -12
View File
@@ -85,7 +85,6 @@
61299A6009CA6EB100B7442F /* SUConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 61299A5F09CA6EB100B7442F /* SUConstants.m */; }; 61299A6009CA6EB100B7442F /* SUConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 61299A5F09CA6EB100B7442F /* SUConstants.m */; };
61299B3609CB04E000B7442F /* Sparkle.h in Headers */ = {isa = PBXBuildFile; fileRef = 61299B3509CB04E000B7442F /* Sparkle.h */; settings = {ATTRIBUTES = (Public, ); }; }; 61299B3609CB04E000B7442F /* Sparkle.h in Headers */ = {isa = PBXBuildFile; fileRef = 61299B3509CB04E000B7442F /* Sparkle.h */; settings = {ATTRIBUTES = (Public, ); }; };
612DCBB00D488BC60015DBEA /* SUUpdatePermissionPrompt.m in Sources */ = {isa = PBXBuildFile; fileRef = 612DCBAE0D488BC60015DBEA /* SUUpdatePermissionPrompt.m */; }; 612DCBB00D488BC60015DBEA /* SUUpdatePermissionPrompt.m in Sources */ = {isa = PBXBuildFile; fileRef = 612DCBAE0D488BC60015DBEA /* SUUpdatePermissionPrompt.m */; };
615AE3D00D64DC40001CA7BD /* SUModelTranslation.plist in Resources */ = {isa = PBXBuildFile; fileRef = 615AE3CF0D64DC40001CA7BD /* SUModelTranslation.plist */; };
6196CFF909C72148000DC222 /* SUStatusController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6196CFE309C71ADE000DC222 /* SUStatusController.h */; settings = {ATTRIBUTES = (); }; }; 6196CFF909C72148000DC222 /* SUStatusController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6196CFE309C71ADE000DC222 /* SUStatusController.h */; settings = {ATTRIBUTES = (); }; };
6196CFFA09C72149000DC222 /* SUStatusController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6196CFE409C71ADE000DC222 /* SUStatusController.m */; }; 6196CFFA09C72149000DC222 /* SUStatusController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6196CFE409C71ADE000DC222 /* SUStatusController.m */; };
61A2259E0D1C495D00430CCD /* SUVersionComparisonProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 61A2259C0D1C495D00430CCD /* SUVersionComparisonProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; 61A2259E0D1C495D00430CCD /* SUVersionComparisonProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 61A2259C0D1C495D00430CCD /* SUVersionComparisonProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -171,6 +170,7 @@
7229E1BA1C97CC4D00CB50D0 /* SPUScheduledUpdateDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 7229E1B81C97CC4D00CB50D0 /* SPUScheduledUpdateDriver.m */; }; 7229E1BA1C97CC4D00CB50D0 /* SPUScheduledUpdateDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 7229E1B81C97CC4D00CB50D0 /* SPUScheduledUpdateDriver.m */; };
7229E1BD1C98EFF200CB50D0 /* SPUDownloadDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 7229E1BB1C98EFF200CB50D0 /* SPUDownloadDriver.h */; }; 7229E1BD1C98EFF200CB50D0 /* SPUDownloadDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 7229E1BB1C98EFF200CB50D0 /* SPUDownloadDriver.h */; };
7229E1BE1C98EFF200CB50D0 /* SPUDownloadDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 7229E1BC1C98EFF200CB50D0 /* SPUDownloadDriver.m */; }; 7229E1BE1C98EFF200CB50D0 /* SPUDownloadDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 7229E1BC1C98EFF200CB50D0 /* SPUDownloadDriver.m */; };
722C9539286EA68C0033908A /* SPUGentleUserDriverReminders.h in Headers */ = {isa = PBXBuildFile; fileRef = 722C9538286EA54A0033908A /* SPUGentleUserDriverReminders.h */; settings = {ATTRIBUTES = (Private, ); }; };
722FB7E5260EE53F00EB571C /* SUNormalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 722FB7E4260EE53F00EB571C /* SUNormalization.m */; }; 722FB7E5260EE53F00EB571C /* SUNormalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 722FB7E4260EE53F00EB571C /* SUNormalization.m */; };
722FB7E6260EE53F00EB571C /* SUNormalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 722FB7E4260EE53F00EB571C /* SUNormalization.m */; }; 722FB7E6260EE53F00EB571C /* SUNormalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 722FB7E4260EE53F00EB571C /* SUNormalization.m */; };
72316BD31E0DA8430039EFD9 /* SUUnarchiverNotifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 72316BD21E0DA8430039EFD9 /* SUUnarchiverNotifier.m */; }; 72316BD31E0DA8430039EFD9 /* SUUnarchiverNotifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 72316BD21E0DA8430039EFD9 /* SUUnarchiverNotifier.m */; };
@@ -262,7 +262,6 @@
7267E5B81D3D8AEE00D1BF90 /* SPUInstallationInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5B51D3D8AEE00D1BF90 /* SPUInstallationInfo.m */; }; 7267E5B81D3D8AEE00D1BF90 /* SPUInstallationInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5B51D3D8AEE00D1BF90 /* SPUInstallationInfo.m */; };
7267E5C21D3D8B2700D1BF90 /* SUGuidedPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5BB1D3D8B2700D1BF90 /* SUGuidedPackageInstaller.m */; }; 7267E5C21D3D8B2700D1BF90 /* SUGuidedPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5BB1D3D8B2700D1BF90 /* SUGuidedPackageInstaller.m */; };
7267E5C31D3D8B2700D1BF90 /* SUInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5BD1D3D8B2700D1BF90 /* SUInstaller.m */; }; 7267E5C31D3D8B2700D1BF90 /* SUInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5BD1D3D8B2700D1BF90 /* SUInstaller.m */; };
7267E5C41D3D8B2700D1BF90 /* SUPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5BF1D3D8B2700D1BF90 /* SUPackageInstaller.m */; };
7267E5C51D3D8B2700D1BF90 /* SUPlainInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5C11D3D8B2700D1BF90 /* SUPlainInstaller.m */; }; 7267E5C51D3D8B2700D1BF90 /* SUPlainInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5C11D3D8B2700D1BF90 /* SUPlainInstaller.m */; };
7267E5C91D3D8C4300D1BF90 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 721BC20A1D17A5AD002BC71E /* CoreServices.framework */; }; 7267E5C91D3D8C4300D1BF90 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 721BC20A1D17A5AD002BC71E /* CoreServices.framework */; };
7267E5CA1D3D8C4800D1BF90 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D69BFE84028FC02AAC07 /* Foundation.framework */; }; 7267E5CA1D3D8C4800D1BF90 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D69BFE84028FC02AAC07 /* Foundation.framework */; };
@@ -291,7 +290,6 @@
7267E5F11D3D917A00D1BF90 /* SUBinaryDeltaUnarchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E57E1D3D896700D1BF90 /* SUBinaryDeltaUnarchiver.m */; }; 7267E5F11D3D917A00D1BF90 /* SUBinaryDeltaUnarchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E57E1D3D896700D1BF90 /* SUBinaryDeltaUnarchiver.m */; };
7267E5F21D3D918000D1BF90 /* SUSignatureVerifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E59B1D3D8A5A00D1BF90 /* SUSignatureVerifier.m */; }; 7267E5F21D3D918000D1BF90 /* SUSignatureVerifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E59B1D3D8A5A00D1BF90 /* SUSignatureVerifier.m */; };
7267E5F41D3D918B00D1BF90 /* SUGuidedPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5BB1D3D8B2700D1BF90 /* SUGuidedPackageInstaller.m */; }; 7267E5F41D3D918B00D1BF90 /* SUGuidedPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5BB1D3D8B2700D1BF90 /* SUGuidedPackageInstaller.m */; };
7267E5F51D3D918B00D1BF90 /* SUPackageInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5BF1D3D8B2700D1BF90 /* SUPackageInstaller.m */; };
7267E5F61D3D919000D1BF90 /* SUDiskImageUnarchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5811D3D89B300D1BF90 /* SUDiskImageUnarchiver.m */; }; 7267E5F61D3D919000D1BF90 /* SUDiskImageUnarchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5811D3D89B300D1BF90 /* SUDiskImageUnarchiver.m */; };
7267E5F71D3D919600D1BF90 /* SUPlainInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5C11D3D8B2700D1BF90 /* SUPlainInstaller.m */; }; 7267E5F71D3D919600D1BF90 /* SUPlainInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5C11D3D8B2700D1BF90 /* SUPlainInstaller.m */; };
7267E5F81D3D91A800D1BF90 /* SUPipedUnarchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5831D3D89B300D1BF90 /* SUPipedUnarchiver.m */; }; 7267E5F81D3D91A800D1BF90 /* SUPipedUnarchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 7267E5831D3D89B300D1BF90 /* SUPipedUnarchiver.m */; };
@@ -653,6 +651,55 @@
remoteGlobalIDString = 72B398D11D3D879300EE297F; remoteGlobalIDString = 72B398D11D3D879300EE297F;
remoteInfo = Autoupdate; remoteInfo = Autoupdate;
}; };
72CCCC14287B3D1900E7156B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
remoteInfo = Sparkle;
};
72CCCC16287B3D3400E7156B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = EA1E280E22B64522004AA304;
remoteInfo = bsdiff;
};
72CCCC18287B3D3D00E7156B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = EA1E282C22B660BE004AA304;
remoteInfo = ed25519;
};
72CCCC1A287B3D9000E7156B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = EA1E282C22B660BE004AA304;
remoteInfo = ed25519;
};
72CCCC1C287B3D9600E7156B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = EA1E282C22B660BE004AA304;
remoteInfo = ed25519;
};
72CCCC1E287B3DA100E7156B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = EA1E282C22B660BE004AA304;
remoteInfo = ed25519;
};
72CCCC20287B3DA400E7156B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = EA1E280E22B64522004AA304;
remoteInfo = bsdiff;
};
72D954B91CBB6E27006F28BD /* PBXContainerItemProxy */ = { 72D954B91CBB6E27006F28BD /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy; isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
@@ -915,7 +962,6 @@
612DCBAE0D488BC60015DBEA /* SUUpdatePermissionPrompt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUUpdatePermissionPrompt.m; sourceTree = "<group>"; }; 612DCBAE0D488BC60015DBEA /* SUUpdatePermissionPrompt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUUpdatePermissionPrompt.m; sourceTree = "<group>"; };
613151B20FB4946A000DCD59 /* is */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = is; path = is.lproj/Sparkle.strings; sourceTree = "<group>"; }; 613151B20FB4946A000DCD59 /* is */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = is; path = is.lproj/Sparkle.strings; sourceTree = "<group>"; };
615409C4103BBC4000125AF1 /* cs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Sparkle.strings; sourceTree = "<group>"; }; 615409C4103BBC4000125AF1 /* cs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Sparkle.strings; sourceTree = "<group>"; };
615AE3CF0D64DC40001CA7BD /* SUModelTranslation.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = SUModelTranslation.plist; sourceTree = "<group>"; };
6186554310D7484E00B1E074 /* pt-PT */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "pt-PT.lproj/Sparkle.strings"; sourceTree = "<group>"; }; 6186554310D7484E00B1E074 /* pt-PT */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "pt-PT.lproj/Sparkle.strings"; sourceTree = "<group>"; };
618915730E35937600B5E981 /* sv */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Sparkle.strings; sourceTree = "<group>"; }; 618915730E35937600B5E981 /* sv */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Sparkle.strings; sourceTree = "<group>"; };
6195D4920E404AD700D41A50 /* ru */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Sparkle.strings; sourceTree = "<group>"; }; 6195D4920E404AD700D41A50 /* ru */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Sparkle.strings; sourceTree = "<group>"; };
@@ -1010,6 +1056,7 @@
7229E1B81C97CC4D00CB50D0 /* SPUScheduledUpdateDriver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPUScheduledUpdateDriver.m; sourceTree = "<group>"; }; 7229E1B81C97CC4D00CB50D0 /* SPUScheduledUpdateDriver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPUScheduledUpdateDriver.m; sourceTree = "<group>"; };
7229E1BB1C98EFF200CB50D0 /* SPUDownloadDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPUDownloadDriver.h; sourceTree = "<group>"; }; 7229E1BB1C98EFF200CB50D0 /* SPUDownloadDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPUDownloadDriver.h; sourceTree = "<group>"; };
7229E1BC1C98EFF200CB50D0 /* SPUDownloadDriver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPUDownloadDriver.m; sourceTree = "<group>"; }; 7229E1BC1C98EFF200CB50D0 /* SPUDownloadDriver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPUDownloadDriver.m; sourceTree = "<group>"; };
722C9538286EA54A0033908A /* SPUGentleUserDriverReminders.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SPUGentleUserDriverReminders.h; sourceTree = "<group>"; };
722FB7CA1DD69897001D40CE /* ConfigSwift.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigSwift.xcconfig; sourceTree = "<group>"; }; 722FB7CA1DD69897001D40CE /* ConfigSwift.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigSwift.xcconfig; sourceTree = "<group>"; };
722FB7E3260EE53F00EB571C /* SUNormalization.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SUNormalization.h; sourceTree = "<group>"; }; 722FB7E3260EE53F00EB571C /* SUNormalization.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SUNormalization.h; sourceTree = "<group>"; };
722FB7E4260EE53F00EB571C /* SUNormalization.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SUNormalization.m; sourceTree = "<group>"; }; 722FB7E4260EE53F00EB571C /* SUNormalization.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SUNormalization.m; sourceTree = "<group>"; };
@@ -1213,8 +1260,6 @@
7267E5BB1D3D8B2700D1BF90 /* SUGuidedPackageInstaller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SUGuidedPackageInstaller.m; path = Autoupdate/SUGuidedPackageInstaller.m; sourceTree = SOURCE_ROOT; }; 7267E5BB1D3D8B2700D1BF90 /* SUGuidedPackageInstaller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SUGuidedPackageInstaller.m; path = Autoupdate/SUGuidedPackageInstaller.m; sourceTree = SOURCE_ROOT; };
7267E5BC1D3D8B2700D1BF90 /* SUInstaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SUInstaller.h; path = Autoupdate/SUInstaller.h; sourceTree = SOURCE_ROOT; }; 7267E5BC1D3D8B2700D1BF90 /* SUInstaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SUInstaller.h; path = Autoupdate/SUInstaller.h; sourceTree = SOURCE_ROOT; };
7267E5BD1D3D8B2700D1BF90 /* SUInstaller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SUInstaller.m; path = Autoupdate/SUInstaller.m; sourceTree = SOURCE_ROOT; }; 7267E5BD1D3D8B2700D1BF90 /* SUInstaller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SUInstaller.m; path = Autoupdate/SUInstaller.m; sourceTree = SOURCE_ROOT; };
7267E5BE1D3D8B2700D1BF90 /* SUPackageInstaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SUPackageInstaller.h; path = Autoupdate/SUPackageInstaller.h; sourceTree = SOURCE_ROOT; };
7267E5BF1D3D8B2700D1BF90 /* SUPackageInstaller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SUPackageInstaller.m; path = Autoupdate/SUPackageInstaller.m; sourceTree = SOURCE_ROOT; };
7267E5C01D3D8B2700D1BF90 /* SUPlainInstaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SUPlainInstaller.h; path = Autoupdate/SUPlainInstaller.h; sourceTree = SOURCE_ROOT; }; 7267E5C01D3D8B2700D1BF90 /* SUPlainInstaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SUPlainInstaller.h; path = Autoupdate/SUPlainInstaller.h; sourceTree = SOURCE_ROOT; };
7267E5C11D3D8B2700D1BF90 /* SUPlainInstaller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SUPlainInstaller.m; path = Autoupdate/SUPlainInstaller.m; sourceTree = SOURCE_ROOT; }; 7267E5C11D3D8B2700D1BF90 /* SUPlainInstaller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SUPlainInstaller.m; path = Autoupdate/SUPlainInstaller.m; sourceTree = SOURCE_ROOT; };
7267E5CF1D3D8C8500D1BF90 /* SecurityFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SecurityFoundation.framework; path = System/Library/Frameworks/SecurityFoundation.framework; sourceTree = SDKROOT; }; 7267E5CF1D3D8C8500D1BF90 /* SecurityFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SecurityFoundation.framework; path = System/Library/Frameworks/SecurityFoundation.framework; sourceTree = SDKROOT; };
@@ -1715,7 +1760,6 @@
1420DF4F196247F900203BB0 /* Images.xcassets */, 1420DF4F196247F900203BB0 /* Images.xcassets */,
14732BBC1960EFB500593899 /* README.markdown */, 14732BBC1960EFB500593899 /* README.markdown */,
14732BB91960EEEE00593899 /* SampleAppcast.xml */, 14732BB91960EEEE00593899 /* SampleAppcast.xml */,
615AE3CF0D64DC40001CA7BD /* SUModelTranslation.plist */,
1EAA4C8A2132C7BF00604473 /* ReleaseNotesColorStyle.css */, 1EAA4C8A2132C7BF00604473 /* ReleaseNotesColorStyle.css */,
); );
path = Resources; path = Resources;
@@ -1927,8 +1971,6 @@
722FB7E3260EE53F00EB571C /* SUNormalization.h */, 722FB7E3260EE53F00EB571C /* SUNormalization.h */,
722FB7E4260EE53F00EB571C /* SUNormalization.m */, 722FB7E4260EE53F00EB571C /* SUNormalization.m */,
7267E5B91D3D8B0B00D1BF90 /* SUInstallerProtocol.h */, 7267E5B91D3D8B0B00D1BF90 /* SUInstallerProtocol.h */,
7267E5BE1D3D8B2700D1BF90 /* SUPackageInstaller.h */,
7267E5BF1D3D8B2700D1BF90 /* SUPackageInstaller.m */,
7267E5C01D3D8B2700D1BF90 /* SUPlainInstaller.h */, 7267E5C01D3D8B2700D1BF90 /* SUPlainInstaller.h */,
7267E5C11D3D8B2700D1BF90 /* SUPlainInstaller.m */, 7267E5C11D3D8B2700D1BF90 /* SUPlainInstaller.m */,
); );
@@ -2159,6 +2201,7 @@
725CB9581C7121830064365A /* SPUStandardUserDriver.h */, 725CB9581C7121830064365A /* SPUStandardUserDriver.h */,
725CB9591C7121830064365A /* SPUStandardUserDriver.m */, 725CB9591C7121830064365A /* SPUStandardUserDriver.m */,
726E4A361C89116000C57C6A /* SPUStandardUserDriverDelegate.h */, 726E4A361C89116000C57C6A /* SPUStandardUserDriverDelegate.h */,
722C9538286EA54A0033908A /* SPUGentleUserDriverReminders.h */,
726DF88D1C84277500188804 /* SPUUserUpdateState.h */, 726DF88D1C84277500188804 /* SPUUserUpdateState.h */,
7269E49C2648FC6C0088C213 /* SPUUserUpdateState+Private.h */, 7269E49C2648FC6C0088C213 /* SPUUserUpdateState+Private.h */,
7269E4992648F7C00088C213 /* SPUUserUpdateState.m */, 7269E4992648F7C00088C213 /* SPUUserUpdateState.m */,
@@ -2433,6 +2476,7 @@
7246E0A31C83B685003B4E75 /* SPUStandardUpdaterController.h in Headers */, 7246E0A31C83B685003B4E75 /* SPUStandardUpdaterController.h in Headers */,
725CB95A1C7121830064365A /* SPUStandardUserDriver.h in Headers */, 725CB95A1C7121830064365A /* SPUStandardUserDriver.h in Headers */,
726E4A371C89116000C57C6A /* SPUStandardUserDriverDelegate.h in Headers */, 726E4A371C89116000C57C6A /* SPUStandardUserDriverDelegate.h in Headers */,
722C9539286EA68C0033908A /* SPUGentleUserDriverReminders.h in Headers */,
729F7EAF273F1840004592DC /* SPUUserAgent+Private.h in Headers */, 729F7EAF273F1840004592DC /* SPUUserAgent+Private.h in Headers */,
72EE17FC26D1CC9D00C58B19 /* SPUInstallationType.h in Headers */, 72EE17FC26D1CC9D00C58B19 /* SPUInstallationType.h in Headers */,
72EF30BE2675CF38008CE987 /* SPUAppcastItemStateResolver.h in Headers */, 72EF30BE2675CF38008CE987 /* SPUAppcastItemStateResolver.h in Headers */,
@@ -2571,6 +2615,8 @@
buildRules = ( buildRules = (
); );
dependencies = ( dependencies = (
72CCCC19287B3D3D00E7156B /* PBXTargetDependency */,
72CCCC17287B3D3400E7156B /* PBXTargetDependency */,
61B5F91C09C4CF7200B25A18 /* PBXTargetDependency */, 61B5F91C09C4CF7200B25A18 /* PBXTargetDependency */,
726E4A201C86C88F00C57C6A /* PBXTargetDependency */, 726E4A201C86C88F00C57C6A /* PBXTargetDependency */,
); );
@@ -2590,6 +2636,8 @@
buildRules = ( buildRules = (
); );
dependencies = ( dependencies = (
72CCCC21287B3DA400E7156B /* PBXTargetDependency */,
72CCCC1F287B3DA100E7156B /* PBXTargetDependency */,
); );
name = generate_appcast; name = generate_appcast;
packageProductDependencies = ( packageProductDependencies = (
@@ -2712,6 +2760,7 @@
buildRules = ( buildRules = (
); );
dependencies = ( dependencies = (
72CCCC15287B3D1900E7156B /* PBXTargetDependency */,
); );
name = TestAppHelper; name = TestAppHelper;
productName = TestAppHelper; productName = TestAppHelper;
@@ -2830,6 +2879,7 @@
buildRules = ( buildRules = (
); );
dependencies = ( dependencies = (
72CCCC1B287B3D9000E7156B /* PBXTargetDependency */,
); );
name = generate_keys; name = generate_keys;
packageProductDependencies = ( packageProductDependencies = (
@@ -2850,6 +2900,7 @@
buildRules = ( buildRules = (
); );
dependencies = ( dependencies = (
72CCCC1D287B3D9600E7156B /* PBXTargetDependency */,
); );
name = sign_update; name = sign_update;
packageProductDependencies = ( packageProductDependencies = (
@@ -3129,7 +3180,6 @@
61AAE8280A321A7F00D8810D /* Sparkle.strings in Resources */, 61AAE8280A321A7F00D8810D /* Sparkle.strings in Resources */,
1EAA4C8B2132C7BF00604473 /* ReleaseNotesColorStyle.css in Resources */, 1EAA4C8B2132C7BF00604473 /* ReleaseNotesColorStyle.css in Resources */,
723ABD38259A9BA500BDB4FA /* SUUpdateAlert.xib in Resources */, 723ABD38259A9BA500BDB4FA /* SUUpdateAlert.xib in Resources */,
615AE3D00D64DC40001CA7BD /* SUModelTranslation.plist in Resources */,
55C14BEF136EF21700649790 /* SUStatus.xib in Resources */, 55C14BEF136EF21700649790 /* SUStatus.xib in Resources */,
723ABD6C259A9CBC00BDB4FA /* SUUpdatePermissionPrompt.xib in Resources */, 723ABD6C259A9CBC00BDB4FA /* SUUpdatePermissionPrompt.xib in Resources */,
); );
@@ -3256,7 +3306,6 @@
7267E5EC1D3D912900D1BF90 /* SUInstaller.m in Sources */, 7267E5EC1D3D912900D1BF90 /* SUInstaller.m in Sources */,
5AF6C7541AEA49840014A3AB /* SUInstallerTest.m in Sources */, 5AF6C7541AEA49840014A3AB /* SUInstallerTest.m in Sources */,
14652F8219A9746000959E44 /* SULog.m in Sources */, 14652F8219A9746000959E44 /* SULog.m in Sources */,
7267E5F51D3D918B00D1BF90 /* SUPackageInstaller.m in Sources */,
7267E5F81D3D91A800D1BF90 /* SUPipedUnarchiver.m in Sources */, 7267E5F81D3D91A800D1BF90 /* SUPipedUnarchiver.m in Sources */,
7267E5F71D3D919600D1BF90 /* SUPlainInstaller.m in Sources */, 7267E5F71D3D919600D1BF90 /* SUPlainInstaller.m in Sources */,
72BEBFEF1D7287570019146B /* SUSpotlightImporterTest.swift in Sources */, 72BEBFEF1D7287570019146B /* SUSpotlightImporterTest.swift in Sources */,
@@ -3454,7 +3503,6 @@
5A6DD17123FE1FFC000AEF33 /* SUSignatures.m in Sources */, 5A6DD17123FE1FFC000AEF33 /* SUSignatures.m in Sources */,
721D5A8525C65D3F00D23BEA /* SUFlatPackageUnarchiver.m in Sources */, 721D5A8525C65D3F00D23BEA /* SUFlatPackageUnarchiver.m in Sources */,
7267E5CE1D3D8C7500D1BF90 /* SULog.m in Sources */, 7267E5CE1D3D8C7500D1BF90 /* SULog.m in Sources */,
7267E5C41D3D8B2700D1BF90 /* SUPackageInstaller.m in Sources */,
7267E5871D3D89B300D1BF90 /* SUPipedUnarchiver.m in Sources */, 7267E5871D3D89B300D1BF90 /* SUPipedUnarchiver.m in Sources */,
7267E5C51D3D8B2700D1BF90 /* SUPlainInstaller.m in Sources */, 7267E5C51D3D8B2700D1BF90 /* SUPlainInstaller.m in Sources */,
7267E5D81D3D8D4400D1BF90 /* SUStandardVersionComparator.m in Sources */, 7267E5D81D3D8D4400D1BF90 /* SUStandardVersionComparator.m in Sources */,
@@ -3722,6 +3770,41 @@
target = 72B398D11D3D879300EE297F /* Autoupdate */; target = 72B398D11D3D879300EE297F /* Autoupdate */;
targetProxy = 72A5D5AB1D6929260009E5AC /* PBXContainerItemProxy */; targetProxy = 72A5D5AB1D6929260009E5AC /* PBXContainerItemProxy */;
}; };
72CCCC15287B3D1900E7156B /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 8DC2EF4F0486A6940098B216 /* Sparkle */;
targetProxy = 72CCCC14287B3D1900E7156B /* PBXContainerItemProxy */;
};
72CCCC17287B3D3400E7156B /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = EA1E280E22B64522004AA304 /* bsdiff */;
targetProxy = 72CCCC16287B3D3400E7156B /* PBXContainerItemProxy */;
};
72CCCC19287B3D3D00E7156B /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = EA1E282C22B660BE004AA304 /* ed25519 */;
targetProxy = 72CCCC18287B3D3D00E7156B /* PBXContainerItemProxy */;
};
72CCCC1B287B3D9000E7156B /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = EA1E282C22B660BE004AA304 /* ed25519 */;
targetProxy = 72CCCC1A287B3D9000E7156B /* PBXContainerItemProxy */;
};
72CCCC1D287B3D9600E7156B /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = EA1E282C22B660BE004AA304 /* ed25519 */;
targetProxy = 72CCCC1C287B3D9600E7156B /* PBXContainerItemProxy */;
};
72CCCC1F287B3DA100E7156B /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = EA1E282C22B660BE004AA304 /* ed25519 */;
targetProxy = 72CCCC1E287B3DA100E7156B /* PBXContainerItemProxy */;
};
72CCCC21287B3DA400E7156B /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = EA1E280E22B64522004AA304 /* bsdiff */;
targetProxy = 72CCCC20287B3DA400E7156B /* PBXContainerItemProxy */;
};
72D954BA1CBB6E27006F28BD /* PBXTargetDependency */ = { 72D954BA1CBB6E27006F28BD /* PBXTargetDependency */ = {
isa = PBXTargetDependency; isa = PBXTargetDependency;
target = 721C24441CB753E6005440CB /* Installer Progress */; target = 721C24441CB753E6005440CB /* Installer Progress */;
@@ -4,7 +4,7 @@
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"> buildImplicitDependencies = "NO">
<BuildActionEntries> <BuildActionEntries>
<BuildActionEntry <BuildActionEntry
buildForTesting = "YES" buildForTesting = "YES"
@@ -4,7 +4,7 @@
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"> buildImplicitDependencies = "NO">
<BuildActionEntries> <BuildActionEntries>
<BuildActionEntry <BuildActionEntry
buildForTesting = "YES" buildForTesting = "YES"
@@ -4,7 +4,7 @@
version = "2.0"> version = "2.0">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"> buildImplicitDependencies = "NO">
<BuildActionEntries> <BuildActionEntries>
<BuildActionEntry <BuildActionEntry
buildForTesting = "YES" buildForTesting = "YES"
@@ -4,7 +4,7 @@
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"> buildImplicitDependencies = "NO">
<BuildActionEntries> <BuildActionEntries>
<BuildActionEntry <BuildActionEntry
buildForTesting = "YES" buildForTesting = "YES"
+3 -3
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="18122" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> <document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21208.1" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies> <dependencies>
<deployment identifier="macosx"/> <deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="18122"/> <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21208.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
@@ -20,7 +20,7 @@
</customObject> </customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/> <customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window identifier="SUUpdateAlert" title="Software Update" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="SUUpdateAlert" animationBehavior="default" id="5" userLabel="Update Alert (release notes)"> <window identifier="SUUpdateAlert" title="Software Update" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" id="5" userLabel="Update Alert (release notes)">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/> <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowCollectionBehavior key="collectionBehavior" fullScreenAuxiliary="YES"/> <windowCollectionBehavior key="collectionBehavior" fullScreenAuxiliary="YES"/>
<windowPositionMask key="initialPositionMask" topStrut="YES" bottomStrut="YES"/> <windowPositionMask key="initialPositionMask" topStrut="YES" bottomStrut="YES"/>
+6 -2
View File
@@ -126,7 +126,9 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.3;
__weak InstallerProgressAppController *weakSelf = self; __weak InstallerProgressAppController *weakSelf = self;
_connection.interruptionHandler = ^{ _connection.interruptionHandler = ^{
[weakSelf.connection invalidate]; dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf.connection invalidate];
});
}; };
_connection.invalidationHandler = ^{ _connection.invalidationHandler = ^{
@@ -282,7 +284,7 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.3;
}); });
} }
- (void)registerInstallationInfoData:(NSData *)installationInfoData - (void)registerInstallationInfoData:(NSData *)installationInfoData completionHandler:(void (^)(void))completionHandler
{ {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (self.statusInfo.installationInfoData == nil && installationInfoData != nil) { if (self.statusInfo.installationInfoData == nil && installationInfoData != nil) {
@@ -295,6 +297,8 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.3;
SULog(SULogLevelError, @"Error: Failed to decode initial installation info from installer: %@", installationInfoData); SULog(SULogLevelError, @"Error: Failed to decode initial installation info from installer: %@", installationInfoData);
} }
} }
completionHandler();
}); });
} }
+1 -1
View File
@@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)registerApplicationBundlePath:(NSString *)applicationBundlePath reply:(void (^)(NSNumber * _Nullable processIdentifier))reply; - (void)registerApplicationBundlePath:(NSString *)applicationBundlePath reply:(void (^)(NSNumber * _Nullable processIdentifier))reply;
- (void)registerInstallationInfoData:(NSData *)installationInfoData; - (void)registerInstallationInfoData:(NSData *)installationInfoData completionHandler:(void (^)(void))completionHandler;
- (void)sendTerminationSignal; - (void)sendTerminationSignal;
-7
View File
@@ -6,14 +6,7 @@
// Copyright © 2021 Sparkle Project. All rights reserved. // Copyright © 2021 Sparkle Project. All rights reserved.
// //
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#import <Sparkle/SUExport.h> #import <Sparkle/SUExport.h>
+3 -7
View File
@@ -26,7 +26,6 @@
@property (nonatomic, readonly, weak, nullable) id updaterDelegate; @property (nonatomic, readonly, weak, nullable) id updaterDelegate;
@property (nonatomic, readonly) SPUCoreBasedUpdateDriver *coreDriver; @property (nonatomic, readonly) SPUCoreBasedUpdateDriver *coreDriver;
@property (nonatomic) SUAppcastItem* updateItem; @property (nonatomic) SUAppcastItem* updateItem;
@property (nonatomic) BOOL willInstallSilently;
@end @end
@@ -37,7 +36,6 @@
@synthesize updaterDelegate = _updaterDelegate; @synthesize updaterDelegate = _updaterDelegate;
@synthesize coreDriver = _coreDriver; @synthesize coreDriver = _coreDriver;
@synthesize updateItem = _updateItem; @synthesize updateItem = _updateItem;
@synthesize willInstallSilently = _willInstallSilently;
- (instancetype)initWithHost:(SUHost *)host applicationBundle:(NSBundle *)applicationBundle updater:(id)updater userDriver:(id <SPUUserDriver>)userDriver updaterDelegate:(nullable id <SPUUpdaterDelegate>)updaterDelegate - (instancetype)initWithHost:(SUHost *)host applicationBundle:(NSBundle *)applicationBundle updater:(id)updater userDriver:(id <SPUUserDriver>)userDriver updaterDelegate:(nullable id <SPUUpdaterDelegate>)updaterDelegate
{ {
@@ -100,14 +98,12 @@
return NO; return NO;
} }
- (void)installerDidFinishPreparationAndWillInstallImmediately:(BOOL)willInstallImmediately silently:(BOOL)willInstallSilently - (void)installerDidFinishPreparationAndWillInstallImmediately:(BOOL)willInstallImmediately
{ {
self.willInstallSilently = willInstallSilently;
if (!willInstallImmediately) { if (!willInstallImmediately) {
BOOL installationHandledByDelegate = NO; BOOL installationHandledByDelegate = NO;
id<SPUUpdaterDelegate> updaterDelegate = self.updaterDelegate; id<SPUUpdaterDelegate> updaterDelegate = self.updaterDelegate;
if (self.willInstallSilently && [updaterDelegate respondsToSelector:@selector(updater:willInstallUpdateOnQuit:immediateInstallationBlock:)]) { if ([updaterDelegate respondsToSelector:@selector(updater:willInstallUpdateOnQuit:immediateInstallationBlock:)]) {
__weak SPUAutomaticUpdateDriver *weakSelf = self; __weak SPUAutomaticUpdateDriver *weakSelf = self;
installationHandledByDelegate = [updaterDelegate updater:self.updater willInstallUpdateOnQuit:self.updateItem immediateInstallationBlock:^{ installationHandledByDelegate = [updaterDelegate updater:self.updater willInstallUpdateOnQuit:self.updateItem immediateInstallationBlock:^{
[weakSelf.coreDriver finishInstallationWithResponse:SPUUserUpdateChoiceInstall displayingUserInterface:NO]; [weakSelf.coreDriver finishInstallationWithResponse:SPUUserUpdateChoiceInstall displayingUserInterface:NO];
@@ -139,7 +135,7 @@
- (void)abortUpdateWithError:(NSError *)error - (void)abortUpdateWithError:(NSError *)error
{ {
BOOL showNextUpdateImmediately = (error == nil || error.code == SUInstallationAuthorizeLaterError) && (!self.willInstallSilently || self.updateItem.criticalUpdate || self.updateItem.isInformationOnlyUpdate); BOOL showNextUpdateImmediately = (error == nil || error.code == SUInstallationAuthorizeLaterError) && (self.updateItem.criticalUpdate || self.updateItem.isInformationOnlyUpdate);
[self.coreDriver abortUpdateAndShowNextUpdateImmediately:showNextUpdateImmediately error:error]; [self.coreDriver abortUpdateAndShowNextUpdateImmediately:showNextUpdateImmediately error:error];
} }
+4 -11
View File
@@ -141,18 +141,11 @@
{ {
if (!self.aborted) { if (!self.aborted) {
if (!resuming) { if (!resuming) {
// interactive pkg based updates are not supported under root user // Give the delegate a chance to bail
if ([updateItem.installationType isEqualToString:SPUInstallationTypeInteractivePackage] && geteuid() == 0) { NSError *shouldNotProceedError = nil;
[self.delegate basicDriverIsRequestingAbortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationRootInteractiveError userInfo:@{ NSLocalizedDescriptionKey: SULocalizedString(@"Interactive based packages cannot be installed as the root user.", nil) }]]; if ([self.updaterDelegate respondsToSelector:@selector(updater:shouldProceedWithUpdate:updateCheck:error:)] && ![self.updaterDelegate updater:self.updater shouldProceedWithUpdate:updateItem updateCheck:self.updateCheck error:&shouldNotProceedError]) {
[self.delegate basicDriverIsRequestingAbortUpdateWithError:shouldNotProceedError];
return; return;
} else {
// Give the delegate a chance to bail
NSError *shouldNotProceedError = nil;
if ([self.updaterDelegate respondsToSelector:@selector(updater:shouldProceedWithUpdate:updateCheck:error:)] && ![self.updaterDelegate updater:self.updater shouldProceedWithUpdate:updateItem updateCheck:self.updateCheck error:&shouldNotProceedError]) {
[self.delegate basicDriverIsRequestingAbortUpdateWithError:shouldNotProceedError];
return;
}
} }
} }
+1 -1
View File
@@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)basicDriverDidFindUpdateWithAppcastItem:(SUAppcastItem *)updateItem secondaryAppcastItem:(SUAppcastItem * _Nullable)secondaryAppcastItem; - (void)basicDriverDidFindUpdateWithAppcastItem:(SUAppcastItem *)updateItem secondaryAppcastItem:(SUAppcastItem * _Nullable)secondaryAppcastItem;
- (void)installerDidFinishPreparationAndWillInstallImmediately:(BOOL)willInstallImmediately silently:(BOOL)willInstallSilently; - (void)installerDidFinishPreparationAndWillInstallImmediately:(BOOL)willInstallImmediately;
- (void)coreDriverIsRequestingAbortUpdateWithError:(nullable NSError *)error; - (void)coreDriverIsRequestingAbortUpdateWithError:(nullable NSError *)error;
+2 -2
View File
@@ -294,9 +294,9 @@
} }
} }
- (void)installerDidFinishPreparationAndWillInstallImmediately:(BOOL)willInstallImmediately silently:(BOOL)willInstallSilently - (void)installerDidFinishPreparationAndWillInstallImmediately:(BOOL)willInstallImmediately
{ {
[self.delegate installerDidFinishPreparationAndWillInstallImmediately:willInstallImmediately silently:willInstallSilently]; [self.delegate installerDidFinishPreparationAndWillInstallImmediately:willInstallImmediately];
} }
- (void)finishInstallationWithResponse:(SPUUserUpdateChoice)response displayingUserInterface:(BOOL)displayingUserInterface - (void)finishInstallationWithResponse:(SPUUserUpdateChoice)response displayingUserInterface:(BOOL)displayingUserInterface
-7
View File
@@ -6,14 +6,7 @@
// Copyright © 2016 Sparkle Project. All rights reserved. // Copyright © 2016 Sparkle Project. All rights reserved.
// //
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#ifdef BUILDING_SPARKLE_DOWNLOADER_SERVICE #ifdef BUILDING_SPARKLE_DOWNLOADER_SERVICE
// Ignore incorrect warning // Ignore incorrect warning
+22
View File
@@ -0,0 +1,22 @@
//
// SPUGentleUserDriverReminders.h
// Sparkle
//
// Copyright © 2022 Sparkle Project. All rights reserved.
//
#ifndef SPUGentleUserDriverReminders_h
#define SPUGentleUserDriverReminders_h
/**
A private protocol for user drivers implementing gentle scheduled reminders
*/
@protocol SPUGentleUserDriverReminders
- (void)logGentleScheduledUpdateReminderWarningIfNeeded;
- (void)resetTimeSinceOpportuneUpdateNotice;
@end
#endif /* SPUGentleUserDriverReminders_h */
+1 -2
View File
@@ -11,9 +11,8 @@
#define SPUInstallationTypeApplication @"application" // the default installation type for ordinary application updates #define SPUInstallationTypeApplication @"application" // the default installation type for ordinary application updates
#define SPUInstallationTypeGuidedPackage @"package" // the preferred installation type for package installations #define SPUInstallationTypeGuidedPackage @"package" // the preferred installation type for package installations
#define SPUInstallationTypeInteractivePackage @"interactive-package" // the deprecated installation type; use guided package instead
#define SPUInstallationTypesArray (@[SPUInstallationTypeApplication, SPUInstallationTypeGuidedPackage, SPUInstallationTypeInteractivePackage]) #define SPUInstallationTypesArray (@[SPUInstallationTypeApplication, SPUInstallationTypeGuidedPackage])
#define SPUValidInstallationType(x) ((x != nil) && [SPUInstallationTypesArray containsObject:(NSString * _Nonnull)x]) #define SPUValidInstallationType(x) ((x != nil) && [SPUInstallationTypesArray containsObject:(NSString * _Nonnull)x])
#endif /* SPUInstallationType_h */ #endif /* SPUInstallationType_h */
+1 -1
View File
@@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)installerDidStartInstallingWithApplicationTerminated:(BOOL)applicationTerminated; - (void)installerDidStartInstallingWithApplicationTerminated:(BOOL)applicationTerminated;
- (void)installerDidStartExtracting; - (void)installerDidStartExtracting;
- (void)installerDidExtractUpdateWithProgress:(double)progress; - (void)installerDidExtractUpdateWithProgress:(double)progress;
- (void)installerDidFinishPreparationAndWillInstallImmediately:(BOOL)willInstallImmediately silently:(BOOL)willInstallSilently; - (void)installerDidFinishPreparationAndWillInstallImmediately:(BOOL)willInstallImmediately;
- (void)installerWillFinishInstallationAndRelaunch:(BOOL)relaunch; - (void)installerWillFinishInstallationAndRelaunch:(BOOL)relaunch;
- (void)installerDidFinishInstallationAndRelaunched:(BOOL)relaunch acknowledgement:(void(^)(void))acknowledgement; - (void)installerDidFinishInstallationAndRelaunched:(BOOL)relaunch acknowledgement:(void(^)(void))acknowledgement;
+18 -27
View File
@@ -121,28 +121,22 @@
} else if (underlyingError.code == SUInstallationError) { } else if (underlyingError.code == SUInstallationError) {
NSError *secondUnderlyingError = underlyingError.userInfo[NSUnderlyingErrorKey]; NSError *secondUnderlyingError = underlyingError.userInfo[NSUnderlyingErrorKey];
if (secondUnderlyingError != nil && [secondUnderlyingError.domain isEqualToString:NSCocoaErrorDomain] && secondUnderlyingError.code == NSFileWriteNoPermissionError) { if (secondUnderlyingError != nil && [secondUnderlyingError.domain isEqualToString:NSCocoaErrorDomain] && secondUnderlyingError.code == NSFileWriteNoPermissionError) {
NSBundle *mainBundle = [NSBundle mainBundle];
// macOS 13 and later introduce a policy where Gatekeeper can block app modifications if the apps have different Team IDs
BOOL warnAboutGatekeeper;
if (@available(macOS 13, *)) {
warnAboutGatekeeper = ![mainBundle isEqual:self.host.bundle];
} else {
warnAboutGatekeeper = NO;
}
// Note: these error strings will only surface for external app updaters like sparkle-cli (i.e, updaters that update other app bundles) // Note: these error strings will only surface for external app updaters like sparkle-cli (i.e, updaters that update other app bundles)
NSString *errorDescription;
if (warnAboutGatekeeper) {
SUHost *mainBundleHost = [[SUHost alloc] initWithBundle:mainBundle];
errorDescription = [NSString stringWithFormat:SULocalizedString(@"The installation failed due to not having permission to write the new update. To install the update, you may need to allow modifications from %1$@ in System Settings under Privacy & Security and App Management", nil), mainBundleHost.name];
} else {
errorDescription = SULocalizedString(@"The installation failed due to not having permission to write the new update.", nil);
}
NSDictionary *userInfo = @{ NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:@{
NSLocalizedDescriptionKey: errorDescription, NSLocalizedDescriptionKey: SULocalizedString(@"The installation failed due to not having permission to write the new update.", nil),
NSUnderlyingErrorKey: (NSError * _Nonnull)currentInstallerError NSUnderlyingErrorKey: (NSError * _Nonnull)currentInstallerError
}; }];
// macOS 13 and later introduce a policy where Gatekeeper can block app modifications if the apps have different Team IDs
if (@available(macOS 13, *)) {
NSBundle *mainBundle = [NSBundle mainBundle];
if (![mainBundle isEqual:self.host.bundle]) {
SUHost *mainBundleHost = [[SUHost alloc] initWithBundle:mainBundle];
userInfo[NSLocalizedRecoverySuggestionErrorKey] = [NSString stringWithFormat:SULocalizedString(@"You may need to allow modifications from %1$@ in System Settings under Privacy & Security and App Management to install future updates.", nil), mainBundleHost.name];
}
}
customError = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationWriteNoPermissionError userInfo:userInfo]; customError = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationWriteNoPermissionError userInfo:userInfo];
} }
@@ -176,7 +170,7 @@
assert(hostBundleIdentifier != nil); assert(hostBundleIdentifier != nil);
if (!SPUXPCServiceIsEnabled(SUEnableInstallerConnectionServiceKey)) { if (!SPUXPCServiceIsEnabled(SUEnableInstallerConnectionServiceKey)) {
self.installerConnection = [[SUInstallerConnection alloc] initWithDelegate:self]; self.installerConnection = [[SUInstallerConnection alloc] initWithDelegate:self remote:NO];
} else { } else {
self.installerConnection = [[SUXPCInstallerConnection alloc] initWithDelegate:self]; self.installerConnection = [[SUXPCInstallerConnection alloc] initWithDelegate:self];
} }
@@ -322,18 +316,15 @@
} else { } else {
SULog(SULogLevelError, @"Error: Archived data to send for appcast item is nil"); SULog(SULogLevelError, @"Error: Archived data to send for appcast item is nil");
} }
} else if (identifier == SPUInstallerRegisteredAppcastItem) {
BOOL canInstallSilently = NO; self.currentStage = identifier;
if (data.length >= sizeof(uint8_t)) {
canInstallSilently = (BOOL)*(const uint8_t *)data.bytes;
}
BOOL hasTargetTerminated = NO; BOOL hasTargetTerminated = NO;
if (data.length >= sizeof(uint8_t) * 2) { if (data.length >= sizeof(uint8_t)) {
hasTargetTerminated = (BOOL)*((const uint8_t *)data.bytes + 1); hasTargetTerminated = (BOOL)*((const uint8_t *)data.bytes + 1);
} }
[self.delegate installerDidFinishPreparationAndWillInstallImmediately:hasTargetTerminated silently:canInstallSilently]; [self.delegate installerDidFinishPreparationAndWillInstallImmediately:hasTargetTerminated];
} else if (identifier == SPUInstallationFinishedStage2) { } else if (identifier == SPUInstallationFinishedStage2) {
self.currentStage = identifier; self.currentStage = identifier;
+2 -2
View File
@@ -30,7 +30,7 @@
id<SUInstallerStatusProtocol> installerStatus = nil; id<SUInstallerStatusProtocol> installerStatus = nil;
BOOL usesXPC = SPUXPCServiceIsEnabled(SUEnableInstallerStatusServiceKey); BOOL usesXPC = SPUXPCServiceIsEnabled(SUEnableInstallerStatusServiceKey);
if (!usesXPC) { if (!usesXPC) {
installerStatus = [[SUInstallerStatus alloc] init]; installerStatus = [[SUInstallerStatus alloc] initWithRemote:NO];
} else { } else {
installerStatus = [[SUXPCInstallerStatus alloc] init]; installerStatus = [[SUXPCInstallerStatus alloc] init];
} }
@@ -93,7 +93,7 @@
id<SUInstallerStatusProtocol> installerStatus = nil; id<SUInstallerStatusProtocol> installerStatus = nil;
BOOL usesXPC = SPUXPCServiceIsEnabled(SUEnableInstallerStatusServiceKey); BOOL usesXPC = SPUXPCServiceIsEnabled(SUEnableInstallerStatusServiceKey);
if (!usesXPC) { if (!usesXPC) {
installerStatus = [[SUInstallerStatus alloc] init]; installerStatus = [[SUInstallerStatus alloc] initWithRemote:NO];
} else { } else {
installerStatus = [[SUXPCInstallerStatus alloc] init]; installerStatus = [[SUXPCInstallerStatus alloc] init];
} }
+10 -48
View File
@@ -16,58 +16,20 @@ static NSString *SURootObjectArchiveKey = @"SURootObjectArchive";
NSData * _Nullable SPUArchiveRootObjectSecurely(id<NSSecureCoding> rootObject) NSData * _Nullable SPUArchiveRootObjectSecurely(id<NSSecureCoding> rootObject)
{ {
if (@available(macOS 10.13, *)) { NSError *error = nil;
NSError *error = nil; NSData *data = [NSKeyedArchiver archivedDataWithRootObject:rootObject requiringSecureCoding:YES error:&error];
NSData *data = [NSKeyedArchiver archivedDataWithRootObject:rootObject requiringSecureCoding:YES error:&error]; if (data == nil) {
if (data == nil) { SULog(SULogLevelError, @"Error while securely archiving object: %@", error);
SULog(SULogLevelError, @"Error while securely archiving object: %@", error);
}
return data;
} else {
NSMutableData *data = [NSMutableData data];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSKeyedArchiver *keyedArchiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
#pragma clang diagnostic pop
keyedArchiver.requiresSecureCoding = YES;
@try {
[keyedArchiver encodeObject:rootObject forKey:SURootObjectArchiveKey];
[keyedArchiver finishEncoding];
return [data copy];
} @catch (NSException *exception) {
SULog(SULogLevelError, @"Exception while securely archiving object: %@", exception);
[keyedArchiver finishEncoding];
return nil;
}
} }
return data;
} }
id<NSSecureCoding> _Nullable SPUUnarchiveRootObjectSecurely(NSData *data, Class klass) id<NSSecureCoding> _Nullable SPUUnarchiveRootObjectSecurely(NSData *data, Class klass)
{ {
if (@available(macOS 10.13, *)) { NSError *error = nil;
NSError *error = nil; id<NSSecureCoding> rootObject = [NSKeyedUnarchiver unarchivedObjectOfClass:klass fromData:data error:&error];
id<NSSecureCoding> rootObject = [NSKeyedUnarchiver unarchivedObjectOfClass:klass fromData:data error:&error]; if (rootObject == nil) {
if (rootObject == nil) { SULog(SULogLevelError, @"Error while securely unarchiving object: %@", error);
SULog(SULogLevelError, @"Error while securely unarchiving object: %@", error);
}
return rootObject;
} else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data];
#pragma clang diagnostic pop
unarchiver.requiresSecureCoding = YES;
@try {
id<NSSecureCoding> rootObject = [unarchiver decodeObjectOfClass:klass forKey:SURootObjectArchiveKey];
[unarchiver finishDecoding];
return rootObject;
} @catch (NSException *exception) {
SULog(SULogLevelError, @"Exception while securely unarchiving object: %@", exception);
[unarchiver finishDecoding];
return nil;
}
} }
return rootObject;
} }
-7
View File
@@ -6,14 +6,7 @@
// Copyright © 2016 Sparkle Project. All rights reserved. // Copyright © 2016 Sparkle Project. All rights reserved.
// //
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#import <Sparkle/SUExport.h> #import <Sparkle/SUExport.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
-7
View File
@@ -6,14 +6,7 @@
// Copyright © 2016 Sparkle Project. All rights reserved. // Copyright © 2016 Sparkle Project. All rights reserved.
// //
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#import <Sparkle/SPUUserDriver.h> #import <Sparkle/SPUUserDriver.h>
#import <Sparkle/SUExport.h> #import <Sparkle/SUExport.h>
+10 -12
View File
@@ -10,6 +10,7 @@
#import "SPUStandardUserDriver.h" #import "SPUStandardUserDriver.h"
#import "SPUStandardUserDriverDelegate.h" #import "SPUStandardUserDriverDelegate.h"
#import "SPUGentleUserDriverReminders.h"
#import "SUAppcastItem.h" #import "SUAppcastItem.h"
#import "SUVersionDisplayProtocol.h" #import "SUVersionDisplayProtocol.h"
#import "SUHost.h" #import "SUHost.h"
@@ -33,7 +34,7 @@
// The amount of time the app is allowed to be idle for us to consider showing an update prompt right away when the app is active // The amount of time the app is allowed to be idle for us to consider showing an update prompt right away when the app is active
static const NSTimeInterval SUScheduledUpdateIdleEventLeewayInterval = DEBUG ? 30.0 : 5 * 60.0; static const NSTimeInterval SUScheduledUpdateIdleEventLeewayInterval = DEBUG ? 30.0 : 5 * 60.0;
@interface SPUStandardUserDriver () @interface SPUStandardUserDriver () <SPUGentleUserDriverReminders>
@property (nonatomic, readonly) SUHost *host; @property (nonatomic, readonly) SUHost *host;
// We must store the oldHostName before the host is potentially replaced // We must store the oldHostName before the host is potentially replaced
@@ -59,7 +60,7 @@ static const NSTimeInterval SUScheduledUpdateIdleEventLeewayInterval = DEBUG ? 3
@implementation SPUStandardUserDriver @implementation SPUStandardUserDriver
{ {
mach_timebase_info_data_t _timebaseInfo; mach_timebase_info_data_t _timebaseInfo;
double _initializationTime; double _timeSinceOpportuneUpdateNotice;
id<NSObject> _applicationBecameActiveAfterUpdateAlertBecameKeyObserver; id<NSObject> _applicationBecameActiveAfterUpdateAlertBecameKeyObserver;
NSValue *_updateAlertWindowFrameValue; NSValue *_updateAlertWindowFrameValue;
BOOL _updateAlertWindowWasInactive; BOOL _updateAlertWindowWasInactive;
@@ -98,8 +99,6 @@ static const NSTimeInterval SUScheduledUpdateIdleEventLeewayInterval = DEBUG ? 3
_timebaseInfo.numer = 0; _timebaseInfo.numer = 0;
_timebaseInfo.denom = 0; _timebaseInfo.denom = 0;
} else {
[self _resetInitializationTime];
} }
} }
return self; return self;
@@ -114,9 +113,10 @@ static const NSTimeInterval SUScheduledUpdateIdleEventLeewayInterval = DEBUG ? 3
} }
} }
- (void)_resetInitializationTime // This private method is used by SPUUpdater for resetting the opportune time to show an update notice in utmost focus
- (void)resetTimeSinceOpportuneUpdateNotice
{ {
_initializationTime = [self currentTime]; _timeSinceOpportuneUpdateNotice = [self currentTime];
} }
#pragma mark Update Permission #pragma mark Update Permission
@@ -131,8 +131,6 @@ static const NSTimeInterval SUScheduledUpdateIdleEventLeewayInterval = DEBUG ? 3
__weak __typeof__(self) weakSelf = self; __weak __typeof__(self) weakSelf = self;
self.permissionPrompt = [[SUUpdatePermissionPrompt alloc] initPromptWithHost:self.host request:request reply:^(SUUpdatePermissionResponse *response) { self.permissionPrompt = [[SUUpdatePermissionPrompt alloc] initPromptWithHost:self.host request:request reply:^(SUUpdatePermissionResponse *response) {
[weakSelf _resetInitializationTime];
reply(response); reply(response);
weakSelf.permissionPrompt = nil; weakSelf.permissionPrompt = nil;
}]; }];
@@ -143,7 +141,7 @@ static const NSTimeInterval SUScheduledUpdateIdleEventLeewayInterval = DEBUG ? 3
#pragma mark Update Alert Focus #pragma mark Update Alert Focus
// This private method is used by SPUUpdater when scheduling for update checks // This private method is used by SPUUpdater when scheduling for update checks
- (void)_logGentleScheduledUpdateReminderWarningIfNeeded - (void)logGentleScheduledUpdateReminderWarningIfNeeded
{ {
id<SPUStandardUserDriverDelegate> delegate = self.delegate; id<SPUStandardUserDriverDelegate> delegate = self.delegate;
if (!_loggedGentleUpdateReminderWarning && (![delegate respondsToSelector:@selector(supportsGentleScheduledUpdateReminders)] || !delegate.supportsGentleScheduledUpdateReminders)) { if (!_loggedGentleUpdateReminderWarning && (![delegate respondsToSelector:@selector(supportsGentleScheduledUpdateReminders)] || !delegate.supportsGentleScheduledUpdateReminders)) {
@@ -177,10 +175,10 @@ static const NSTimeInterval SUScheduledUpdateIdleEventLeewayInterval = DEBUG ? 3
[self.activeUpdateAlert setInstallButtonFocus:YES]; [self.activeUpdateAlert setInstallButtonFocus:YES];
} else { } else {
// Handle scheduled update check // Handle scheduled update check
uint64_t timeElapsedSinceInitialization = (uint64_t)([self currentTime] - _initializationTime); uint64_t timeElapsedSinceOpportuneUpdateNotice = (uint64_t)([self currentTime] - _timeSinceOpportuneUpdateNotice);
// Give scheduled update alerts priority if 3 or less seconds have passed since initialization // Give scheduled update alerts priority if 3 or less seconds have passed since our last opportune time
BOOL appNearUpdaterInitialization = (timeElapsedSinceInitialization <= 3000000000ULL); BOOL appNearUpdaterInitialization = (timeElapsedSinceOpportuneUpdateNotice <= 3000000000ULL);
// We will always show an update alert at the right time // We will always show an update alert at the right time
[self.activeUpdateAlert setInstallButtonFocus:YES]; [self.activeUpdateAlert setInstallButtonFocus:YES];
-7
View File
@@ -6,14 +6,7 @@
// Copyright © 2016 Sparkle Project. All rights reserved. // Copyright © 2016 Sparkle Project. All rights reserved.
// //
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#import <Sparkle/SUExport.h> #import <Sparkle/SUExport.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
+1 -1
View File
@@ -340,7 +340,7 @@
[self.userDriver showExtractionReceivedProgress:progress]; [self.userDriver showExtractionReceivedProgress:progress];
} }
- (void)installerDidFinishPreparationAndWillInstallImmediately:(BOOL)willInstallImmediately silently:(BOOL)__unused willInstallSilently - (void)installerDidFinishPreparationAndWillInstallImmediately:(BOOL)willInstallImmediately
{ {
if (!willInstallImmediately) { if (!willInstallImmediately) {
[self.userDriver showReadyToInstallAndRelaunch:^(SPUUserUpdateChoice choice) { [self.userDriver showReadyToInstallAndRelaunch:^(SPUUserUpdateChoice choice) {
-7
View File
@@ -6,14 +6,7 @@
// Copyright © 2016 Sparkle Project. All rights reserved. // Copyright © 2016 Sparkle Project. All rights reserved.
// //
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#import <Sparkle/SUExport.h> #import <Sparkle/SUExport.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
+20 -19
View File
@@ -6,14 +6,7 @@
// Copyright 2006 Andy Matuschak. All rights reserved. // Copyright 2006 Andy Matuschak. All rights reserved.
// //
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#import <Sparkle/SUExport.h> #import <Sparkle/SUExport.h>
#import <Sparkle/SPUUserDriver.h> #import <Sparkle/SPUUserDriver.h>
@@ -32,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
Prefer to set initial properties in your bundle's Info.plist as described in [Customizing Sparkle](https://sparkle-project.org/documentation/customization/). Prefer to set initial properties in your bundle's Info.plist as described in [Customizing Sparkle](https://sparkle-project.org/documentation/customization/).
Otherwise only if you need dynamic behavior (eg. for user preferences) should you set properties on the updater such as: Otherwise only if you need dynamic behavior for user preferences should you set properties on the updater such as:
- `automaticallyChecksForUpdates` - `automaticallyChecksForUpdates`
- `updateCheckInterval` - `updateCheckInterval`
- `automaticallyDownloadsUpdates` - `automaticallyDownloadsUpdates`
@@ -102,19 +95,24 @@ SU_EXPORT @interface SPUUpdater : NSObject
- (void)checkForUpdates; - (void)checkForUpdates;
/** /**
Checks for updates, but does not display any UI unless an update is found. Checks for updates, but does not show any UI unless an update is found.
You usually do not need to call this method directly. If `automaticallyChecksForUpdates` is @c YES, You usually do not need to call this method directly. If `automaticallyChecksForUpdates` is @c YES,
Sparkle calls this method automatically according to its update schedule using the `updateCheckInterval` Sparkle calls this method automatically according to its update schedule using the `updateCheckInterval`
and the `lastUpdateCheckDate`. and the `lastUpdateCheckDate`. Therefore, you should typically only consider calling this method directly if you
opt out of automatic update checks.
This is meant for programmatically initating a check for updates in the background without the user initiating it.
This check will not show UI if no new updates are found.
If a new update is found, the updater's user driver may handle showing it at an appropriate (but not necessarily immediate) time.
If you want control over when and how a new update is shown, please see https://sparkle-project.org/documentation/gentle-reminders/
Note if automated updating is turned on, either a new update may be downloaded in the background to be installed silently,
or an already downloaded update may be shown.
This is meant for programmatically initating a check for updates.
That is, it will display no UI unless it finds an update, in which case it proceeds as usual.
This will not find updates that the user has opted into skipping. This will not find updates that the user has opted into skipping.
Note if there is no resumable update found, and automated updating is turned on,
the update will be downloaded in the background without disrupting the user.
This method does not do anything if there is a `sessionInProgress`. This method does not do anything if there is a `sessionInProgress`.
*/ */
- (void)checkForUpdatesInBackground; - (void)checkForUpdatesInBackground;
@@ -177,7 +175,9 @@ SU_EXPORT @interface SPUUpdater : NSObject
this permission request is not performed however. this permission request is not performed however.
Setting this property will persist in the host bundle's user defaults. Setting this property will persist in the host bundle's user defaults.
Only set this property if you need dynamic behavior (e.g. user preferences). Only set this property if the user wants to change the default via a user preferences option.
For testing environments, you can disable update checks by passing `-SUEnableAutomaticChecks NO`
to your app's command line arguments instead of setting this property.
The update schedule cycle will be reset in a short delay after the property's new value is set. The update schedule cycle will be reset in a short delay after the property's new value is set.
This is to allow reverting this property without kicking off a schedule change immediately This is to allow reverting this property without kicking off a schedule change immediately
@@ -187,9 +187,10 @@ SU_EXPORT @interface SPUUpdater : NSObject
/** /**
A property indicating the current automatic update check interval in seconds. A property indicating the current automatic update check interval in seconds.
Prefer to set SUScheduledCheckInterval directly in your Info.plist for setting the initial value.
Setting this property will persist in the host bundle's user defaults. Setting this property will persist in the host bundle's user defaults.
For this reason, only set this property if you need dynamic behavior (eg user preferences). Only set this property if the user wants to change the default via a user preferences option.
Otherwise prefer to set SUScheduledCheckInterval directly in your Info.plist.
The update schedule cycle will be reset in a short delay after the property's new value is set. The update schedule cycle will be reset in a short delay after the property's new value is set.
This is to allow reverting this property without kicking off a schedule change immediately This is to allow reverting this property without kicking off a schedule change immediately
@@ -205,7 +206,7 @@ SU_EXPORT @interface SPUUpdater : NSObject
In this case, this property will return NO regardless of how this property is set. In this case, this property will return NO regardless of how this property is set.
Setting this property will persist in the host bundle's user defaults. Setting this property will persist in the host bundle's user defaults.
For this reason, only set this property if you need dynamic behavior (eg user preferences). For this reason, only set this property if the user wants to change the default via a user preferences option.
Otherwise prefer to set SUAutomaticallyUpdate directly in your Info.plist. Otherwise prefer to set SUAutomaticallyUpdate directly in your Info.plist.
*/ */
@property (nonatomic) BOOL automaticallyDownloadsUpdates; @property (nonatomic) BOOL automaticallyDownloadsUpdates;
+18 -12
View File
@@ -32,16 +32,11 @@
#import "SPUResumableUpdate.h" #import "SPUResumableUpdate.h"
#import "SUSignatures.h" #import "SUSignatures.h"
#import "SPUUserAgent+Private.h" #import "SPUUserAgent+Private.h"
#import "SPUGentleUserDriverReminders.h"
#include "AppKitPrevention.h" #include "AppKitPrevention.h"
@interface NSObject (SPUStandardUserDriverPrivate)
- (void)_logGentleScheduledUpdateReminderWarningIfNeeded;
@end
NSString *const SUUpdaterDidFinishLoadingAppCastNotification = @"SUUpdaterDidFinishLoadingAppCastNotification"; NSString *const SUUpdaterDidFinishLoadingAppCastNotification = @"SUUpdaterDidFinishLoadingAppCastNotification";
NSString *const SUUpdaterDidFindValidUpdateNotification = @"SUUpdaterDidFindValidUpdateNotification"; NSString *const SUUpdaterDidFindValidUpdateNotification = @"SUUpdaterDidFindValidUpdateNotification";
NSString *const SUUpdaterDidNotFindUpdateNotification = @"SUUpdaterDidNotFindUpdateNotification"; NSString *const SUUpdaterDidNotFindUpdateNotification = @"SUUpdaterDidNotFindUpdateNotification";
@@ -175,6 +170,10 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
return NO; return NO;
} }
if ([self.userDriver respondsToSelector:@selector(resetTimeSinceOpportuneUpdateNotice)]) {
[(id<SPUGentleUserDriverReminders>)self.userDriver resetTimeSinceOpportuneUpdateNotice];
}
self.startedUpdater = YES; self.startedUpdater = YES;
self.canCheckForUpdates = YES; self.canCheckForUpdates = YES;
@@ -348,10 +347,11 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
} }
} else if (publicKeys.ed25519PubKey == nil) { } else if (publicKeys.ed25519PubKey == nil) {
// No EdDSA key is available, so app must be using DSA // No EdDSA key is available, so app must be using DSA
if (updatingMainBundle && !self.loggedNoSecureKeyWarning) { if (updatingMainBundle) {
SULog(SULogLevelError, @"Error: Serving updates without an EdDSA key is insecure and deprecated. DSA support may be removed in a future Sparkle release. Please migrate to using EdDSA (ed25519). Visit Sparkle's documentation for migration information: https://sparkle-project.org/documentation/#3-segue-for-security-concerns"); if (error != NULL) {
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUNoPublicDSAFoundError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"For security reasons, updates need to be signed with an EdDSA key for %@. Please migrate to using EdDSA (ed25519). Visit Sparkle's documentation for migration information: https://sparkle-project.org/documentation/#3-segue-for-security-concerns.", hostName] }];
self.loggedNoSecureKeyWarning = YES; }
return NO;
} }
} }
@@ -520,8 +520,8 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
[self.delegate updater:self willScheduleUpdateCheckAfterDelay:delayUntilCheck]; [self.delegate updater:self willScheduleUpdateCheckAfterDelay:delayUntilCheck];
} }
if ([self.userDriver respondsToSelector:@selector(_logGentleScheduledUpdateReminderWarningIfNeeded)]) { if ([self.userDriver respondsToSelector:@selector(logGentleScheduledUpdateReminderWarningIfNeeded)]) {
[(NSObject *)self.userDriver _logGentleScheduledUpdateReminderWarningIfNeeded]; [(id<SPUGentleUserDriverReminders>)self.userDriver logGentleScheduledUpdateReminderWarningIfNeeded];
} }
[self.updaterTimer startAndFireAfterDelay:delayUntilCheck]; [self.updaterTimer startAndFireAfterDelay:delayUntilCheck];
@@ -807,6 +807,12 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
return; // not even ready yet return; // not even ready yet
} }
// Note this resets the opportune time when user grants Sparkle permission to check for updates
// and when the user changes preferences on automatically checking for updates or the update time check interval
if ([self.userDriver respondsToSelector:@selector(resetTimeSinceOpportuneUpdateNotice)]) {
[(id<SPUGentleUserDriverReminders>)self.userDriver resetTimeSinceOpportuneUpdateNotice];
}
if (!self.sessionInProgress) { if (!self.sessionInProgress) {
[self cancelNextUpdateCycle]; [self cancelNextUpdateCycle];
[self scheduleNextUpdateCheckFiringImmediately:NO usingCurrentDate:YES]; [self scheduleNextUpdateCheckFiringImmediately:NO usingCurrentDate:YES];
-7
View File
@@ -6,14 +6,7 @@
// Copyright © 2016 Sparkle Project. All rights reserved. // Copyright © 2016 Sparkle Project. All rights reserved.
// //
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#import <Sparkle/SUExport.h> #import <Sparkle/SUExport.h>
#import <Sparkle/SPUUpdateCheck.h> #import <Sparkle/SPUUpdateCheck.h>
-7
View File
@@ -6,14 +6,7 @@
// Copyright © 2016 Sparkle Project. All rights reserved. // Copyright © 2016 Sparkle Project. All rights reserved.
// //
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#import <Sparkle/SUExport.h> #import <Sparkle/SUExport.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
-7
View File
@@ -6,14 +6,7 @@
// Copyright © 2016 Sparkle Project. All rights reserved. // Copyright © 2016 Sparkle Project. All rights reserved.
// //
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#import <Sparkle/SPUUserUpdateState.h> #import <Sparkle/SPUUserUpdateState.h>
#import <Sparkle/SUExport.h> #import <Sparkle/SUExport.h>
-7
View File
@@ -9,14 +9,7 @@
#ifndef SPUUserUpdateState_h #ifndef SPUUserUpdateState_h
#define SPUUserUpdateState_h #define SPUUserUpdateState_h
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#import <Sparkle/SUExport.h> #import <Sparkle/SUExport.h>
-7
View File
@@ -6,14 +6,7 @@
// Copyright © 2021 Sparkle Project. All rights reserved. // Copyright © 2021 Sparkle Project. All rights reserved.
// //
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
-7
View File
@@ -9,14 +9,7 @@
#ifndef SUAPPCAST_H #ifndef SUAPPCAST_H
#define SUAPPCAST_H #define SUAPPCAST_H
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#import <Sparkle/SUExport.h> #import <Sparkle/SUExport.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
-7
View File
@@ -9,14 +9,7 @@
#ifndef SUAppcastItem_Private_h #ifndef SUAppcastItem_Private_h
#define SUAppcastItem_Private_h #define SUAppcastItem_Private_h
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
+2 -10
View File
@@ -9,14 +9,7 @@
#ifndef SUAPPCASTITEM_H #ifndef SUAPPCASTITEM_H
#define SUAPPCASTITEM_H #define SUAPPCASTITEM_H
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#ifdef BUILDING_SPARKLE_TESTS #ifdef BUILDING_SPARKLE_TESTS
// Ignore incorrect warning // Ignore incorrect warning
@@ -181,7 +174,7 @@ SU_EXPORT @interface SUAppcastItem : NSObject<NSSecureCoding>
This version string should contain three period-separated components. This version string should contain three period-separated components.
Example: @c 10.12.0 Example: @c 10.13.0
Use `minimumOperatingSystemVersionIsOK` property to test if the current running system passes this requirement. Use `minimumOperatingSystemVersionIsOK` property to test if the current running system passes this requirement.
@@ -201,7 +194,7 @@ SU_EXPORT @interface SUAppcastItem : NSObject<NSSecureCoding>
This version string should contain three period-separated components. This version string should contain three period-separated components.
Example: @c 10.13.0 Example: @c 10.14.0
Use `maximumOperatingSystemVersionIsOK` property to test if the current running system passes this requirement. Use `maximumOperatingSystemVersionIsOK` property to test if the current running system passes this requirement.
@@ -231,7 +224,6 @@ SU_EXPORT @interface SUAppcastItem : NSObject<NSSecureCoding>
This may be: This may be:
- @c application - indicates this is a regular application update. - @c application - indicates this is a regular application update.
- @c package - indicates this is a guided package installer update. - @c package - indicates this is a guided package installer update.
- @c interactive-package - indicates this is an interactive package installer update (deprecated; use "package" instead)
This is extracted from the @c sparkle:installationType attribute in the @c <enclosure> element. This is extracted from the @c sparkle:installationType attribute in the @c <enclosure> element.
-5
View File
@@ -533,7 +533,6 @@ static NSString *SUAppcastItemStateKey = @"SUAppcastItemState";
NSString *chosenInstallationType; NSString *chosenInstallationType;
if (attributeInstallationType == nil) { if (attributeInstallationType == nil) {
// If we have a flat package, assume installation type is guided // If we have a flat package, assume installation type is guided
// (flat / non-archived interactive packages are not supported)
// Otherwise assume we have a normal application inside an archive // Otherwise assume we have a normal application inside an archive
if ([_fileURL.pathExtension isEqualToString:@"pkg"] || [_fileURL.pathExtension isEqualToString:@"mpkg"]) { if ([_fileURL.pathExtension isEqualToString:@"pkg"] || [_fileURL.pathExtension isEqualToString:@"mpkg"]) {
chosenInstallationType = SPUInstallationTypeGuidedPackage; chosenInstallationType = SPUInstallationTypeGuidedPackage;
@@ -545,10 +544,6 @@ static NSString *SUAppcastItemStateKey = @"SUAppcastItemState";
*error = [NSString stringWithFormat:@"Feed item's enclosure lacks valid %@ (found %@)", SUAppcastAttributeInstallationType, attributeInstallationType]; *error = [NSString stringWithFormat:@"Feed item's enclosure lacks valid %@ (found %@)", SUAppcastAttributeInstallationType, attributeInstallationType];
} }
return nil; return nil;
} else if ([attributeInstallationType isEqualToString:SPUInstallationTypeInteractivePackage]) {
SULog(SULogLevelDefault, @"warning: '%@' for %@ is deprecated. Use '%@' instead.", SPUInstallationTypeInteractivePackage, SUAppcastAttributeInstallationType, SPUInstallationTypeGuidedPackage);
chosenInstallationType = attributeInstallationType;
} else { } else {
chosenInstallationType = attributeInstallationType; chosenInstallationType = attributeInstallationType;
} }
-7
View File
@@ -9,14 +9,7 @@
#ifndef SUERRORS_H #ifndef SUERRORS_H
#define SUERRORS_H #define SUERRORS_H
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#if defined(BUILDING_SPARKLE_TOOL) || defined(BUILDING_SPARKLE_TESTS) #if defined(BUILDING_SPARKLE_TOOL) || defined(BUILDING_SPARKLE_TESTS)
// Ignore incorrect warning // Ignore incorrect warning
+1 -1
View File
@@ -69,7 +69,7 @@ NS_ASSUME_NONNULL_BEGIN
* Otherwise on failure you may need to re-try using move operations. This operation will fail on non-apfs volumes or volumes that don't support rename swapping. * Otherwise on failure you may need to re-try using move operations. This operation will fail on non-apfs volumes or volumes that don't support rename swapping.
* Both originalItemURL and newItemURL must exist. * Both originalItemURL and newItemURL must exist.
*/ */
- (BOOL)swapItemAtURL:(NSURL *)originalItemURL withItemAtURL:(NSURL *)newItemURL error:(NSError **)error API_AVAILABLE(macos(10.13)); - (BOOL)swapItemAtURL:(NSURL *)originalItemURL withItemAtURL:(NSURL *)newItemURL error:(NSError **)error;
/** /**
* Copies an item from a source to a destination * Copies an item from a source to a destination
+1 -3
View File
@@ -19,9 +19,7 @@ typedef NS_ENUM(uint8_t, SULogLevel) {
SULogLevelError SULogLevelError
}; };
// Logging utlity function that is thread-safe // Logging utlity function that is thread-safe and uses os_log
// On 10.12 or later this uses os_log
// Otherwise on older systems this uses ASL
// For debugging command line tools, you may have to use Console.app or log(1) to view log messages // For debugging command line tools, you may have to use Console.app or log(1) to view log messages
// Try to keep log messages as compact/short as possible // Try to keep log messages as compact/short as possible
void SULog(SULogLevel level, NSString *format, ...) NS_FORMAT_FUNCTION(2, 3); void SULog(SULogLevel level, NSString *format, ...) NS_FORMAT_FUNCTION(2, 3);
+17 -113
View File
@@ -7,135 +7,39 @@
// //
#include "SULog.h" #include "SULog.h"
#include <asl.h>
#include <Availability.h>
#include <os/log.h> #include <os/log.h>
#include "AppKitPrevention.h"
#import "SUOperatingSystem.h"
#include "AppKitPrevention.h" #include "AppKitPrevention.h"
// For converting constants to string literals using the preprocessor
#define STRINGIFY(x) #x
#define TO_STRING(x) STRINGIFY(x)
void SULog(SULogLevel level, NSString *format, ...) void SULog(SULogLevel level, NSString *format, ...)
{ {
static aslclient client;
static dispatch_queue_t queue;
static dispatch_once_t onceToken; static dispatch_once_t onceToken;
static os_log_t logger; static os_log_t logger;
static BOOL hasOSLogging;
dispatch_once(&onceToken, ^{ dispatch_once(&onceToken, ^{
NSBundle *mainBundle = [NSBundle mainBundle]; const char *subsystem = SPARKLE_BUNDLE_IDENTIFIER;
// This creates a thread-safe object
if (@available(macOS 10.12, *)) { logger = os_log_create(subsystem, "Sparkle");
hasOSLogging = YES;
} else {
hasOSLogging = NO;
}
if (hasOSLogging) {
const char *subsystem = SPARKLE_BUNDLE_IDENTIFIER;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpartial-availability"
// This creates a thread-safe object
logger = os_log_create(subsystem, "Sparkle");
#pragma clang diagnostic pop
} else {
uint32_t options = ASL_OPT_NO_DELAY;
// Act the same way os_log() does; don't log to stderr if a terminal device is attached
if (!isatty(STDERR_FILENO)) {
options |= ASL_OPT_STDERR;
}
NSString *displayName = [[NSFileManager defaultManager] displayNameAtPath:mainBundle.bundlePath];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
client = asl_open([displayName stringByAppendingString:@" [Sparkle]"].UTF8String, SPARKLE_BUNDLE_IDENTIFIER, options);
#pragma clang diagnostic pop
queue = dispatch_queue_create(NULL, DISPATCH_QUEUE_SERIAL);
}
}); });
if (!hasOSLogging && client == NULL) {
return;
}
va_list ap; va_list ap;
va_start(ap, format); va_start(ap, format);
NSString *logMessage = [[NSString alloc] initWithFormat:format arguments:ap]; NSString *logMessage = [[NSString alloc] initWithFormat:format arguments:ap];
va_end(ap); va_end(ap);
// Use os_log if available (on 10.12+) // We'll make all of our messages formatted as public; just don't log sensitive information.
if (hasOSLogging) { // Note we don't take advantage of info like the source line number because we wrap this macro inside our own function
// We'll make all of our messages formatted as public; just don't log sensitive information. // And we don't really leverage of os_log's deferred formatting processing because we format the string before passing it in
// Note we don't take advantage of info like the source line number because we wrap this macro inside our own function switch (level) {
// And we don't really leverage of os_log's deferred formatting processing because we format the string before passing it in case SULogLevelDefault:
#pragma clang diagnostic push // See docs for OS_LOG_TYPE_DEFAULT
#pragma clang diagnostic ignored "-Wpartial-availability" // By default, OS_LOG_TYPE_DEFAULT seems to be more noticable than OS_LOG_TYPE_INFO
switch (level) { os_log(logger, "%{public}@", logMessage);
case SULogLevelDefault: break;
// See docs for OS_LOG_TYPE_DEFAULT case SULogLevelError:
// By default, OS_LOG_TYPE_DEFAULT seems to be more noticable than OS_LOG_TYPE_INFO // See docs for OS_LOG_TYPE_ERROR
os_log(logger, "%{public}@", logMessage); os_log_error(logger, "%{public}@", logMessage);
break; break;
case SULogLevelError:
// See docs for OS_LOG_TYPE_ERROR
os_log_error(logger, "%{public}@", logMessage);
break;
}
#pragma clang diagnostic pop
return;
} }
// Otherwise use ASL
// Make sure we do not async, because if we async, the log may not be delivered deterministically
// TODO: When we remove support for macOS 10.11, remove all this asl code
dispatch_sync(queue, ^{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
aslmsg message = asl_new(ASL_TYPE_MSG);
#pragma clang diagnostic pop
if (message == NULL) {
return;
}
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (asl_set(message, ASL_KEY_MSG, logMessage.UTF8String) != 0) {
#pragma clang diagnostic pop
return;
}
int levelSetResult;
switch (level) {
case SULogLevelDefault:
// Just use one level below the error level
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
levelSetResult = asl_set(message, ASL_KEY_LEVEL, TO_STRING(ASL_LEVEL_WARNING));
#pragma clang diagnostic pop
break;
case SULogLevelError:
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
levelSetResult = asl_set(message, ASL_KEY_LEVEL, TO_STRING(ASL_LEVEL_ERR));
#pragma clang diagnostic pop
break;
}
if (levelSetResult != 0) {
return;
}
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
asl_send(client, message);
#pragma clang diagnostic pop
});
} }
-7
View File
@@ -9,14 +9,7 @@
#ifndef SUSTANDARDVERSIONCOMPARATOR_H #ifndef SUSTANDARDVERSIONCOMPARATOR_H
#define SUSTANDARDVERSIONCOMPARATOR_H #define SUSTANDARDVERSIONCOMPARATOR_H
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#ifdef BUILDING_SPARKLE_TOOL #ifdef BUILDING_SPARKLE_TOOL
// Ignore incorrect warning // Ignore incorrect warning
+1 -13
View File
@@ -30,17 +30,8 @@ NSString *const SUSystemProfilerPreferredLanguageKey = @"lang";
@implementation SUSystemProfiler @implementation SUSystemProfiler
+ (NSDictionary<NSString *, NSString *> *)modelTranslationTable
{
// Use explicit class to use the correct bundle even when subclassed
NSString *path = [[NSBundle bundleForClass:[SUSystemProfiler class]] pathForResource:@"SUModelTranslation" ofType:@"plist"];
return [[NSDictionary alloc] initWithContentsOfFile:path];
}
+ (NSArray<NSDictionary<NSString *, NSString *> *> *)systemProfileArrayForHost:(SUHost *)host + (NSArray<NSDictionary<NSString *, NSString *> *> *)systemProfileArrayForHost:(SUHost *)host
{ {
NSDictionary<NSString *, NSString *> *modelTranslation = [self modelTranslationTable];
// Gather profile information and append it to the URL. // Gather profile information and append it to the URL.
NSMutableArray<NSDictionary<NSString *, NSString *> *> *profileArray = [NSMutableArray array]; NSMutableArray<NSDictionary<NSString *, NSString *> *> *profileArray = [NSMutableArray array];
NSArray *profileDictKeys = @[@"key", @"displayKey", @"value", @"displayValue"]; NSArray *profileDictKeys = @[@"key", @"displayKey", @"value", @"displayValue"];
@@ -115,10 +106,7 @@ NSString *const SUSystemProfilerPreferredLanguageKey = @"lang";
error = sysctlbyname("hw.model", cpuModel, &length, NULL, 0); error = sysctlbyname("hw.model", cpuModel, &length, NULL, 0);
if (error == 0) { if (error == 0) {
NSString *rawModelName = @(cpuModel); NSString *rawModelName = @(cpuModel);
NSString *visibleModelName = [modelTranslation objectForKey:rawModelName]; NSString *visibleModelName = rawModelName;
if (visibleModelName == nil) {
visibleModelName = rawModelName;
}
[profileArray addObject:[NSDictionary dictionaryWithObjects:@[SUSystemProfilerHardwareModelKey, @"Mac Model", rawModelName, visibleModelName] forKeys:profileDictKeys]]; [profileArray addObject:[NSDictionary dictionaryWithObjects:@[SUSystemProfilerHardwareModelKey, @"Mac Model", rawModelName, visibleModelName] forKeys:profileDictKeys]];
} }
free(cpuModel); free(cpuModel);
+19 -11
View File
@@ -292,6 +292,8 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE
BOOL showReleaseNotes = [self showsReleaseNotes]; BOOL showReleaseNotes = [self showsReleaseNotes];
if (showReleaseNotes) { if (showReleaseNotes) {
self.window.frameAutosaveName = @"SUUpdateAlert";
NSURL *colorStyleURL = [[NSBundle bundleForClass:[self class]] URLForResource:@"ReleaseNotesColorStyle" withExtension:@"css"]; NSURL *colorStyleURL = [[NSBundle bundleForClass:[self class]] URLForResource:@"ReleaseNotesColorStyle" withExtension:@"css"];
// "-apple-system-font" is a reference to the system UI font. "-apple-system" is the new recommended token, but for backward compatibility we can't use it. // "-apple-system-font" is a reference to the system UI font. "-apple-system" is the new recommended token, but for backward compatibility we can't use it.
@@ -318,21 +320,28 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE
self.webView.view.frame = boxContentView.bounds; self.webView.view.frame = boxContentView.bounds;
self.webView.view.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable; self.webView.view.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
} else {
// Update alert should not be resizable when no release notes are available
self.window.styleMask &= ~NSWindowStyleMaskResizable;
} }
[self.window setFrameAutosaveName: showReleaseNotes ? @"SUUpdateAlert" : @"SUUpdateAlertSmall" ];
if (self.updateItem.informationOnlyUpdate) { if (self.updateItem.informationOnlyUpdate) {
[self.installButton setTitle:SULocalizedString(@"Learn More…", @"Alternate title for 'Install Update' button when there's no download in RSS feed.")]; [self.installButton setTitle:SULocalizedString(@"Learn More…", @"Alternate title for 'Install Update' button when there's no download in RSS feed.")];
[self.installButton setAction:@selector(openInfoURL:)]; [self.installButton setAction:@selector(openInfoURL:)];
} }
BOOL allowsAutomaticUpdates = self.allowsAutomaticUpdates;
if (showReleaseNotes) { if (showReleaseNotes) {
[self displayReleaseNotes]; [self displayReleaseNotes];
} else { } else {
NSLayoutConstraint *automaticallyInstallUpdatesButtonToDescriptionFieldConstraint = [NSLayoutConstraint constraintWithItem:self.automaticallyInstallUpdatesButton attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.descriptionField attribute:NSLayoutAttributeBottom multiplier:1.0 constant:8.0]; // When automatic updates aren't allowed we won't show the automatic install updates button
// This button is removed later below
[self.window.contentView addConstraint:automaticallyInstallUpdatesButtonToDescriptionFieldConstraint]; if (allowsAutomaticUpdates) {
NSLayoutConstraint *automaticallyInstallUpdatesButtonToDescriptionFieldConstraint = [NSLayoutConstraint constraintWithItem:self.automaticallyInstallUpdatesButton attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.descriptionField attribute:NSLayoutAttributeBottom multiplier:1.0 constant:8.0];
[self.window.contentView addConstraint:automaticallyInstallUpdatesButtonToDescriptionFieldConstraint];
}
[self.releaseNotesContainerView removeFromSuperview]; [self.releaseNotesContainerView removeFromSuperview];
} }
@@ -341,19 +350,18 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE
// When we show release notes, it looks ugly if the install buttons are not closer to the release notes view // When we show release notes, it looks ugly if the install buttons are not closer to the release notes view
// However when we don't show release notes, it looks ugly if the install buttons are too close to the description field. Shrugs. // However when we don't show release notes, it looks ugly if the install buttons are too close to the description field. Shrugs.
if (!self.allowsAutomaticUpdates) { if (!allowsAutomaticUpdates) {
if (showReleaseNotes) { if (showReleaseNotes) {
// Fix constraints so that buttons aren't far away from web view when we hide the automatic updates check box // Fix constraints so that buttons aren't far away from web view when we hide the automatic updates check box
NSLayoutConstraint *skipButtonToReleaseNotesContainerConstraint = [NSLayoutConstraint constraintWithItem:self.skipButton attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.releaseNotesContainerView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:12.0]; NSLayoutConstraint *skipButtonToReleaseNotesContainerConstraint = [NSLayoutConstraint constraintWithItem:self.skipButton attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.releaseNotesContainerView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:12.0];
[self.window.contentView addConstraint:skipButtonToReleaseNotesContainerConstraint]; [self.window.contentView addConstraint:skipButtonToReleaseNotesContainerConstraint];
[self.automaticallyInstallUpdatesButton removeFromSuperview];
} else { } else {
// Disable automatic install updates option if the developer wishes for it in Info.plist NSLayoutConstraint *skipButtonToDescriptionConstraint = [NSLayoutConstraint constraintWithItem:self.skipButton attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.descriptionField attribute:NSLayoutAttributeBottom multiplier:1.0 constant:20.0];
// If we are showing release notes, this button will be hidden instead
self.automaticallyInstallUpdatesButton.enabled = NO; [self.window.contentView addConstraint:skipButtonToDescriptionConstraint];
} }
[self.automaticallyInstallUpdatesButton removeFromSuperview];
} }
if (self.state.stage == SPUUserUpdateStageInstalling) { if (self.state.stage == SPUUserUpdateStageInstalling) {
+1 -1
View File
@@ -163,7 +163,7 @@ static NSString *const SUUpdatePermissionPromptTouchBarIndentifier = @"" SPARKLE
return touchBar; return touchBar;
} }
- (NSTouchBarItem *)touchBar:(NSTouchBar * __unused)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier API_AVAILABLE(macos(10.12.2)) - (NSTouchBarItem *)touchBar:(NSTouchBar * __unused)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier
{ {
if ([identifier isEqualToString:SUUpdatePermissionPromptTouchBarIndentifier]) { if ([identifier isEqualToString:SUUpdatePermissionPromptTouchBarIndentifier]) {
NSCustomTouchBarItem* item = [(NSCustomTouchBarItem *)[NSClassFromString(@"NSCustomTouchBarItem") alloc] initWithIdentifier:identifier]; NSCustomTouchBarItem* item = [(NSCustomTouchBarItem *)[NSClassFromString(@"NSCustomTouchBarItem") alloc] initWithIdentifier:identifier];
-7
View File
@@ -6,14 +6,7 @@
// Copyright © 2016 Sparkle Project. All rights reserved. // Copyright © 2016 Sparkle Project. All rights reserved.
// //
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#import <Sparkle/SUExport.h> #import <Sparkle/SUExport.h>
/** /**
+1 -1
View File
@@ -77,7 +77,7 @@
BOOL isPackage = NO; BOOL isPackage = NO;
// install source could point to a new bundle or a package // install source could point to a new bundle or a package
NSString *installSource = [SUInstaller installSourcePathInUpdateFolder:updateDirectory forHost:host isPackage:&isPackage isGuided:NULL]; NSString *installSource = [SUInstaller installSourcePathInUpdateFolder:updateDirectory forHost:host isPackage:&isPackage];
if (installSource == nil) { if (installSource == nil) {
if (error != NULL) { if (error != NULL) {
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUValidationError userInfo:@{ NSLocalizedDescriptionKey: @"No suitable install is found in the update. The update will be rejected." }]; *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUValidationError userInfo:@{ NSLocalizedDescriptionKey: @"No suitable install is found in the update. The update will be rejected." }];
-7
View File
@@ -9,14 +9,7 @@
#ifndef SUUPDATER_H #ifndef SUUPDATER_H
#define SUUPDATER_H #define SUUPDATER_H
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#import <Sparkle/SUExport.h> #import <Sparkle/SUExport.h>
#import <Sparkle/SUVersionComparisonProtocol.h> #import <Sparkle/SUVersionComparisonProtocol.h>
#import <Sparkle/SUVersionDisplayProtocol.h> #import <Sparkle/SUVersionDisplayProtocol.h>
-7
View File
@@ -6,14 +6,7 @@
// Copyright © 2016 Sparkle Project. All rights reserved. // Copyright © 2016 Sparkle Project. All rights reserved.
// //
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#import <Sparkle/SUExport.h> #import <Sparkle/SUExport.h>
@protocol SUVersionComparison, SUVersionDisplay; @protocol SUVersionComparison, SUVersionDisplay;
-7
View File
@@ -9,14 +9,7 @@
#ifndef SUVERSIONCOMPARISONPROTOCOL_H #ifndef SUVERSIONCOMPARISONPROTOCOL_H
#define SUVERSIONCOMPARISONPROTOCOL_H #define SUVERSIONCOMPARISONPROTOCOL_H
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#ifdef BUILDING_SPARKLE_TOOL #ifdef BUILDING_SPARKLE_TOOL
// Ignore incorrect warning // Ignore incorrect warning
-7
View File
@@ -6,14 +6,7 @@
// Copyright 2009 Elgato Systems GmbH. All rights reserved. // Copyright 2009 Elgato Systems GmbH. All rights reserved.
// //
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#else
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#endif
#import <Sparkle/SUExport.h> #import <Sparkle/SUExport.h>
/** /**
+3 -8
View File
@@ -128,14 +128,9 @@ static WKUserScript *_userScriptWithInjectedStyleSource(NSString *styleSource)
// Unfortunately we have to rely on a private API // Unfortunately we have to rely on a private API
// FB7539179: https://github.com/feedback-assistant/reports/issues/81 | https://bugs.webkit.org/show_bug.cgi?id=155550 // FB7539179: https://github.com/feedback-assistant/reports/issues/81 | https://bugs.webkit.org/show_bug.cgi?id=155550
// But it seems like others are already relying on it, passed App Review, and apps couldn't be broken due to compatibility // But it seems like others are already relying on it, passed App Review, and apps couldn't be broken due to compatibility
if (@available(macOS 10.12, *)) { // Note: before we were using _setDrawsTransparentBackground < macOS 10.12
if ([self.webView respondsToSelector:@selector(_setDrawsBackground:)]) { if ([self.webView respondsToSelector:@selector(_setDrawsBackground:)]) {
[self.webView _setDrawsBackground:drawsBackground]; [self.webView _setDrawsBackground:drawsBackground];
}
} else {
if ([self.webView respondsToSelector:@selector(_setDrawsTransparentBackground:)]) {
[self.webView _setDrawsTransparentBackground:!drawsBackground];
}
} }
self.drawsWebViewBackground = drawsBackground; self.drawsWebViewBackground = drawsBackground;
+1 -1
View File
@@ -1,5 +1,5 @@
/* Class = "NSWindow"; title = "Software Update"; ObjectID = "5"; */ /* Class = "NSWindow"; title = "Software Update"; ObjectID = "5"; */
"5.title" = "Software Update"; "5.title" = "Ενημέρωση προγράμματος";
/* Class = "NSTextFieldCell"; title = "Release Notes:"; ObjectID = "170"; */ /* Class = "NSTextFieldCell"; title = "Release Notes:"; ObjectID = "170"; */
"170.title" = "Σημειώσεις Έκδοσης:"; "170.title" = "Σημειώσεις Έκδοσης:";
+4 -4
View File
@@ -5,16 +5,16 @@
"45.title" = "Text Cell"; "45.title" = "Text Cell";
/* Class = "NSTextFieldCell"; title = "Anonymous system profile information is used to help us plan future development work. Please contact us if you have any questions about this.\n\nThis is the information that would be sent:"; ObjectID = "183"; */ /* Class = "NSTextFieldCell"; title = "Anonymous system profile information is used to help us plan future development work. Please contact us if you have any questions about this.\n\nThis is the information that would be sent:"; ObjectID = "183"; */
"183.title" = "Το ανώνυμο προφίλ συστήματος χρησιμοποιείται για να μας βοηθήσει σε μελλοντική ανάπτυξη του προγράμματος. Παρακαλώ επικοινωνήστε μαζί μας άν έχετε ερωτήσεις.\n\nΑυτές είναι οι πληροφορίες που θα σταλούν:"; "183.title" = "Οι ανώνυμες πληροφορίες του προφίλ του συστήματός σας, μας βοηθούν στο σχεδιασμό της μελλοντικής ανάπτυξης του προγράμματος. Παρακαλώ επικοινωνήστε μαζί μας άν έχετε ερωτήσεις.\n\nΑυτές είναι οι πληροφορίες που θα σταλούν σε εμάς:";
/* Class = "NSButtonCell"; title = "Don’t Check"; ObjectID = "cCJ-V0-aTi"; */ /* Class = "NSButtonCell"; title = "Don’t Check"; ObjectID = "cCJ-V0-aTi"; */
"cCJ-V0-aTi.title" = "Μή έλεγχος"; "cCJ-V0-aTi.title" = "Κανένας έλεγχος";
/* Class = "NSTextFieldCell"; title = "Check for updates automatically?"; ObjectID = "gmh-T4-BO0"; */ /* Class = "NSTextFieldCell"; title = "Check for updates automatically?"; ObjectID = "gmh-T4-BO0"; */
"gmh-T4-BO0.title" = "Αυτόματος έλεγχος για ενημερώσεις;"; "gmh-T4-BO0.title" = "Αυτόματος έλεγχος για ενημερώσεις;";
/* Class = "NSButtonCell"; title = "Include anonymous system profile"; ObjectID = "gz7-LM-gNf"; */ /* Class = "NSButtonCell"; title = "Include anonymous system profile"; ObjectID = "gz7-LM-gNf"; */
"gz7-LM-gNf.title" = "Αποστολή ανώνυμου προφίλ συστήματος"; "gz7-LM-gNf.title" = "Συμπερίληψη του ανώνυμου προφίλ του συστήματός σας";
/* Class = "NSButtonCell"; title = "Check Automatically"; ObjectID = "OhZ-1K-DmA"; */ /* Class = "NSButtonCell"; title = "Check Automatically"; ObjectID = "OhZ-1K-DmA"; */
"OhZ-1K-DmA.title" = "Έλεγχος Αυτόματα"; "OhZ-1K-DmA.title" = "Αυτόματος Ελεγχος";
+5 -5
View File
@@ -2,10 +2,10 @@
"%@ %@ is currently the newest version available." = "Το %1$@ %2$@ είναι η τελευταία διαθέσιμη έκδοση."; "%@ %@ is currently the newest version available." = "Το %1$@ %2$@ είναι η τελευταία διαθέσιμη έκδοση.";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "Το %1$@ %2$@ είναι η τελευταία διαθέσιμη έκδοση.\n(Die derzeit installierte Version ist %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. */ /* Description text for SUUpdateAlert when the update is downloadable. */
"%@ %@ is now available—you have %@. Would you like to download it now?" = "Το %1$@ %2$@ είναι πλέον διαθέσιμο--έχετε το %3$@. Θέλετε να το κατεβάσετε τώρα;"; "%@ %@ is now available—you have %@. Would you like to download it now?" = "Το %1$@ %2$@ είναι η νέα έκδοση--έχετε την %3$@. Θέλετε να την κατεβάσετε τώρα;";
/* The download progress in a unit of bytes, e.g. 100 KB */ /* The download progress in a unit of bytes, e.g. 100 KB */
"%@ downloaded" = "%@ λήφθησαν"; "%@ downloaded" = "%@ λήφθησαν";
@@ -14,7 +14,7 @@
"%@ of %@" = "%1$@ από %2$@"; "%@ of %@" = "%1$@ από %2$@";
/* Description text for SUUpdateAlert when the update has already been downloaded and ready to install. */ /* Description text for SUUpdateAlert when the update has already been downloaded and ready to install. */
"%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "Το %1$@ %2$@ έχει ληφθεί και είναι έτοιμο προς χρήση! Θα θέλατε να το εγκαταστήσετε και να επανεκκινήσετε το %1$@ τώρα;"; "%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "Το %1$@ %2$@ κατέβηκε. Είναι έτοιμο προς εγκατάσταση! Θέλετε να εγκαταστήσετε και να επανεκκινήσετε το %1$@ τώρα;";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"%1$@ can’t be updated, because it was opened from a read-only or a temporary location." = "Το %1$@ δεν μπορεί να ενημερωθεί όσο τρέχει από έναν δίσκο ανάγνωσης-μόνο ή έναν οπτικό δίσκο."; "%1$@ can’t be updated, because it was opened from a read-only or a temporary location." = "Το %1$@ δεν μπορεί να ενημερωθεί όσο τρέχει από έναν δίσκο ανάγνωσης-μόνο ή έναν οπτικό δίσκο.";
@@ -65,7 +65,7 @@
"Ready to Install" = "Έτοιμο προς Εγκατάσταση"; "Ready to Install" = "Έτοιμο προς Εγκατάσταση";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"Should %1$@ automatically check for updates? You can always check for updates manually from the %1$@ menu." = "Θέλετε το %1$@ να ελέγχει αυτόματα για ενημερώσεις; Μπορείτε πάντα να ελέγχετε για ενημερώσεις χειροκίνητα από το μενού %1$@."; "Should %1$@ automatically check for updates? You can always check for updates manually from the %1$@ menu." = "Θέλετε το %1$@ να ελέγχει αυτόματα για ενημερώσεις; Μπορείτε να ελέγχετε πάντα για επιθυμητές ενημερώσεις από το μενού %1$@.";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"Update Error!" = "Σφάλμα Ενημέρωσης!"; "Update Error!" = "Σφάλμα Ενημέρωσης!";
@@ -74,7 +74,7 @@
"Updating %@" = "Ενημέρωση %@"; "Updating %@" = "Ενημέρωση %@";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"Use Finder to copy %1$@ to the Applications folder, relaunch it from there, and try again." = "Μεταφέρετε το %1$@ στον φάκελο εφαρμογών σας, επανεκκινήστε το από εκεί, και ξαναδοκιμάστε."; "Use Finder to copy %1$@ to the Applications folder, relaunch it from there, and try again." = "Αντιγράψτε το %1$@ στον φάκελο εφαρμογών συστήματος, επανεκκινήστε το από εκεί και ξαναδοκιμάστε.";
/* Status message shown when the user checks for updates but is already current or the feed doesn't contain any updates. */ /* 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!" = "Είστε ενημερωμένοι!";
+1 -1
View File
@@ -1,5 +1,5 @@
/* Class = "NSWindow"; title = "Software Update"; ObjectID = "5"; */ /* Class = "NSWindow"; title = "Software Update"; ObjectID = "5"; */
"5.title" = "Aggiormento Software"; "5.title" = "Aggiornamento Software";
/* Class = "NSTextFieldCell"; title = "Release Notes:"; ObjectID = "170"; */ /* Class = "NSTextFieldCell"; title = "Release Notes:"; ObjectID = "170"; */
"170.title" = "Note di rilascio:"; "170.title" = "Note di rilascio:";
+79 -10
View File
@@ -1,26 +1,50 @@
/* Description text for SUUpdateAlert when the critical update has already been downloaded and ready to install. */
"%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$@ è stato scaricato ed è pronto per essere utilizzato! Questo è un aggiornamento importante; desideri installare e riavviare %1$@ ora?";
/* Description text for SUUpdateAlert when the update has already been downloaded and ready to install. */
"%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "%1$@ %2$@ è stato scaricato ed è pronto per essere utilizzato! Desideri installare e riavviare %1$@ ora?";
/* No comment provided by engineer. */
"%1$@ %2$@ is available but your macOS version is too new for this update. This update only supports up to macOS %3$@." = "%1$@ %2$@ è disponibile ma la tua versione di macOS è troppo recente per questo aggiornamento. Questo aggiornamento supporta solo fino a macOS %3$@.";
/* No comment provided by engineer. */
"%1$@ %2$@ is available but your macOS version is too old to install it. At least macOS %3$@ is required." = "%1$@ %2$@ è disponibile ma la tua versione di macOS è troppo vecchia per installarla. È richiesto almeno macOS %3$@.";
/* No comment provided by engineer. */
"%1$@ can’t be updated if it’s running from the location it was downloaded to." = "%1$@ non può essere aggiornata se è in esecuzione dalla posizione in cui è stato scaricata.";
/* No comment provided by engineer. */
"%1$@ can’t be updated, because it was opened from a read-only or a temporary location." = "%1$@ non può essere aggiornata perché è stata aperta da una posizione di sola lettura o temporanea.";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"%@ %@ is currently the newest version available." = "%1$@ %2$@ è la versione più recente attualmente disponibile."; "%@ %@ is currently the newest version available." = "%1$@ %2$@ è la versione più recente attualmente disponibile.";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ è la versione più recente attualmente disponibile.\n(You are currently running version %3$@.)"; "%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ è la versione più recente attualmente disponibile.\n(Attualmente stai utilizzando la versione %3$@)";
/* Description text for SUUpdateAlert when the critical update is downloadable. */
"%@ %@ is now available—you have %@. This is an important update; would you like to download it now?" = "%1$@ %2$@ è disponibile; disponi della versione %3$@. Questo è un aggiornamento importante; desideri eseguire l’aggiornamento ora?";
/* Description text for SUUpdateAlert when the update is downloadable. */ /* Description text for SUUpdateAlert when the update is downloadable. */
"%@ %@ is now available—you have %@. Would you like to download it now?" = "%1$@ %2$@ è disponbile; disponi della versione %3$@. Desideri eseguire l’aggiornamento ora?"; "%@ %@ is now available—you have %@. Would you like to download it now?" = "%1$@ %2$@ è disponibile; disponi della versione %3$@. Desideri eseguire l’aggiornamento ora?";
/* 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$@ è disponibile; disponi della versione %3$@. Desideri ulteriori informazioni su questo aggiornamento sul web?";
/* The download progress in a unit of bytes, e.g. 100 KB */ /* The download progress in a unit of bytes, e.g. 100 KB */
"%@ downloaded" = "%@ scaricato"; "%@ downloaded" = "%@ scaricato";
/* No comment provided by engineer. */
"%@ is now updated to version %@!" = "%1$@ ora è aggiornata alla versione %2$@!";
/* No comment provided by engineer. */
"%@ is now updated!" = "%@ ora è aggiornata!";
/* The download progress in units of bytes, e.g. 100 KB of 1,0 MB */ /* The download progress in units of bytes, e.g. 100 KB of 1,0 MB */
"%@ of %@" = "%1$@ di %2$@"; "%@ of %@" = "%1$@ di %2$@";
/* Description text for SUUpdateAlert when the update has already been downloaded and ready to install. */
"%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "%1$@ %2$@ è stato scaricato ed è pronto per essere utilizzato! Desideri installare e riavviare %1$@ ora?";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"%1$@ can’t be updated, because it was opened from a read-only or a temporary location." = "Impossibile aggiornare %1$@ quando viene eseguito da un volume di sola lettura come un’immagine disco o un’unità ottica."; "A new version of %@ is available!" = "È disponibile una nuova versione di %@!";
/* No comment provided by engineer. */
"A new version of %@ is available!" = "E’ disponibile una nuova versione di %@!";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"A new version of %@ is ready to install!" = "Una nuova versione di %@ è pronta per essere installata!"; "A new version of %@ is ready to install!" = "Una nuova versione di %@ è pronta per essere installata!";
@@ -28,15 +52,30 @@
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"An error occurred in retrieving update information. Please try again later." = "Si è verificato un errore durante il recupero delle informazioni sull’aggiornamento. Riprova in seguito."; "An error occurred in retrieving update information. Please try again later." = "Si è verificato un errore durante il recupero delle informazioni sull’aggiornamento. Riprova in seguito.";
/* No comment provided by engineer. */
"An error occurred while connecting to the installer. Please try again later." = "Si è verificato un errore durante la connessione al programma di installazione. Riprova in seguito.";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"An error occurred while downloading the update. Please try again later." = "Si è verificato un errore durante lo scaricamento dell’aggiornamento. Riprova in seguito."; "An error occurred while downloading the update. Please try again later." = "Si è verificato un errore durante lo scaricamento dell’aggiornamento. Riprova in seguito.";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"An error occurred while extracting the archive. Please try again later." = "Si è verificato un errore durante l’estrazione dell’archivio. Riprova in seguito."; "An error occurred while extracting the archive. Please try again later." = "Si è verificato un errore durante l’estrazione dell’archivio. Riprova in seguito.";
/* No comment provided by engineer. */
"An error occurred while launching the installer. Please try again later." = "Si è verificato un errore durante l’avvio del programma di installazione. Riprova in seguito.";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"An error occurred while parsing the update feed." = "Si è verificato un errore durante la lettura del feed di aggiornamento."; "An error occurred while parsing the update feed." = "Si è verificato un errore durante la lettura del feed di aggiornamento.";
/* No comment provided by engineer. */
"An error occurred while running the updater. Please try again later." = "Si è verificato un errore durante l’esecuzione del programma di aggiornamento. Riprova in seguito.";
/* No comment provided by engineer. */
"An error occurred while starting the installer. Please try again later." = "Si è verificato un errore durante l’avvio del programma di installazione. Riprova in seguito.";
/* No comment provided by engineer. */
"An important update to %@ is ready to install" = "Un importante aggiornamento di %@ è pronto per l’installazione";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"Cancel" = "Annulla"; "Cancel" = "Annulla";
@@ -52,9 +91,15 @@
/* Take care not to overflow the status window. */ /* Take care not to overflow the status window. */
"Extracting update…" = "Estrazione dell’aggiornamento…"; "Extracting update…" = "Estrazione dell’aggiornamento…";
/* No comment provided by engineer. */
"Failed to resume installing update." = "Impossibile riprendere l’installazione dell’aggiornamento.";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"Install and Relaunch" = "Installa e Riavvia"; "Install and Relaunch" = "Installa e Riavvia";
/* Alternate title for 'Remind Me Later' button when downloaded updates can be resumed */
"Install on Quit" = "Installa all’uscita";
/* Take care not to overflow the status window. */ /* Take care not to overflow the status window. */
"Installing update…" = "Installazione aggiornamento in corso…"; "Installing update…" = "Installazione aggiornamento in corso…";
@@ -64,20 +109,44 @@
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"OK" = "OK"; "OK" = "OK";
/* No comment provided by engineer. */
"Quit %1$@, move it into your Applications folder, relaunch it from there and try again." = "Esci da %1$@, spostala nella Cartella Applicazioni, riavviala da lì e riprova.";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"Ready to Install" = "Pronto per l’installazione"; "Ready to Install" = "Pronto per l’installazione";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"Should %1$@ automatically check for updates? You can always check for updates manually from the %1$@ menu." = "Desideri che %1$@ verifichi gli aggiornamenti automaticamente? Puoi effettuare la verifica manualmente dal menu di %1$@."; "Should %1$@ automatically check for updates? You can always check for updates manually from the %1$@ menu." = "Desideri che %1$@ verifichi gli aggiornamenti automaticamente? Puoi effettuare la verifica manualmente dal menu di %1$@.";
/* No comment provided by engineer. */
"The update checker failed to start correctly. You should contact the app developer to report this issue and verify that you have the latest version." = "Il controllo degli aggiornamenti non è stato avviato correttamente. È necessario contattare lo sviluppatore dell’app per segnalare questo problema e verificare di disporre della versione più recente.";
/* No comment provided by engineer. */
"The update is improperly signed and could not be validated. Please try again later or contact the app developer." = "L’aggiornamento è firmato in modo errato e non può essere convalidato. Riprova in seguito o contatta lo sviluppatore dell’app.";
/* No comment provided by engineer. */
"Unable to Check For Updates" = "Impossibile controllare gli aggiornamenti";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"Update Error!" = "Errore di Aggiornamento!"; "Update Error!" = "Errore di Aggiornamento!";
/* No comment provided by engineer. */
"Update Installed" = "Aggiornamento installato";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"Updating %@" = "Aggiornamento di %@"; "Updating %@" = "Aggiornamento di %@";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"Use Finder to copy %1$@ to the Applications folder, relaunch it from there, and try again." = "Spostare %1$@ nella Cartella Applicazioni, riavviarlo e riprovare."; "Use Finder to copy %1$@ to the Applications folder, relaunch it from there, and try again." = "Spostare %1$@ nella Cartella Applicazioni, riavviarla e riprovare.";
/* No comment provided by engineer. */
"Version History" = "Cronologia versioni";
/* No comment provided by engineer. */
"Your macOS version is too new" = "La tua versione di macOS è troppo recente";
/* No comment provided by engineer. */
"Your macOS version is too old" = "La tua versione di macOS è troppo vecchia";
/* Status message shown when the user checks for updates but is already current or the feed doesn't contain any updates. */ /* 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!" = "La tua applicazione è aggiornata!"; "You’re up-to-date!" = "La tua applicazione è aggiornata!";
+26 -2
View File
@@ -32,7 +32,13 @@
"%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "%1$@ %2$@がダウンロードされました! 今すぐ %1$@ をインストールして再起動しますか?"; "%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "%1$@ %2$@がダウンロードされました! 今すぐ %1$@ をインストールして再起動しますか?";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"%1$@ can’t be updated if it’s running from the location it was downloaded to." = "この場所ではダウンロードされたアップデータを %1$@ に適用できません。"; "%1$@ %2$@ is available but your macOS version is too new for this update. This update only supports up to macOS %3$@." = "%1$@ %2$@が入手可能ですが、インストールするにはmacOSのバージョンが新しすぎます。このアップデートはmacOS %3$@までしか対応していません。";
/* No comment provided by engineer. */
"%1$@ %2$@ is available but your macOS version is too old to install it. At least macOS %3$@ is required." = "%1$@ %2$@が入手可能ですが、インストールするにはmacOSのバージョンが古すぎます。macOS %3$@以降が必要です。";
/* No comment provided by engineer. */
"%1$@ can’t be updated if it’s running from the location it was downloaded to." = "この場所ではダウンロードされたアップデータを%1$@に適用できません。";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"%1$@ can’t be updated, because it was opened from a read-only or a temporary location." = "%1$@は読み出し専用またはテンポラリな場所で開かれているためアップデートできません。"; "%1$@ can’t be updated, because it was opened from a read-only or a temporary location." = "%1$@は読み出し専用またはテンポラリな場所で開かれているためアップデートできません。";
@@ -104,7 +110,7 @@
"OK" = "OK"; "OK" = "OK";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"Quit %1$@, move it into your Applications folder, relaunch it from there and try again." = "%1$@ を終了させ、アプリケーションフォルダに移動の上再度お試しください。"; "Quit %1$@, move it into your Applications folder, relaunch it from there and try again." = "%1$@を終了させ、アプリケーションフォルダに移動の上再度お試しください。";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"Ready to Install" = "インストールできます"; "Ready to Install" = "インストールできます";
@@ -112,6 +118,15 @@
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"Should %1$@ automatically check for updates? You can always check for updates manually from the %1$@ menu." = " %1$@のアップデートを自動で確認しますか? アップデートは%1$@メニューから手動でいつでも確認することができます。"; "Should %1$@ automatically check for updates? You can always check for updates manually from the %1$@ menu." = " %1$@のアップデートを自動で確認しますか? アップデートは%1$@メニューから手動でいつでも確認することができます。";
/* No comment provided by engineer. */
"The update checker failed to start correctly. You should contact the app developer to report this issue and verify that you have the latest version." = "アップデートチェッカーが正しくスタートできませんでした。アプリケーション開発者に連絡をしてこの不具合を報告し、最新バージョンであることを確認してください。";
/* No comment provided by engineer. */
"The update is improperly signed and could not be validated. Please try again later or contact the app developer." = "アップデートの署名が不適切で認証できませんでした。あとでやり直すかアプリケーション開発者に連絡してください。";
/* No comment provided by engineer. */
"Unable to Check For Updates" = "アップデートを確認できませんでした";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"Update Error!" = "アップデートエラー!"; "Update Error!" = "アップデートエラー!";
@@ -124,5 +139,14 @@
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"Use Finder to copy %1$@ to the Applications folder, relaunch it from there, and try again." = "%1$@をアプリケーションフォルダに移動し、そこから再起動したあとやり直してください。"; "Use Finder to copy %1$@ to the Applications folder, relaunch it from there, and try again." = "%1$@をアプリケーションフォルダに移動し、そこから再起動したあとやり直してください。";
/* No comment provided by engineer. */
"Version History" = "バージョン履歴";
/* No comment provided by engineer. */
"Your macOS version is too new" = "このmacOSのバージョンは新しすぎます";
/* No comment provided by engineer. */
"Your macOS version is too old" = "このmacOSのバージョンは古すぎます";
/* Status message shown when the user checks for updates but is already current or the feed doesn't contain any updates. */ /* 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!" = "最新版を使用しています!";
+333 -13
View File
@@ -649,6 +649,133 @@ typedef void (^SUDeltaHandler)(NSFileManager *fileManager, NSString *sourceDirec
}]; }];
} }
- (void)testRegularLargerFileMoveWithNoWritablePermissionInSource
{
[self createAndApplyPatchWithHandler:^(NSFileManager *__unused fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
NSString *sourceFile = [sourceDirectory stringByAppendingPathComponent:@"A"];
NSString *destinationFile = [destinationDirectory stringByAppendingPathComponent:@"B"];
NSData *data = [self bigData2];
XCTAssertTrue([data writeToFile:sourceFile atomically:YES]);
XCTAssertTrue([data writeToFile:destinationFile atomically:YES]);
if (chmod([sourceFile fileSystemRepresentation], 0444) != 0) {
NSLog(@"Change Permission Error..");
XCTFail(@"Failed setting file permissions");
}
XCTAssertFalse([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
}];
}
- (void)testRegularLargerFileMoveWithNoWritablePermissionInDestination
{
[self createAndApplyPatchWithHandler:^(NSFileManager *__unused fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
NSString *sourceFile = [sourceDirectory stringByAppendingPathComponent:@"A"];
NSString *destinationFile = [destinationDirectory stringByAppendingPathComponent:@"B"];
NSData *data = [self bigData2];
XCTAssertTrue([data writeToFile:sourceFile atomically:YES]);
XCTAssertTrue([data writeToFile:destinationFile atomically:YES]);
if (chmod([destinationFile fileSystemRepresentation], 0444) != 0) {
NSLog(@"Change Permission Error..");
XCTFail(@"Failed setting file permissions");
}
XCTAssertFalse([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
}];
}
- (void)testRegularLargerFileMoveWithNoWritablePermissionInSourceAndOtherFileAtDestinationPresent
{
[self createAndApplyPatchWithHandler:^(NSFileManager *__unused fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
NSString *sourceFile = [sourceDirectory stringByAppendingPathComponent:@"A"];
NSString *destinationFile = [destinationDirectory stringByAppendingPathComponent:@"B"];
NSString *destinationFile2 = [destinationDirectory stringByAppendingPathComponent:@"A"];
NSData *data = [self bigData2];
XCTAssertTrue([data writeToFile:sourceFile atomically:YES]);
XCTAssertTrue([data writeToFile:destinationFile atomically:YES]);
XCTAssertTrue([[self bigData1] writeToFile:destinationFile2 atomically:YES]);
if (chmod([sourceFile fileSystemRepresentation], 0444) != 0) {
NSLog(@"Change Permission Error..");
XCTFail(@"Failed setting file permissions");
}
XCTAssertFalse([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
}];
}
- (void)testRegularLargerFileMoveWithNoWritablePermissionInDestinationAndOtherFileAtDestinationPresent
{
[self createAndApplyPatchWithHandler:^(NSFileManager *__unused fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
NSString *sourceFile = [sourceDirectory stringByAppendingPathComponent:@"A"];
NSString *destinationFile = [destinationDirectory stringByAppendingPathComponent:@"B"];
NSString *destinationFile2 = [destinationDirectory stringByAppendingPathComponent:@"A"];
NSData *data = [self bigData2];
XCTAssertTrue([data writeToFile:sourceFile atomically:YES]);
XCTAssertTrue([data writeToFile:destinationFile atomically:YES]);
XCTAssertTrue([[self bigData1] writeToFile:destinationFile2 atomically:YES]);
if (chmod([destinationFile fileSystemRepresentation], 0444) != 0) {
NSLog(@"Change Permission Error..");
XCTFail(@"Failed setting file permissions");
}
XCTAssertFalse([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
}];
}
- (void)testRegularLargerFileMoveWithNoWritablePermissionInSourceAndOtherFileAtSourcePresent
{
[self createAndApplyPatchWithHandler:^(NSFileManager *__unused fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
NSString *sourceFile = [sourceDirectory stringByAppendingPathComponent:@"A"];
NSString *destinationFile = [destinationDirectory stringByAppendingPathComponent:@"B"];
NSString *sourceFile2 = [destinationDirectory stringByAppendingPathComponent:@"B"];
NSData *data = [self bigData2];
XCTAssertTrue([data writeToFile:sourceFile atomically:YES]);
XCTAssertTrue([data writeToFile:destinationFile atomically:YES]);
XCTAssertTrue([[self bigData1] writeToFile:sourceFile2 atomically:YES]);
if (chmod([sourceFile fileSystemRepresentation], 0444) != 0) {
NSLog(@"Change Permission Error..");
XCTFail(@"Failed setting file permissions");
}
if (chmod([sourceFile2 fileSystemRepresentation], 0444) != 0) {
NSLog(@"Change Permission Error..");
XCTFail(@"Failed setting file permissions");
}
XCTAssertFalse([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
}];
}
- (void)testRegularLargerFileMoveWithNoWritablePermissionInDestinationAndOtherFileAtSourcePresent
{
[self createAndApplyPatchWithHandler:^(NSFileManager *__unused fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
NSString *sourceFile = [sourceDirectory stringByAppendingPathComponent:@"A"];
NSString *destinationFile = [destinationDirectory stringByAppendingPathComponent:@"B"];
NSString *sourceFile2 = [destinationDirectory stringByAppendingPathComponent:@"B"];
NSData *data = [self bigData2];
XCTAssertTrue([data writeToFile:sourceFile atomically:YES]);
XCTAssertTrue([data writeToFile:destinationFile atomically:YES]);
XCTAssertTrue([[self bigData1] writeToFile:sourceFile2 atomically:YES]);
if (chmod([destinationFile fileSystemRepresentation], 0444) != 0) {
NSLog(@"Change Permission Error..");
XCTFail(@"Failed setting file permissions");
}
XCTAssertFalse([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
}];
}
- (void)testSymbolicLinkMove - (void)testSymbolicLinkMove
{ {
[self createAndApplyPatchWithHandler:^(NSFileManager *fileManager, NSString *sourceDirectory, NSString *destinationDirectory) { [self createAndApplyPatchWithHandler:^(NSFileManager *fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
@@ -985,6 +1112,56 @@ typedef void (^SUDeltaHandler)(NSFileManager *fileManager, NSString *sourceDirec
}]; }];
} }
- (void)testBigFileChangeInDirectoriesWithContentChangeAndNoWritablePermissionInSource
{
[self createAndApplyPatchWithHandler:^(NSFileManager *fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
NSString *sourceA = [sourceDirectory stringByAppendingPathComponent:@"Contents/Hello/"];
NSString *destinationA = [destinationDirectory stringByAppendingPathComponent:@"Contents/Meek/"];
XCTAssertTrue([fileManager createDirectoryAtPath:sourceA withIntermediateDirectories:YES attributes:NULL error:NULL]);
XCTAssertTrue([fileManager createDirectoryAtPath:destinationA withIntermediateDirectories:YES attributes:NULL error:NULL]);
NSString *sourceFile = [sourceA stringByAppendingPathComponent:@"A"];
NSString *destinationFile = [destinationA stringByAppendingPathComponent:@"A"];
XCTAssertTrue([[self bigData1] writeToFile:sourceFile atomically:YES]);
XCTAssertTrue([[self bigData2] writeToFile:destinationFile atomically:YES]);
NSError *error = nil;
if (![fileManager setAttributes:@{NSFilePosixPermissions : @0444} ofItemAtPath:sourceFile error:&error]) {
NSLog(@"Change Permission Error: %@", error);
XCTFail(@"Failed setting file permissions");
}
XCTAssertFalse([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
}];
}
- (void)testBigFileChangeInDirectoriesWithContentChangeAndNoWritablePermissionInDestination
{
[self createAndApplyPatchWithHandler:^(NSFileManager *fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
NSString *sourceA = [sourceDirectory stringByAppendingPathComponent:@"Contents/Hello/"];
NSString *destinationA = [destinationDirectory stringByAppendingPathComponent:@"Contents/Meek/"];
XCTAssertTrue([fileManager createDirectoryAtPath:sourceA withIntermediateDirectories:YES attributes:NULL error:NULL]);
XCTAssertTrue([fileManager createDirectoryAtPath:destinationA withIntermediateDirectories:YES attributes:NULL error:NULL]);
NSString *sourceFile = [sourceA stringByAppendingPathComponent:@"A"];
NSString *destinationFile = [destinationA stringByAppendingPathComponent:@"A"];
XCTAssertTrue([[self bigData1] writeToFile:sourceFile atomically:YES]);
XCTAssertTrue([[self bigData2] writeToFile:destinationFile atomically:YES]);
NSError *error = nil;
if (![fileManager setAttributes:@{NSFilePosixPermissions : @0444} ofItemAtPath:destinationFile error:&error]) {
NSLog(@"Change Permission Error: %@", error);
XCTFail(@"Failed setting file permissions");
}
XCTAssertFalse([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
}];
}
- (void)testMultipleBigFileChangeInDirectoriesWithContentChange - (void)testMultipleBigFileChangeInDirectoriesWithContentChange
{ {
[self createAndApplyPatchWithHandler:^(NSFileManager *fileManager, NSString *sourceDirectory, NSString *destinationDirectory) { [self createAndApplyPatchWithHandler:^(NSFileManager *fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
@@ -1012,6 +1189,158 @@ typedef void (^SUDeltaHandler)(NSFileManager *fileManager, NSString *sourceDirec
}]; }];
} }
- (void)testSmallFileNoWritablePermissionInSourceWithNoContentChange
{
[self createAndApplyPatchWithHandler:^(NSFileManager *fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
NSString *sourceFile = [sourceDirectory stringByAppendingPathComponent:@"A"];
NSString *destinationFile = [destinationDirectory stringByAppendingPathComponent:@"A"];
XCTAssertTrue([[NSData dataWithBytes:@"lawl" length:4] writeToFile:sourceFile atomically:YES]);
XCTAssertTrue([[NSData dataWithBytes:@"lawl" length:4] writeToFile:destinationFile atomically:YES]);
NSError *error = nil;
if (![fileManager setAttributes:@{NSFilePosixPermissions : @0444} ofItemAtPath:sourceFile error:&error]) {
NSLog(@"Change Permission Error: %@", error);
XCTFail(@"Failed setting file permissions");
}
XCTAssertFalse([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
}];
}
- (void)testSmallFileNoWritablePermissionInDestinationWithNoContentChange
{
[self createAndApplyPatchWithHandler:^(NSFileManager *fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
NSString *sourceFile = [sourceDirectory stringByAppendingPathComponent:@"A"];
NSString *destinationFile = [destinationDirectory stringByAppendingPathComponent:@"A"];
XCTAssertTrue([[NSData dataWithBytes:@"lawl" length:4] writeToFile:sourceFile atomically:YES]);
XCTAssertTrue([[NSData dataWithBytes:@"lawl" length:4] writeToFile:destinationFile atomically:YES]);
NSError *error = nil;
if (![fileManager setAttributes:@{NSFilePosixPermissions : @0444} ofItemAtPath:destinationFile error:&error]) {
NSLog(@"Change Permission Error: %@", error);
XCTFail(@"Failed setting file permissions");
}
XCTAssertFalse([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
}];
}
- (void)testBigFileNoWritablePermissionInSourceWithNoContentChange
{
[self createAndApplyPatchWithHandler:^(NSFileManager *fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
NSString *sourceFile = [sourceDirectory stringByAppendingPathComponent:@"A"];
NSString *destinationFile = [destinationDirectory stringByAppendingPathComponent:@"A"];
XCTAssertTrue([[self bigData1] writeToFile:sourceFile atomically:YES]);
XCTAssertTrue([[self bigData1] writeToFile:destinationFile atomically:YES]);
NSError *error = nil;
if (![fileManager setAttributes:@{NSFilePosixPermissions : @0444} ofItemAtPath:sourceFile error:&error]) {
NSLog(@"Change Permission Error: %@", error);
XCTFail(@"Failed setting file permissions");
}
XCTAssertFalse([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
}];
}
- (void)testBigFileNoWritablePermissionInDestinationWithNoContentChange
{
[self createAndApplyPatchWithHandler:^(NSFileManager *fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
NSString *sourceFile = [sourceDirectory stringByAppendingPathComponent:@"A"];
NSString *destinationFile = [destinationDirectory stringByAppendingPathComponent:@"A"];
XCTAssertTrue([[self bigData1] writeToFile:sourceFile atomically:YES]);
XCTAssertTrue([[self bigData1] writeToFile:destinationFile atomically:YES]);
NSError *error = nil;
if (![fileManager setAttributes:@{NSFilePosixPermissions : @0444} ofItemAtPath:destinationFile error:&error]) {
NSLog(@"Change Permission Error: %@", error);
XCTFail(@"Failed setting file permissions");
}
XCTAssertFalse([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
}];
}
- (void)testSmallFileNoWritablePermissionInSourceWithContentChange
{
[self createAndApplyPatchWithHandler:^(NSFileManager *fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
NSString *sourceFile = [sourceDirectory stringByAppendingPathComponent:@"A"];
NSString *destinationFile = [destinationDirectory stringByAppendingPathComponent:@"A"];
XCTAssertTrue([[NSData data] writeToFile:sourceFile atomically:YES]);
XCTAssertTrue([[NSData dataWithBytes:@"lawl" length:4] writeToFile:destinationFile atomically:YES]);
NSError *error = nil;
if (![fileManager setAttributes:@{NSFilePosixPermissions : @0444} ofItemAtPath:sourceFile error:&error]) {
NSLog(@"Change Permission Error: %@", error);
XCTFail(@"Failed setting file permissions");
}
XCTAssertFalse([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
}];
}
- (void)testSmallFileNoWritablePermissionInDestinationWithContentChange
{
[self createAndApplyPatchWithHandler:^(NSFileManager *fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
NSString *sourceFile = [sourceDirectory stringByAppendingPathComponent:@"A"];
NSString *destinationFile = [destinationDirectory stringByAppendingPathComponent:@"A"];
XCTAssertTrue([[NSData data] writeToFile:sourceFile atomically:YES]);
XCTAssertTrue([[NSData dataWithBytes:@"lawl" length:4] writeToFile:destinationFile atomically:YES]);
NSError *error = nil;
if (![fileManager setAttributes:@{NSFilePosixPermissions : @0444} ofItemAtPath:destinationFile error:&error]) {
NSLog(@"Change Permission Error: %@", error);
XCTFail(@"Failed setting file permissions");
}
XCTAssertFalse([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
}];
}
- (void)testBigFileNoWritablePermissionInSourceWithContentChange
{
[self createAndApplyPatchWithHandler:^(NSFileManager *fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
NSString *sourceFile = [sourceDirectory stringByAppendingPathComponent:@"A"];
NSString *destinationFile = [destinationDirectory stringByAppendingPathComponent:@"A"];
XCTAssertTrue([[self bigData1] writeToFile:sourceFile atomically:YES]);
XCTAssertTrue([[self bigData2] writeToFile:destinationFile atomically:YES]);
NSError *error = nil;
if (![fileManager setAttributes:@{NSFilePosixPermissions : @0444} ofItemAtPath:sourceFile error:&error]) {
NSLog(@"Change Permission Error: %@", error);
XCTFail(@"Failed setting file permissions");
}
XCTAssertFalse([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
}];
}
- (void)testBigFileNoWritablePermissionInDestinationWithContentChange
{
[self createAndApplyPatchWithHandler:^(NSFileManager *fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
NSString *sourceFile = [sourceDirectory stringByAppendingPathComponent:@"A"];
NSString *destinationFile = [destinationDirectory stringByAppendingPathComponent:@"A"];
XCTAssertTrue([[self bigData1] writeToFile:sourceFile atomically:YES]);
XCTAssertTrue([[self bigData2] writeToFile:destinationFile atomically:YES]);
NSError *error = nil;
if (![fileManager setAttributes:@{NSFilePosixPermissions : @0444} ofItemAtPath:destinationFile error:&error]) {
NSLog(@"Change Permission Error: %@", error);
XCTFail(@"Failed setting file permissions");
}
XCTAssertFalse([self testDirectoryHashEqualityWithSource:sourceDirectory destination:destinationDirectory]);
}];
}
- (void)testFileSystemCompression - (void)testFileSystemCompression
{ {
[self createAndApplyPatchWithBeforeDiffHandler:^(NSFileManager *__unused fileManager, NSString *sourceDirectory, NSString *destinationDirectory) { [self createAndApplyPatchWithBeforeDiffHandler:^(NSFileManager *__unused fileManager, NSString *sourceDirectory, NSString *destinationDirectory) {
@@ -1029,23 +1358,14 @@ typedef void (^SUDeltaHandler)(NSFileManager *fileManager, NSString *sourceDirec
} }
NSTask *dittoTask = [[NSTask alloc] init]; NSTask *dittoTask = [[NSTask alloc] init];
dittoTask.executableURL = [NSURL fileURLWithPath:@"/usr/bin/ditto" isDirectory:NO];
if (@available(macOS 10.13, *)) {
dittoTask.executableURL = [NSURL fileURLWithPath:@"/usr/bin/ditto" isDirectory:NO];
} else {
dittoTask.launchPath = @"/usr/bin/ditto";
}
dittoTask.arguments = @[@"--hfsCompression", destinationFile, destinationFile2]; dittoTask.arguments = @[@"--hfsCompression", destinationFile, destinationFile2];
NSError *launchError = nil; NSError *launchError = nil;
if (@available(macOS 10.13, *)) { BOOL launched = [dittoTask launchAndReturnError:&launchError];
BOOL launched = [dittoTask launchAndReturnError:&launchError]; if (!launched) {
if (!launched) { XCTFail(@"Failed to launch ditto: %@", launchError);
XCTFail(@"Failed to launch ditto: %@", launchError);
}
} else {
[dittoTask launch];
} }
[dittoTask waitUntilExit]; [dittoTask waitUntilExit];
-2
View File
@@ -134,8 +134,6 @@ class SUUnarchiverTest: XCTestCase
{ {
self.unarchiveTestAppWithExtension("pkg", resourceName: "test", expectingInstallationType: SPUInstallationTypeGuidedPackage) self.unarchiveTestAppWithExtension("pkg", resourceName: "test", expectingInstallationType: SPUInstallationTypeGuidedPackage)
self.unarchiveTestAppWithExtension("pkg", resourceName: "test", expectingInstallationType: SPUInstallationTypeInteractivePackage, expectingSuccess: false)
self.unarchiveTestAppWithExtension("pkg", resourceName: "test", expectingInstallationType: SPUInstallationTypeApplication, expectingSuccess: false) self.unarchiveTestAppWithExtension("pkg", resourceName: "test", expectingInstallationType: SPUInstallationTypeApplication, expectingSuccess: false)
} }
} }
+16 -10
View File
@@ -71,7 +71,7 @@ class ArchiveItem: CustomStringConvertible {
self.version = version self.version = version
self._shortVersion = shortVersion self._shortVersion = shortVersion
self.feedURL = feedURL self.feedURL = feedURL
self.minimumSystemVersion = minimumSystemVersion ?? "10.11" self.minimumSystemVersion = minimumSystemVersion ?? "10.13"
self.frameworkVersion = frameworkVersion self.frameworkVersion = frameworkVersion
self.archivePath = archivePath self.archivePath = archivePath
self.appPath = appPath self.appPath = appPath
@@ -138,18 +138,24 @@ class ArchiveItem: CustomStringConvertible {
} }
var frameworkVersion: String? = nil var frameworkVersion: String? = nil
if let appBundle = Bundle(url: appPath), let frameworksURL = appBundle.privateFrameworksURL { do {
let sparkleBundleURL = frameworksURL.appendingPathComponent("Sparkle").appendingPathExtension("framework") let canonicalFrameworksURL = appPath.appendingPathComponent("Contents/Frameworks/Sparkle.framework")
if let sparkleBundle = Bundle(url: sparkleBundleURL), let infoDictionary = sparkleBundle.infoDictionary { let frameworksURL: URL?
frameworkVersion = infoDictionary[kCFBundleVersionKey as String] as? String if !FileManager.default.fileExists(atPath: canonicalFrameworksURL.path) {
} else {
// Try legacy SparkleCore framework that was shipping in early 2.0 betas // Try legacy SparkleCore framework that was shipping in early 2.0 betas
let sparkleCoreBundleURL = frameworksURL.appendingPathComponent("SparkleCore").appendingPathExtension("framework") let sparkleCoreFrameworksURL = appPath.appendingPathComponent("Contents/Frameworks/SparkleCore.framework")
if FileManager.default.fileExists(atPath: sparkleCoreFrameworksURL.path) {
if let sparkleBundle = Bundle(url: sparkleCoreBundleURL), let infoDictionary = sparkleBundle.infoDictionary { frameworksURL = sparkleCoreFrameworksURL
frameworkVersion = infoDictionary[kCFBundleVersionKey as String] as? String } else {
frameworksURL = nil
} }
} else {
frameworksURL = canonicalFrameworksURL
}
if let frameworksURL = frameworksURL, let frameworkInfoPlist = NSDictionary(contentsOf: frameworksURL.appendingPathComponent("Resources/Info.plist")) {
frameworkVersion = frameworkInfoPlist[kCFBundleVersionKey as String] as? String
} }
} }
+4
View File
@@ -33,6 +33,10 @@ extension FileHandle {
CC_SHA256_Final(hash.baseAddress, &context) CC_SHA256_Final(hash.baseAddress, &context)
defer {
hash.deallocate()
}
return hash.reduce("") { $0 + String(format: "%02x", $1) } return hash.reduce("") { $0 + String(format: "%02x", $1) }
} }
+39 -4
View File
@@ -59,8 +59,8 @@ struct GenerateAppcast: ParsableCommand {
@Option(help: ArgumentHelp("The account name in your keychain associated with your private EdDSA (ed25519) key to use for signing new updates.")) @Option(help: ArgumentHelp("The account name in your keychain associated with your private EdDSA (ed25519) key to use for signing new updates."))
var account : String = "ed25519" var account : String = "ed25519"
@Option(name: .customShort("s"), help: ArgumentHelp("The private EdDSA string (128 characters). If not specified, the private EdDSA key will be read from the Keychain instead.", valueName: "private-EdDSA-key")) @Option(name: .customLong("ed-key-file"), help: ArgumentHelp("Path to the private EdDSA key file. If not specified, the private EdDSA key will be read from the Keychain instead. '-' can be used to echo the EdDSA key from a 'secret' environment variable to the standard input stream. For example: echo \"$PRIVATE_KEY_SECRET\" | ./\(programName) --ed-key-file -", valueName: "private-EdDSA-key-file"))
var privateEdString : String? var privateEdKeyPath: String?
@Option(name: .customShort("f"), help: ArgumentHelp("Path to the private DSA key file. Only use this option for transitioning to EdDSA from older updates.", valueName: "private-dsa-key-file"), transform: { URL(fileURLWithPath: $0) }) @Option(name: .customShort("f"), help: ArgumentHelp("Path to the private DSA key file. Only use this option for transitioning to EdDSA from older updates.", valueName: "private-dsa-key-file"), transform: { URL(fileURLWithPath: $0) })
var privateDSAKeyURL: URL? var privateDSAKeyURL: URL?
@@ -68,6 +68,9 @@ struct GenerateAppcast: ParsableCommand {
@Option(name: .customShort("n"), help: ArgumentHelp("The name of the private DSA key. This option must be used together with `-k`. Only use this option for transitioning to EdDSA from older updates.", valueName: "dsa-key-name")) @Option(name: .customShort("n"), help: ArgumentHelp("The name of the private DSA key. This option must be used together with `-k`. Only use this option for transitioning to EdDSA from older updates.", valueName: "dsa-key-name"))
var privateDSAKeyName: String? var privateDSAKeyName: String?
@Option(name: .customShort("s"), help: ArgumentHelp("(DEPRECATED): The private EdDSA string (128 characters). This option is deprecated. Please use the Keychain, or pass the key as standard input when using the --ed-key-file - option instead.", valueName: "private-EdDSA-key"))
var privateEdString : String?
@Option(name: .customShort("k"), help: ArgumentHelp("The path to the keychain to look up the private DSA key. This option must be used together with `-n`. Only use this option for transitioning to EdDSA from older updates.", valueName: "keychain-for-dsa"), transform: { URL(fileURLWithPath: $0) }) @Option(name: .customShort("k"), help: ArgumentHelp("The path to the keychain to look up the private DSA key. This option must be used together with `-n`. Only use this option for transitioning to EdDSA from older updates.", valueName: "keychain-for-dsa"), transform: { URL(fileURLWithPath: $0) })
var keychainURL: URL? var keychainURL: URL?
@@ -147,7 +150,7 @@ struct GenerateAppcast: ParsableCommand {
If the contents of these files are short (< \(DEFAULT_MAX_CDATA_THRESHOLD) characters) and do not include a DOCTYPE or body tags, they will be treated as embedded CDATA release notes. If the contents of these files are short (< \(DEFAULT_MAX_CDATA_THRESHOLD) characters) and do not include a DOCTYPE or body tags, they will be treated as embedded CDATA release notes.
For new update entries, Sparkle infers the minimum system OS requirement based on your update's LSMinimumSystemVersion provided For new update entries, Sparkle infers the minimum system OS requirement based on your update's LSMinimumSystemVersion provided
by your application's Info.plist. If none is found, \(programName) defaults to Sparkle's own minimum system requirement (macOS 10.11). by your application's Info.plist. If none is found, \(programName) defaults to Sparkle's own minimum system requirement (macOS 10.13).
An example of an archives directory may look like: An example of an archives directory may look like:
./my-app-release-zipfiles/ ./my-app-release-zipfiles/
@@ -178,6 +181,10 @@ struct GenerateAppcast: ParsableCommand {
throw ValidationError("-f <private-dsa-key-file> cannot be provided if -n <dsa-key-name> and -k <keychain> is provided") throw ValidationError("-f <private-dsa-key-file> cannot be provided if -n <dsa-key-name> and -k <keychain> is provided")
} }
guard (privateEdKeyPath == nil) || (privateEdString == nil) else {
throw ValidationError("--ed-key-file <private-EdDSA-key-file> cannot be provided if -s <private-EdDSA-key> is provided")
}
if let versions = versions { if let versions = versions {
guard versions.count > 0 else { guard versions.count > 0 else {
throw ValidationError("--versions must specify at least one application version.") throw ValidationError("--versions must specify at least one application version.")
@@ -220,7 +227,35 @@ struct GenerateAppcast: ParsableCommand {
privateDSAKey = nil privateDSAKey = nil
} }
let keys = loadPrivateKeys(account, privateDSAKey, privateEdString) let privateEdKeyString: String?
if let privateEdString = privateEdString {
privateEdKeyString = privateEdString
print("Warning: The -s option for passing the private EdDSA key is insecure and deprecated. Please see its help usage for more information.")
} else if let privateEdKeyPath = privateEdKeyPath {
do {
let privateKeyString: String
if privateEdKeyPath == "-" && !FileManager.default.fileExists(atPath: privateEdKeyPath) {
if let line = readLine(strippingNewline: true) {
privateKeyString = line
} else {
print("Unable to read EdDSA private key from standard input")
throw ExitCode(1)
}
} else {
privateKeyString = try String(contentsOf: URL(fileURLWithPath: privateEdKeyPath))
}
privateEdKeyString = privateKeyString
} catch {
print("Unable to load EdDSA private key from", privateEdKeyPath, "\n", error)
throw ExitCode(1)
}
} else {
privateEdKeyString = nil
}
let keys = loadPrivateKeys(account, privateDSAKey, privateEdKeyString)
do { do {
let allUpdates = try makeAppcast(archivesSourceDir: archivesSourceDir, cacheDirectory: GenerateAppcast.cacheDirectory, keys: keys, versions: versions, maximumDeltas: maximumDeltas, deltaCompressionModeDescription: deltaCompression, deltaCompressionLevel: deltaCompressionLevel, disableNestedCodeCheck: disableNestedCodeCheck, verbose: verbose) let allUpdates = try makeAppcast(archivesSourceDir: archivesSourceDir, cacheDirectory: GenerateAppcast.cacheDirectory, keys: keys, versions: versions, maximumDeltas: maximumDeltas, deltaCompressionModeDescription: deltaCompression, deltaCompressionLevel: deltaCompressionLevel, disableNestedCodeCheck: disableNestedCodeCheck, verbose: verbose)
Loaded 100 of 103 files, more files were not shown because too many files have changed in this diff. Show more