mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-22 04:30:47 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6496a74a0 | ||
|
|
4ba9745eca | ||
|
|
1ec540d537 | ||
|
|
d46d456107 | ||
|
|
00e7c24b6a | ||
|
|
e6a344a570 | ||
|
|
6276ba2b40 | ||
|
|
113279a21f | ||
|
|
7c4741d762 | ||
|
|
5df807d5ac | ||
|
|
c6ab245eba | ||
|
|
6e370a5ab8 | ||
|
|
cbdc150cfb | ||
|
|
fe7b718d07 | ||
|
|
d2b796bc3e | ||
|
|
2f33f56afb | ||
|
|
f27a02f068 | ||
|
|
1520cda1bd |
No files matched your search
@@ -97,6 +97,7 @@ static const NSTimeInterval SUDisplayProgressTimeDelay = 0.7;
|
||||
|
||||
// Setting _performedStage1Installation on main thread must be synchronzied with reading it from new connection handler
|
||||
BOOL _performedStage1Installation;
|
||||
BOOL _receivedAppcastItemData;
|
||||
|
||||
BOOL _performedStage2Installation;
|
||||
BOOL _performedStage3Installation;
|
||||
@@ -142,9 +143,9 @@ static const NSTimeInterval SUDisplayProgressTimeDelay = 0.7;
|
||||
BOOL connectionCodeSigningValidationSkipped = NO;
|
||||
#endif
|
||||
|
||||
// It's safe to allow any connections once stage 1 installation is complete
|
||||
// It's safe to allow any connections once stage 1 installation is complete and appcast data has been received.
|
||||
// This is to allow general updaters to resume the installation.
|
||||
if (!_performedStage1Installation) {
|
||||
if (!_performedStage1Installation || !_receivedAppcastItemData) {
|
||||
BOOL passesValidation;
|
||||
NSError *validationError = nil;
|
||||
SUValidateConnectionStatus status = [SUCodeSigningVerifier validateConnection:newConnection error:&validationError];
|
||||
@@ -597,15 +598,21 @@ static const NSTimeInterval SUDisplayProgressTimeDelay = 0.7;
|
||||
[self extractAndInstallUpdate];
|
||||
});
|
||||
} else if (identifier == SPUSentUpdateAppcastItemData) {
|
||||
SUAppcastItem *updateItem = (data != nil) ? (SUAppcastItem *)SPUUnarchiveRootObjectSecurely(data, [SUAppcastItem class]) : nil;
|
||||
if (updateItem != nil) {
|
||||
SPUInstallationInfo *installationInfo = [[SPUInstallationInfo alloc] initWithAppcastItem:updateItem];
|
||||
os_unfair_lock_lock(&_newConnectionLock);
|
||||
if (!_receivedAppcastItemData) {
|
||||
_receivedAppcastItemData = YES;
|
||||
|
||||
NSData *archivedData = SPUArchiveRootObjectSecurely(installationInfo);
|
||||
if (archivedData != nil) {
|
||||
[_agentConnection.agent registerInstallationInfoData:archivedData];
|
||||
SUAppcastItem *updateItem = (data != nil) ? (SUAppcastItem *)SPUUnarchiveRootObjectSecurely(data, [SUAppcastItem class]) : nil;
|
||||
if (updateItem != nil) {
|
||||
SPUInstallationInfo *installationInfo = [[SPUInstallationInfo alloc] initWithAppcastItem:updateItem];
|
||||
|
||||
NSData *archivedData = SPUArchiveRootObjectSecurely(installationInfo);
|
||||
if (archivedData != nil) {
|
||||
[_agentConnection.agent registerInstallationInfoData:archivedData];
|
||||
}
|
||||
}
|
||||
}
|
||||
os_unfair_lock_unlock(&_newConnectionLock);
|
||||
} else if (identifier == SPUResumeInstallationToStage2 && data.length == sizeof(uint8_t) * 2) {
|
||||
// Because anyone can ask us to resume the installation, it may be wise to think about backwards compatibility here if IPC changes
|
||||
uint8_t relaunch = *((const uint8_t *)data.bytes);
|
||||
|
||||
@@ -177,7 +177,8 @@ BOOL applyBinaryDelta(NSString *source, NSString *finalDestination, NSString *pa
|
||||
[archive enumerateItems:^(SPUDeltaArchiveItem *item, BOOL *stop) {
|
||||
NSString *relativePath = item.relativeFilePath;
|
||||
|
||||
if ([relativePath.pathComponents containsObject:@".."]) {
|
||||
NSArray<NSString *> *relativePathComponents = relativePath.pathComponents;
|
||||
if ([relativePathComponents containsObject:@".."]) {
|
||||
if (error != NULL) {
|
||||
*error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileWriteUnknownError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Relative path '%@' contains '..' path component", relativePath] }];
|
||||
}
|
||||
@@ -187,18 +188,40 @@ BOOL applyBinaryDelta(NSString *source, NSString *finalDestination, NSString *pa
|
||||
|
||||
NSString *sourceFilePath = [source stringByAppendingPathComponent:relativePath];
|
||||
NSString *destinationFilePath = [destination stringByAppendingPathComponent:relativePath];
|
||||
|
||||
{
|
||||
NSString *destinationParentDirectory = destinationFilePath.stringByDeletingLastPathComponent;
|
||||
NSDictionary<NSFileAttributeKey, id> *destinationParentDirectoryAttributes = [fileManager attributesOfItemAtPath:destinationParentDirectory error:NULL];
|
||||
|
||||
// It is OK for the directory parent to not exist if it has already been removed
|
||||
if (destinationParentDirectoryAttributes != nil) {
|
||||
// But if it does exist, make sure the entry in the parent directory we're looking at is good
|
||||
// If it's inside a symlink, this is not good in any circumstance
|
||||
NSString *fileType = destinationParentDirectoryAttributes[NSFileType];
|
||||
if ([fileType isEqualToString:NSFileTypeSymbolicLink]) {
|
||||
// Walk each intermediate directory component of relativePath, excluding the last component, and verify none are symlinks.
|
||||
NSUInteger relativePathComponentCount = relativePathComponents.count;
|
||||
NSString *cumulativePath = destination;
|
||||
for (NSUInteger relativePathComponentIndex = 0; relativePathComponentIndex + 1 < relativePathComponentCount; relativePathComponentIndex++) {
|
||||
cumulativePath = [cumulativePath stringByAppendingPathComponent:relativePathComponents[relativePathComponentIndex]];
|
||||
|
||||
char cumulativePathBuffer[PATH_MAX + 1] = {0};
|
||||
if (![cumulativePath getFileSystemRepresentation:cumulativePathBuffer maxLength:PATH_MAX]) {
|
||||
if (error != NULL) {
|
||||
*error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileWriteUnknownError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to create patch because '%@' cannot be a symbolic link.", destinationParentDirectory] }];
|
||||
*error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileWriteUnknownError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to create patch because '%@' cannot be converted to file system path.", cumulativePath] }];
|
||||
}
|
||||
*stop = YES;
|
||||
return;
|
||||
}
|
||||
|
||||
struct stat cumulativePathStat = {0};
|
||||
if (lstat(cumulativePathBuffer, &cumulativePathStat) != 0) {
|
||||
if (errno == ENOENT) {
|
||||
// Directory doesn't exist, so it can't be a symlink - safe to continue
|
||||
break;
|
||||
}
|
||||
|
||||
if (error != NULL) {
|
||||
*error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileWriteUnknownError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to create patch because failed to stat '%@' with error: %d", cumulativePath, errno] }];
|
||||
}
|
||||
*stop = YES;
|
||||
return;
|
||||
}
|
||||
|
||||
if (S_ISLNK(cumulativePathStat.st_mode)) {
|
||||
if (error != NULL) {
|
||||
*error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileWriteUnknownError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to create patch because '%@' cannot contain a symbolic link in its intermediate path.", destinationFilePath.stringByDeletingLastPathComponent] }];
|
||||
}
|
||||
*stop = YES;
|
||||
return;
|
||||
|
||||
@@ -471,7 +471,9 @@ finally:
|
||||
SecCodeRef code = NULL;
|
||||
OSStatus result = SecCodeCopyGuestWithAttributes(NULL, (__bridge CFDictionaryRef _Nullable)(attributes), kSecCSDefaultFlags, &code);
|
||||
if (result != errSecSuccess) {
|
||||
CFRelease(code);
|
||||
if (code != NULL) {
|
||||
CFRelease(code);
|
||||
}
|
||||
|
||||
if (error != NULL) {
|
||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInsufficientSigningError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"The client connection could not be validated because SecCodeCopyGuestWithAttributes() failed with error %d", result] }];
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
# 2.9.4
|
||||
|
||||
* Fix backgrounded apps sometimes not bringing windows from user initiated actions in active focus (#2890) (Zorg, wojciech-kulik)
|
||||
|
||||
# 2.9.3
|
||||
|
||||
* Fix updating not working the first time if the app's bundle ID ends with ".app" (#2882) (Zorg)
|
||||
|
||||
# 2.9.2
|
||||
|
||||
* Show hidden window title in update window for accessibility (#2871) (Zorg)
|
||||
* Polish and update Spanish translations to be gender neutral (#2874, #2875) (Emilio P Egido)
|
||||
* Guard against NULL CFRelease() on failure condition in fallback path (#2867) (Zorg)
|
||||
* Guard against symlinks when applying delta update files (fe7b718) (Zorg, fg0x0)
|
||||
* Enforce connection to installer to be validated before receiving appcast item data (#2876, #2877) (Zorg, fg0x0)
|
||||
|
||||
# 2.9.1
|
||||
|
||||
* Fix potential crash due to race condition within clearDownloadedUpdate (#2863) (Julian Pscheid)
|
||||
|
||||
+1
-1
@@ -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", "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", "2.2.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.2/Sparkle-2.2.2.tar.xz", "2.3.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0-beta.1/Sparkle-2.3.0-beta.1.tar.xz", "2.3.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0-beta.2/Sparkle-2.3.0-beta.2.tar.xz", "2.3.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0/Sparkle-2.3.0.tar.xz", "2.3.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.1/Sparkle-2.3.1.tar.xz", "2.3.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.2/Sparkle-2.3.2.tar.xz", "2.4.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.0-beta.1/Sparkle-2.4.0-beta.1.tar.xz", "2.4.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.0-beta.2/Sparkle-2.4.0-beta.2.tar.xz", "2.4.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.0/Sparkle-2.4.0.tar.xz", "2.4.1-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.1-beta.1/Sparkle-2.4.1-beta.1.tar.xz", "2.4.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.1/Sparkle-2.4.1.tar.xz", "2.4.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.2/Sparkle-2.4.2.tar.xz", "2.5.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.5.0-beta.1/Sparkle-2.5.0-beta.1.tar.xz", "2.5.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.5.0-beta.2/Sparkle-2.5.0-beta.2.tar.xz", "2.5.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.5.0/Sparkle-2.5.0.tar.xz", "2.5.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.5.1/Sparkle-2.5.1.tar.xz", "2.5.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.5.2/Sparkle-2.5.2.tar.xz", "2.6.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.6.0-beta.1/Sparkle-2.6.0-beta.1.tar.xz", "2.6.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.6.0-beta.2/Sparkle-2.6.0-beta.2.tar.xz", "2.6.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.6.0/Sparkle-2.6.0.tar.xz", "2.6.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.6.1/Sparkle-2.6.1.tar.xz", "1.27.2": "https://github.com/sparkle-project/Sparkle/releases/download/1.27.2/Sparkle-1.27.2.tar.xz", "2.6.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.6.2/Sparkle-2.6.2.tar.xz", "1.27.3": "https://github.com/sparkle-project/Sparkle/releases/download/1.27.3/Sparkle-1.27.3.tar.xz", "2.6.3": "https://github.com/sparkle-project/Sparkle/releases/download/2.6.3/Sparkle-2.6.3.tar.xz", "2.6.4": "https://github.com/sparkle-project/Sparkle/releases/download/2.6.4/Sparkle-2.6.4.tar.xz", "2.7.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.7.0-beta.1/Sparkle-2.7.0-beta.1.tar.xz", "2.7.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.7.0/Sparkle-2.7.0.tar.xz", "2.7.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.7.1/Sparkle-2.7.1.tar.xz", "2.7.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.7.2/Sparkle-2.7.2.tar.xz", "2.7.3": "https://github.com/sparkle-project/Sparkle/releases/download/2.7.3/Sparkle-2.7.3.tar.xz", "2.8.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.8.0-beta.1/Sparkle-2.8.0-beta.1.tar.xz", "2.8.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.8.0-beta.2/Sparkle-2.8.0-beta.2.tar.xz", "2.8.0-beta.3": "https://github.com/sparkle-project/Sparkle/releases/download/2.8.0-beta.3/Sparkle-2.8.0-beta.3.tar.xz", "2.8.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.8.0/Sparkle-2.8.0.tar.xLine truncated
|
||||
{"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", "2.2.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.2/Sparkle-2.2.2.tar.xz", "2.3.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0-beta.1/Sparkle-2.3.0-beta.1.tar.xz", "2.3.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0-beta.2/Sparkle-2.3.0-beta.2.tar.xz", "2.3.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0/Sparkle-2.3.0.tar.xz", "2.3.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.1/Sparkle-2.3.1.tar.xz", "2.3.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.2/Sparkle-2.3.2.tar.xz", "2.4.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.0-beta.1/Sparkle-2.4.0-beta.1.tar.xz", "2.4.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.0-beta.2/Sparkle-2.4.0-beta.2.tar.xz", "2.4.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.0/Sparkle-2.4.0.tar.xz", "2.4.1-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.1-beta.1/Sparkle-2.4.1-beta.1.tar.xz", "2.4.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.1/Sparkle-2.4.1.tar.xz", "2.4.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.4.2/Sparkle-2.4.2.tar.xz", "2.5.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.5.0-beta.1/Sparkle-2.5.0-beta.1.tar.xz", "2.5.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.5.0-beta.2/Sparkle-2.5.0-beta.2.tar.xz", "2.5.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.5.0/Sparkle-2.5.0.tar.xz", "2.5.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.5.1/Sparkle-2.5.1.tar.xz", "2.5.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.5.2/Sparkle-2.5.2.tar.xz", "2.6.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.6.0-beta.1/Sparkle-2.6.0-beta.1.tar.xz", "2.6.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.6.0-beta.2/Sparkle-2.6.0-beta.2.tar.xz", "2.6.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.6.0/Sparkle-2.6.0.tar.xz", "2.6.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.6.1/Sparkle-2.6.1.tar.xz", "1.27.2": "https://github.com/sparkle-project/Sparkle/releases/download/1.27.2/Sparkle-1.27.2.tar.xz", "2.6.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.6.2/Sparkle-2.6.2.tar.xz", "1.27.3": "https://github.com/sparkle-project/Sparkle/releases/download/1.27.3/Sparkle-1.27.3.tar.xz", "2.6.3": "https://github.com/sparkle-project/Sparkle/releases/download/2.6.3/Sparkle-2.6.3.tar.xz", "2.6.4": "https://github.com/sparkle-project/Sparkle/releases/download/2.6.4/Sparkle-2.6.4.tar.xz", "2.7.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.7.0-beta.1/Sparkle-2.7.0-beta.1.tar.xz", "2.7.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.7.0/Sparkle-2.7.0.tar.xz", "2.7.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.7.1/Sparkle-2.7.1.tar.xz", "2.7.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.7.2/Sparkle-2.7.2.tar.xz", "2.7.3": "https://github.com/sparkle-project/Sparkle/releases/download/2.7.3/Sparkle-2.7.3.tar.xz", "2.8.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.8.0-beta.1/Sparkle-2.8.0-beta.1.tar.xz", "2.8.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.8.0-beta.2/Sparkle-2.8.0-beta.2.tar.xz", "2.8.0-beta.3": "https://github.com/sparkle-project/Sparkle/releases/download/2.8.0-beta.3/Sparkle-2.8.0-beta.3.tar.xz", "2.8.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.8.0/Sparkle-2.8.0.tar.xLine truncated
|
||||
@@ -99,12 +99,12 @@ SPARKLE_ICON_NAME = AppIcon
|
||||
// These variables must have a space after the '=' too
|
||||
SPARKLE_VERSION_MAJOR = 2
|
||||
SPARKLE_VERSION_MINOR = 9
|
||||
SPARKLE_VERSION_PATCH = 1
|
||||
SPARKLE_VERSION_PATCH = 4
|
||||
|
||||
// This should be in SemVer format or empty, ie. "-beta.1"
|
||||
// These variables must have a space after the '=' too
|
||||
SPARKLE_VERSION_SUFFIX =
|
||||
CURRENT_PROJECT_VERSION = 2054
|
||||
CURRENT_PROJECT_VERSION = 2059
|
||||
|
||||
MARKETING_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)$(SPARKLE_VERSION_SUFFIX)
|
||||
ALWAYS_SEARCH_USER_PATHS = NO
|
||||
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
import PackageDescription
|
||||
|
||||
// Version is technically not required here, SPM doesn't check
|
||||
let version = "2.9.1"
|
||||
let version = "2.9.4"
|
||||
// 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.9.1"
|
||||
let checksum = "9fec2b888e6e2940b1bfbd5d3d010b9f67076b52170923549095cbb74132403b"
|
||||
let tag = "2.9.4"
|
||||
let checksum = "cb6fdbdc8884f15d62a616e79face92b08322410fd2d425edc6596ccbf4ba3b0"
|
||||
let url = "https://github.com/sparkle-project/Sparkle/releases/download/\(tag)/Sparkle-for-Swift-Package-Manager.zip"
|
||||
|
||||
let package = Package(
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "Sparkle"
|
||||
s.version = "2.9.1"
|
||||
s.version = "2.9.4"
|
||||
s.summary = "A software update framework for macOS"
|
||||
s.description = "Sparkle is an easy-to-use software update framework for macOS."
|
||||
s.homepage = "https://sparkle-project.org"
|
||||
|
||||
Vendored
+13
-1
@@ -18,7 +18,17 @@ static NSTimeInterval OLD_ITEM_DELETION_INTERVAL = 86400 * 10; // 10 days
|
||||
|
||||
+ (NSString *)_cachePathForCacheDirectory:(NSURL *)cacheURL bundleIdentifier:(NSString *)bundleIdentifier SPU_OBJC_DIRECT
|
||||
{
|
||||
NSString *resultPath = [[[cacheURL URLByAppendingPathComponent:bundleIdentifier isDirectory:YES] URLByAppendingPathComponent:@SPARKLE_BUNDLE_IDENTIFIER isDirectory:YES] path];
|
||||
// If an app has an ill-formed bundle identifier that ends with ".app" we will append ".sparkle" to it
|
||||
// so that the cache directory doesn't look like an app bundle directory, which can cause other systematic issues
|
||||
// https://github.com/sparkle-project/Sparkle/discussions/2881
|
||||
NSString *appCacheIdentifier;
|
||||
if ([bundleIdentifier hasSuffix:@".app"] || [bundleIdentifier hasSuffix:@".APP"]) {
|
||||
appCacheIdentifier = [bundleIdentifier stringByAppendingString:@".sparkle"];
|
||||
} else {
|
||||
appCacheIdentifier = bundleIdentifier;
|
||||
}
|
||||
|
||||
NSString *resultPath = [[[cacheURL URLByAppendingPathComponent:appCacheIdentifier isDirectory:YES] URLByAppendingPathComponent:@SPARKLE_BUNDLE_IDENTIFIER isDirectory:YES] path];
|
||||
assert(resultPath != nil);
|
||||
|
||||
return resultPath;
|
||||
@@ -90,6 +100,8 @@ static NSTimeInterval OLD_ITEM_DELETION_INTERVAL = 86400 * 10; // 10 days
|
||||
if ([templateString getFileSystemRepresentation:buffer maxLength:sizeof(buffer)]) {
|
||||
if (mkdtemp(buffer) != NULL) {
|
||||
return [[NSString alloc] initWithUTF8String:buffer];
|
||||
} else {
|
||||
SULog(SULogLevelError, @"Failed to create templated intermediate cache directory using mkdtemp() with error: %d", errno);
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
|
||||
Vendored
+4
-5
@@ -128,11 +128,10 @@
|
||||
|
||||
- (void)_activateApplication SPU_OBJC_DIRECT
|
||||
{
|
||||
if (@available(macOS 14, *)) {
|
||||
[NSApp activate];
|
||||
} else {
|
||||
[NSApp activateIgnoringOtherApps:YES];
|
||||
}
|
||||
// -[NSApp activate] does not always work reliably from backgrounded apps when the user initiates checks for updates
|
||||
// from e.g. a menu bar. The OS should grant active focus to the appliation, but it is inconsistent (last tested on 26.5.1).
|
||||
// For now we will prefer the deprecated more reliant API
|
||||
[NSApp activateIgnoringOtherApps:YES];
|
||||
}
|
||||
|
||||
- (void)showUpdatePermissionRequest:(SPUUpdatePermissionRequest *)request reply:(void (^)(SUUpdatePermissionResponse *))reply
|
||||
|
||||
Vendored
+4
@@ -427,6 +427,10 @@ typedef NS_ENUM(NSInteger, SUReleaseNotesFormat)
|
||||
_releaseNotesBoxView.contentView.layer.cornerRadius = boxCornerRadius - boxBorderWidth;
|
||||
}
|
||||
|
||||
// Keep hidden window title for accessibility
|
||||
window.title = SULocalizedStringFromTableInBundle(@"Software Update", SPARKLE_TABLE, sparkleBundle, nil);
|
||||
window.titleVisibility = NSWindowTitleHidden;
|
||||
|
||||
_laterButton.title = SULocalizedStringFromTableInBundle(@"Remind Me Later", SPARKLE_TABLE, sparkleBundle, @"");
|
||||
_skipButton.title = SULocalizedStringFromTableInBundle(@"Skip This Version", SPARKLE_TABLE, sparkleBundle, @"");
|
||||
_installButton.title = SULocalizedStringFromTableInBundle(@"Install Update", SPARKLE_TABLE, sparkleBundle, @"");
|
||||
|
||||
Vendored
+7
-7
@@ -2,13 +2,13 @@
|
||||
"%@ %@ is currently the newest version available." = "%1$@ %2$@ es la versión más nueva disponible.";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ es la versión más nueva disponible.\n(Actualmente estás corriendo la versión %3$@.)";
|
||||
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ es la versión más nueva disponible.\n(Actualmente estás ejecutando la versión %3$@.)";
|
||||
|
||||
/* Description text for SUUpdateAlert when the update is downloadable. */
|
||||
"%@ %@ is now available—you have %@. Would you like to download it now?" = "%1$@ %2$@ ya está disponible (tienes la %3$@). ¿Quisieras descargarla ahora?";
|
||||
"%@ %@ is now available—you have %@. Would you like to download it now?" = "%1$@ %2$@ ya está disponible (tienes la %3$@). ¿Querrías descargarla ahora?";
|
||||
|
||||
/* Description text for SUUpdateAlert when the update informational with no download. */
|
||||
"%@ %@ is now available—you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@ ya está disponible--tú tienes la %3$@. ¿Quisieras aprender más acerca de esta actualización en la red?";
|
||||
"%@ %@ is now available—you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@ ya está disponible--tú tienes la %3$@. ¿Querrías aprender más acerca de esta actualización en la red?";
|
||||
|
||||
/* The download progress in a unit of bytes, e.g. 100 KB */
|
||||
"%@ downloaded" = "%@ descargado";
|
||||
@@ -23,7 +23,7 @@
|
||||
"%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?" = "¡%1$@ %2$@ se ha descargado y está lista para usarse! ¿Te gustaría instalarla y volver a abrir %1$@ ahora?";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"%1$@ can’t be updated because it was opened from a read-only or a temporary location." = "%1$@ no se puede actualizar porque fue abierta desde una ubicación temporal o de solo lectura.";
|
||||
"%1$@ can’t be updated because it was opened from a read-only or a temporary location." = "%1$@ no se puede actualizar porque fue abierta desde una ubicación temporal o de sólo lectura.";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"A new version of %@ is available!" = "¡Una nueva versión de %@ está disponible!";
|
||||
@@ -74,7 +74,7 @@
|
||||
"OK" = "Aceptar";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Ready to Install" = "Listo para instalarse";
|
||||
"Ready to Install" = "Lista para instalarse";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Should %1$@ automatically check for updates? You can always check for updates manually from the %1$@ menu." = "¿Debería %1$@ buscar actualizaciones automáticamente? Siempre puedes buscar actualizaciones manualmente desde el menú %1$@.";
|
||||
@@ -92,7 +92,7 @@
|
||||
"Version History" = "Historial de versiones";
|
||||
|
||||
/* Status message shown when the user checks for updates but is already current or the feed doesn't contain any updates. */
|
||||
"You’re up to date!" = "¡Está actualizado!";
|
||||
"You’re up to date!" = "¡Estás al día!";
|
||||
|
||||
/* Software Update title/label */
|
||||
"Software Update" = "Actualización de software";
|
||||
@@ -125,4 +125,4 @@
|
||||
"Automatically download and install updates" = "Descargar e instalar actualizaciones automáticamente";
|
||||
|
||||
/* Anonymous system profile information disclosure for update permission dialog */
|
||||
"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:" = "La información de perfil de sistema anónimo se usa para ayudarnos a planear el trabajo de desarrollo futuro. Por favor, póngase en contacto con nosotros si tiene preguntas sobre esto.\n\nEsta es la información que nos enviaría:";
|
||||
"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:" = "La información de perfil de sistema anónimo se usa para ayudarnos a planear el trabajo de desarrollo futuro. Por favor, ponte en contacto con nosotros si tienes preguntas sobre esto.\n\nEsta es la información que nos enviaría:";
|
||||
@@ -297,45 +297,47 @@
|
||||
abort();
|
||||
}
|
||||
self->_webServer = webServer;
|
||||
|
||||
// Set up updater and the updater settings window
|
||||
{
|
||||
self->_updateSettingsWindowController = [[SUUpdateSettingsWindowController alloc] init];
|
||||
|
||||
NSWindow *settingsWindow = self->_updateSettingsWindowController.window;
|
||||
|
||||
NSBundle *hostBundle = [NSBundle mainBundle];
|
||||
NSBundle *applicationBundle = hostBundle;
|
||||
|
||||
id<SPUUserDriver> userDriver;
|
||||
|
||||
[webServer startWithReadyHandler:^{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
// Set up updater and the updater settings window
|
||||
self->_updateSettingsWindowController = [[SUUpdateSettingsWindowController alloc] init];
|
||||
|
||||
NSWindow *settingsWindow = self->_updateSettingsWindowController.window;
|
||||
|
||||
NSBundle *hostBundle = [NSBundle mainBundle];
|
||||
NSBundle *applicationBundle = hostBundle;
|
||||
|
||||
id<SPUUserDriver> userDriver;
|
||||
#if SPARKLE_BUILD_UI_BITS
|
||||
if (shiftKeyHeldDown) {
|
||||
userDriver = [[SUPopUpTitlebarUserDriver alloc] initWithWindow:settingsWindow];
|
||||
} else {
|
||||
userDriver = [[SPUStandardUserDriver alloc] initWithHostBundle:hostBundle delegate:nil];
|
||||
}
|
||||
if (shiftKeyHeldDown) {
|
||||
userDriver = [[SUPopUpTitlebarUserDriver alloc] initWithWindow:settingsWindow];
|
||||
} else {
|
||||
userDriver = [[SPUStandardUserDriver alloc] initWithHostBundle:hostBundle delegate:nil];
|
||||
}
|
||||
#else
|
||||
userDriver = [[SUPopUpTitlebarUserDriver alloc] initWithWindow:settingsWindow];
|
||||
userDriver = [[SUPopUpTitlebarUserDriver alloc] initWithWindow:settingsWindow];
|
||||
#endif
|
||||
|
||||
SPUUpdater *updater = [[SPUUpdater alloc] initWithHostBundle:hostBundle applicationBundle:applicationBundle userDriver:userDriver delegate:self];
|
||||
|
||||
self->_updater = updater;
|
||||
self->_updateSettingsWindowController.updater = updater;
|
||||
|
||||
NSError *updaterError = nil;
|
||||
if (![updater startUpdater:&updaterError]) {
|
||||
NSLog(@"Failed to start updater with error: %@", updaterError);
|
||||
|
||||
NSAlert *alert = [[NSAlert alloc] init];
|
||||
alert.messageText = @"Updater Error";
|
||||
alert.informativeText = @"The Updater failed to start. For detailed error information, check the Console.app log.";
|
||||
[alert addButtonWithTitle:@"OK"];
|
||||
[alert runModal];
|
||||
}
|
||||
|
||||
[self->_updateSettingsWindowController showWindow:nil];
|
||||
}
|
||||
|
||||
SPUUpdater *updater = [[SPUUpdater alloc] initWithHostBundle:hostBundle applicationBundle:applicationBundle userDriver:userDriver delegate:self];
|
||||
|
||||
self->_updater = updater;
|
||||
self->_updateSettingsWindowController.updater = updater;
|
||||
|
||||
NSError *updaterError = nil;
|
||||
if (![updater startUpdater:&updaterError]) {
|
||||
NSLog(@"Failed to start updater with error: %@", updaterError);
|
||||
|
||||
NSAlert *alert = [[NSAlert alloc] init];
|
||||
alert.messageText = @"Updater Error";
|
||||
alert.informativeText = @"The Updater failed to start. For detailed error information, check the Console.app log.";
|
||||
[alert addButtonWithTitle:@"OK"];
|
||||
[alert runModal];
|
||||
}
|
||||
|
||||
[self->_updateSettingsWindowController showWindow:nil];
|
||||
});
|
||||
}];
|
||||
});
|
||||
}];
|
||||
}
|
||||
@@ -366,11 +368,6 @@
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification * __unused)notification
|
||||
{
|
||||
[_webServer close];
|
||||
}
|
||||
|
||||
- (IBAction)checkForUpdates:(id __unused)sender
|
||||
{
|
||||
[_updater checkForUpdates];
|
||||
|
||||
@@ -12,6 +12,6 @@ SPU_OBJC_DIRECT_MEMBERS @interface SUTestWebServer : NSObject
|
||||
|
||||
- (instancetype)initWithPort:(int)port workingDirectory:(NSString*)workingDirectory;
|
||||
|
||||
- (void)close;
|
||||
- (void)startWithReadyHandler:(dispatch_block_t)readyHandler;
|
||||
|
||||
@end
|
||||
@@ -174,6 +174,7 @@
|
||||
|
||||
SPU_OBJC_DIRECT_MEMBERS @interface SUTestWebServer () <SUTestWebServerConnectionDelegate> {
|
||||
CFSocketRef _socket;
|
||||
NSThread *_serverThread;
|
||||
}
|
||||
|
||||
@property (nonatomic) NSMutableArray *connections;
|
||||
@@ -227,14 +228,23 @@ static void connectCallback(CFSocketRef __unused s, CFSocketCallBackType type, C
|
||||
_connections = [[NSMutableArray alloc] init];
|
||||
_workingDirectory = workingDirectory;
|
||||
|
||||
CFRunLoopSourceRef source = CFSocketCreateRunLoopSource(NULL, _socket, 0);
|
||||
assert(source != NULL);
|
||||
CFRunLoopAddSource(CFRunLoopGetCurrent(), source, kCFRunLoopDefaultMode);
|
||||
CFRelease(source);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)startWithReadyHandler:(dispatch_block_t)readyHandler
|
||||
{
|
||||
_serverThread = [[NSThread alloc] initWithBlock:^{
|
||||
CFRunLoopSourceRef source = CFSocketCreateRunLoopSource(NULL, self->_socket, 0);
|
||||
assert(source != NULL);
|
||||
CFRunLoopAddSource(CFRunLoopGetCurrent(), source, kCFRunLoopDefaultMode);
|
||||
CFRelease(source);
|
||||
readyHandler();
|
||||
[[NSRunLoop currentRunLoop] run];
|
||||
}];
|
||||
|
||||
[_serverThread start];
|
||||
}
|
||||
|
||||
- (void)connectionDidClose:(SUTestWebServerConnection *)sender
|
||||
{
|
||||
assert(_connections != nil);
|
||||
@@ -252,16 +262,4 @@ static void connectCallback(CFSocketRef __unused s, CFSocketCallBackType type, C
|
||||
}
|
||||
}
|
||||
|
||||
- (void)close
|
||||
{
|
||||
for (SUTestWebServerConnection *conn in _connections) {
|
||||
[conn close];
|
||||
}
|
||||
if (_socket) {
|
||||
CFSocketInvalidate(_socket);
|
||||
CFRelease(_socket);
|
||||
_socket = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user