Compare commits

..
8 Commits
Author SHA1 Message Date
Sparkle-Bot 5581748cef Update Package management files for version 2.8.1 2025-11-15 04:59:21 +00:00
Zorg 771e5e2d39 Add CHANGELOG for 2.8.1 2025-11-14 20:52:15 -08:00
Zorg bcaa3c31c4 Add documentation note for delegates being weakly referenced (#2802) 2025-11-14 20:45:21 -08:00
Zorg 64927aac59 Wait after checking for updates for UI tests (#2798) 2025-11-14 20:38:26 -08:00
Zorg 0173a351f4 Enforce RunAtLoad and remove KeepAlive (#2795)
Overriding KeepAlive before actually implies RunAtLoad is true but we were setting RunAtLoad to false which is conflicting. In any case we don't want to restart the job if it crashes, and we want to run Updater when the job is loaded.
2025-11-14 20:38:26 -08:00
Zorg a22115c043 Add missing executable bit permission warnings (#2792)
These warnings are logged after failing to connect to XPC and launchd helpers and indicate the helpers likely did not launch at all.

This error happens when developers incorrectly copy Sparkle framework not preserving executable permissions, and is sadly somewhat common.
2025-11-14 20:38:26 -08:00
Francis Feng b305bd4fa2 Add missing localizations to zh-TW (#2791)
Also fix some formatting issues in zh-CN localizations
2025-11-14 20:38:26 -08:00
Francis Feng 927adb667f Add missing localizations to zh-CN (#2789) 2025-10-25 21:44:22 -07:00
21 changed files with 321 additions and 200 deletions

No files matched your search

+8
View File
@@ -1,3 +1,11 @@
# 2.8.1
* Enforce RunAtLoad to reduce potential timeout issue when launching updater task (#2795) (Zorg)
* Add missing executable bit permission warnings on connection failure (#2792) (Zorg)
* Add missing localizations to zh-CN & zh-TW (#2789, #2791) (Francis Feng)
* Add documentation note for delegates being weakly referenced (#2802) (Zorg)
* Include app name in startUpdater: failure in SPUStandardUpdaterController (#2780) (Zorg)
# 2.8.0
* UI modernization and macOS Tahoe support
+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", "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
+2 -2
View File
@@ -94,12 +94,12 @@ SPARKLE_ICON_NAME = AppIcon
// These variables must have a space after the '=' too
SPARKLE_VERSION_MAJOR = 2
SPARKLE_VERSION_MINOR = 8
SPARKLE_VERSION_PATCH = 0
SPARKLE_VERSION_PATCH = 1
// 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 = 2049
CURRENT_PROJECT_VERSION = 2050
MARKETING_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)$(SPARKLE_VERSION_SUFFIX)
ALWAYS_SEARCH_USER_PATHS = NO
+2 -3
View File
@@ -86,8 +86,7 @@
jobDictionary[@"Label"] = label;
jobDictionary[@"ProgramArguments"] = arguments;
jobDictionary[@"EnableTransactions"] = @NO;
jobDictionary[@"KeepAlive"] = @{@"SuccessfulExit" : @NO};
jobDictionary[@"RunAtLoad"] = @NO;
jobDictionary[@"RunAtLoad"] = @YES;
jobDictionary[@"Nice"] = @0;
jobDictionary[@"ProcessType"] = @"Interactive";
jobDictionary[@"LaunchOnlyOnce"] = @YES;
@@ -284,7 +283,7 @@
}
}
NSDictionary *jobDictionary = @{@"Label" : label, @"ProgramArguments" : arguments, @"EnableTransactions" : @NO, @"KeepAlive" : @{@"SuccessfulExit" : @NO}, @"RunAtLoad" : @NO, @"Nice" : @0, @"ProcessType": @"Interactive", @"LaunchOnlyOnce": @YES, @"MachServices" : @{SPUInstallerServiceNameForBundleIdentifier(hostBundleIdentifier) : @YES, SPUProgressAgentServiceNameForBundleIdentifier(hostBundleIdentifier) : @YES}};
NSDictionary *jobDictionary = @{@"Label" : label, @"ProgramArguments" : arguments, @"EnableTransactions" : @NO, @"RunAtLoad" : @YES, @"Nice" : @0, @"ProcessType": @"Interactive", @"LaunchOnlyOnce": @YES, @"MachServices" : @{SPUInstallerServiceNameForBundleIdentifier(hostBundleIdentifier) : @YES, SPUProgressAgentServiceNameForBundleIdentifier(hostBundleIdentifier) : @YES}};
CFErrorRef submitError = NULL;
#pragma clang diagnostic push
+3 -3
View File
@@ -2,10 +2,10 @@
import PackageDescription
// Version is technically not required here, SPM doesn't check
let version = "2.8.0"
let version = "2.8.1"
// 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.8.0"
let checksum = "dfb69c5b4d040a162c8076817e96ef635f5627f3af606222376c870e03b9f8ca"
let tag = "2.8.1"
let checksum = "995f913935fe903d50b3be5344fc52a638f56b39ef7984bf7a44244786d28638"
let url = "https://github.com/sparkle-project/Sparkle/releases/download/\(tag)/Sparkle-for-Swift-Package-Manager.zip"
let package = Package(
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Sparkle"
s.version = "2.8.0"
s.version = "2.8.1"
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"
+10 -3
View File
@@ -81,13 +81,20 @@
if (strongSelf != nil && !strongSelf->_retrievedDownloadResult && !strongSelf->_cleaningUp) {
strongSelf->_downloader = nil;
// We can't enforce com.apple.security.network.client == NO or it being absent for sandboxed clients,
// but we should warn about it anyway
SULog(SULogLevelError, @"Error: Connection to update downloader was invalidated. If your app is not sandboxed or has com.apple.security.network.client set to YES, please remove %@ from your Info.plist. Otherwise please check Console logs for "@DOWNLOADER_NAME" if there are any additional details.", SUEnableDownloaderServiceKey);
NSString *additionalFailureReason;
{
NSString *executableFailureReason;
if (!SPUXPCServiceHasExecutablePermission(@DOWNLOADER_NAME, &executableFailureReason)) {
additionalFailureReason = [NSString stringWithFormat:@" %@", executableFailureReason];
} else {
additionalFailureReason = @"";
}
}
NSDictionary *userInfo =
@{
NSLocalizedDescriptionKey: SULocalizedStringFromTableInBundle(@"An error occurred while downloading the update. Please try again later.", SPARKLE_TABLE, SUSparkleBundle(), nil),
NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"If your app is not sandboxed or has com.apple.security.network.client set to YES, please remove %@ from your Info.plist. Please also check Console logs for "@DOWNLOADER_NAME" if there are any additional details.%@", SUEnableDownloaderServiceKey, additionalFailureReason]
};
NSError *downloadError = [NSError errorWithDomain:SUSparkleErrorDomain code:SUDownloadError userInfo:userInfo];
+22 -2
View File
@@ -186,9 +186,19 @@
if (strongSelf != nil && strongSelf->_installerConnection != nil && !strongSelf->_aborted) {
NSString *impactedTools = usingInstallerService ? (@SPARKLE_RELAUNCH_TOOL_NAME" and "@INSTALLER_LAUNCHER_NAME) : @SPARKLE_RELAUNCH_TOOL_NAME;
NSString *additionalFailureReason;
{
NSString *executableFailureReason;
if (!SPUHelperHasExecutablePermission(@SPARKLE_RELAUNCH_TOOL_NAME, &executableFailureReason) || !SPUHelperHasExecutablePermission(@SPARKLE_INSTALLER_PROGRESS_TOOL_NAME@".app/Contents/MacOS/"@SPARKLE_INSTALLER_PROGRESS_TOOL_NAME, &executableFailureReason)) {
additionalFailureReason = executableFailureReason;
} else {
additionalFailureReason = [NSString stringWithFormat:@"If your application is sandboxed, please ensure Installer Connection & Status entitlements are correctly set up: https://sparkle-project.org/documentation/sandboxing/ . Otherwise if %@ %@ not adhoc signed, your app must be signed with a matching team ID", impactedTools, (usingInstallerService ? @"are" : @"is")];
}
}
NSDictionary *genericUserInfo = @{
NSLocalizedDescriptionKey: SULocalizedStringFromTableInBundle(@"An error occurred while running the updater. Please try again later.", SPARKLE_TABLE, SUSparkleBundle(), nil),
NSLocalizedFailureReasonErrorKey:[NSString stringWithFormat:@"The remote port connection was invalidated from the updater. If your application is sandboxed, please ensure Installer Connection & Status entitlements are correctly set up: https://sparkle-project.org/documentation/sandboxing/ . Otherwise if %@ %@ not adhoc signed, your app must be signed with a matching team ID. For additional details, check Console logs for %@", impactedTools, (usingInstallerService ? @"are" : @"is"), impactedTools]
NSLocalizedFailureReasonErrorKey:[NSString stringWithFormat:@"The remote port connection was invalidated from the updater. %@. For additional details, check Console logs for %@", additionalFailureReason, impactedTools]
};
[strongSelf _reportInstallerError:strongSelf->_installerError genericErrorCode:SUInstallationError genericUserInfo:genericUserInfo];
@@ -412,9 +422,19 @@
#endif
if (!retrievedLaunchStatus) {
#pragma clang diagnostic pop
NSString *additionalFailureReason;
{
NSString *executableFailureReason;
if (!SPUXPCServiceHasExecutablePermission(@INSTALLER_LAUNCHER_NAME, &executableFailureReason)) {
additionalFailureReason = [NSString stringWithFormat:@" %@", executableFailureReason];
} else {
additionalFailureReason = @"";
}
}
NSError *error =
[NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{ NSLocalizedDescriptionKey:SULocalizedStringFromTableInBundle(@"An error occurred while connecting to the installer. Please try again later.", SPARKLE_TABLE, SUSparkleBundle(), nil),
NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"If your app is not sandboxed, please remove or disable %@ in your app's Info.plist. Otherwise please check Console logs for "@INSTALLER_LAUNCHER_NAME" and "@SPARKLE_RELAUNCH_TOOL_NAME" processes if there are additional details.", SUEnableInstallerLauncherServiceKey]}];
NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"If your app is not sandboxed, please remove or disable %@ in your app's Info.plist. Please also check Console logs for "@INSTALLER_LAUNCHER_NAME" and "@SPARKLE_RELAUNCH_TOOL_NAME" processes if there are additional details.%@", SUEnableInstallerLauncherServiceKey, additionalFailureReason]}];
completionHandler(error);
+4
View File
@@ -81,6 +81,8 @@ SU_EXPORT @interface SPUStandardUpdaterController : NSObject
Create a new `SPUStandardUpdaterController` programmatically.
The updater is started automatically. See `-startUpdater` for more information.
Note the `updaterDelegate` and `userDriverDelegate` are weakly referenced, so you are responsible for keeping them alive.
*/
- (instancetype)initWithUpdaterDelegate:(nullable id<SPUUpdaterDelegate>)updaterDelegate userDriverDelegate:(nullable id<SPUStandardUserDriverDelegate>)userDriverDelegate;
@@ -89,6 +91,8 @@ SU_EXPORT @interface SPUStandardUpdaterController : NSObject
You can specify whether or not you want to start the updater immediately.
If you do not start the updater, you must invoke `-startUpdater` at a later time to start it.
Note the `updaterDelegate` and `userDriverDelegate` are weakly referenced, so you are responsible for keeping them alive.
*/
- (instancetype)initWithStartingUpdater:(BOOL)startUpdater updaterDelegate:(nullable id<SPUUpdaterDelegate>)updaterDelegate userDriverDelegate:(nullable id<SPUStandardUserDriverDelegate>)userDriverDelegate;
+1 -1
View File
@@ -33,7 +33,7 @@ SU_EXPORT @interface SPUStandardUserDriver : NSObject <SPUUserDriver>
Initializes a Sparkle's standard user driver for user update interactions
@param hostBundle The target bundle of the host that is being updated.
@param delegate The optional delegate to this user driver.
@param delegate The optional delegate to this user driver. Note the standard user driver weakly references the delegate, so you are responsible for keeping it alive.
*/
- (instancetype)initWithHostBundle:(NSBundle *)hostBundle delegate:(nullable id<SPUStandardUserDriverDelegate>)delegate;
+1 -1
View File
@@ -57,7 +57,7 @@ SU_EXPORT @interface SPUUpdater : NSObject
@param hostBundle The bundle that should be targeted for updating.
@param applicationBundle The application bundle that should be waited for termination and relaunched (unless overridden). Usually this can be the same as hostBundle. This may differ when updating a plug-in or other non-application bundle.
@param userDriver The user driver that Sparkle uses for user update interaction.
@param delegate The delegate for `SPUUpdater`.
@param delegate The delegate for `SPUUpdater`. Note the updater weakly references the delegate, so you are responsible for keeping it alive.
*/
- (instancetype)initWithHostBundle:(NSBundle *)hostBundle applicationBundle:(NSBundle *)applicationBundle userDriver:(id <SPUUserDriver>)userDriver delegate:(nullable id<SPUUpdaterDelegate>)delegate;
+4
View File
@@ -12,4 +12,8 @@ NS_ASSUME_NONNULL_BEGIN
BOOL SPUXPCServiceIsEnabled(NSString *enabledKey);
BOOL SPUHelperHasExecutablePermission(NSString *component, NSString * _Nullable __autoreleasing * _Nullable failureReason);
BOOL SPUXPCServiceHasExecutablePermission(NSString *serviceName, NSString * _Nullable __autoreleasing * _Nullable failureReason);
NS_ASSUME_NONNULL_END
+41
View File
@@ -20,3 +20,44 @@ BOOL SPUXPCServiceIsEnabled(NSString *enabledKey)
return [mainBundleHost boolForInfoDictionaryKey:enabledKey];
}
BOOL SPUHelperHasExecutablePermission(NSString *component, NSString * _Nullable __autoreleasing * _Nullable failureReason)
{
NSBundle *sparkleBundle = [NSBundle bundleWithIdentifier:SUBundleIdentifier];
NSURL *helperURL = [[sparkleBundle.bundleURL URLByAppendingPathComponent:component isDirectory:NO] URLByResolvingSymlinksInPath];
NSString *helperPath = helperURL.path;
NSError *attributesError = nil;
NSDictionary<NSFileAttributeKey, id> *attributes = [NSFileManager.defaultManager attributesOfItemAtPath:helperPath error:&attributesError];
if (attributes == nil) {
if (failureReason != NULL) {
*failureReason = [NSString stringWithFormat:@"Failed to fetch info from file '%@' -- does this helper exist? %@", helperPath, attributesError.localizedDescription];
}
return NO;
}
NSNumber *posixPermissions = attributes[NSFilePosixPermissions];
if (posixPermissions != nil) {
mode_t mode = posixPermissions.unsignedShortValue;
if (((mode & S_IXUSR) == 0 || (mode & S_IXGRP) == 0 || (mode & S_IXOTH) == 0)) {
if (failureReason != NULL) {
*failureReason = [NSString stringWithFormat:@"The file '%@' may not have executable permissions -- were they lost during a bad file copy? Please ensure file permissions and symbolic links for Sparkle framework are preserved.", helperPath];
}
return NO;
}
}
return YES;
}
BOOL SPUXPCServiceHasExecutablePermission(NSString *serviceName, NSString * _Nullable __autoreleasing * _Nullable failureReason)
{
NSString *componentName = [NSString stringWithFormat:@"XPCServices/%@.xpc/Contents/MacOS/%@", serviceName, serviceName];
return SPUHelperHasExecutablePermission(componentName, failureReason);
}
+132 -30
View File
@@ -1,48 +1,87 @@
/* No comment provided by engineer. */
"%@ %@ is currently the newest version available." = "%1$@ %2$@ 是当前的最新版本。";
/* 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$@已下载完毕并可以使用。这是重要更新,要立刻安装并重启%1$@吗?";
/* 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$@吗?";
/* No comment provided by engineer. */
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ 是当前的最新版本(您正在运行 %3$@)。";
"%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. */
"%1$@ can’t be updated because it was opened from a read-only or a temporary location." = "无法更新%1$@,因为它打开自一个只读或临时位置。";
/* No comment provided by engineer. */
"%@ %@ is currently the newest version available." = "%1$@ %2$@是当前的最新版本。";
/* No comment provided by engineer. */
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@是当前的最新版本\n(您正在运行 %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$@可供下载,您现在的版本是%3$@。这是重要更新,要现在下载吗?";
/* Description text for SUUpdateAlert when the update is downloadable. */
"%@ %@ is now available—you have %@. Would you like to download it now?" = "%1$@ %2$@ 可供下载,您现在的版本是 %3$@。要现在下载吗?";
"%@ %@ is now available—you have %@. Would you like to download it now?" = "%1$@ %2$@可供下载,您现在的版本是%3$@。要现在下载吗?";
/* 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$@ 已经推出,您正在运行 %3$@。您要在网站上查看关于更新的更多信息吗?";
"%@ %@ is now available—you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@可供下载,您现在的版本是%3$@。您要在网站上查看关于本次更新的更多信息吗?";
/* The download progress in a unit of bytes, e.g. 100 KB */
"%@ downloaded" = "%@ 已下载";
"%@ downloaded" = "%@已下载";
/* No comment provided by engineer. */
"%@ is now updated to version %@!" = "%1$@已更新至版本%2$@!";
/* No comment provided by engineer. */
"%@ is now updated!" = "%@已完成更新";
/* The download progress in units of bytes, e.g. 100 KB of 1,0 MB */
"%@ of %@" = "%1$@ / %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$@ 已下载完毕并可以使用。您想要现在安装 %1$@ 吗?";
/* No comment provided by engineer. */
"A new version of %@ is available!" = "新版本的%@已经发布";
/* 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. */
"%1$@ can’t be updated because it was opened from a read-only or a temporary location." = "无法更新 %1$@,因为它运行于一个只读或临时位置。";
/* No comment provided by engineer. */
"A new version of %@ is available!" = "新版本的 %@ 已经发布";
/* No comment provided by engineer. */
"A new version of %@ is ready to install!" = "新版本的 %@ 可以安装了";
"A new version of %@ is ready to install!" = "新版本的%@可以安装了";
/* No comment provided by engineer. */
"An error occurred in retrieving update information. Please try again later." = "获取升级信息时出现错误,请稍后再试。";
/* No comment provided by engineer. */
"An error occurred while downloading the update. Please try again later." = "下载过程中出现错误,请稍后再试。";
"An error occurred while connecting to the installer. Please try again later." = "连接到安装程序时出现错误,请稍后再试。";
/* No comment provided by engineer. */
"An error occurred while extracting the archive. Please try again later." = "解压过程中出现错误,请稍后再试。";
"An error occurred while downloading the update. Please try again later." = "下载更新时出现错误,请稍后再试。";
/* No comment provided by engineer. */
"An error occurred while extracting the archive. Please try again later." = "解压时出现错误,请稍后再试。";
/* No comment provided by engineer. */
"An error occurred while launching the installer. Please try again later." = "打开安装程序时出现错误,请稍后再试。";
/* No comment provided by engineer. */
"An error occurred while parsing the update feed." = "解析更新信息时出现错误,请稍后再试。";
/* No comment provided by engineer. */
"An error occurred while running the updater. Please try again later." = "运行更新程序时出现错误,请稍后再试。";
/* No comment provided by engineer. */
"An error occurred while starting the installer. Please try again later." = "打开安装程序时出现错误,请稍后再试。";
/* No comment provided by engineer. */
"An important update to %@ is ready to install" = "已准备好安装%@的重要更新";
/* No comment provided by engineer. */
"Application Name" = "应用名称";
/* No comment provided by engineer. */
"Application Version" = "应用版本";
/* No comment provided by engineer. */
"Cancel" = "取消";
@@ -52,45 +91,108 @@
/* No comment provided by engineer. */
"Checking for updates…" = "正在检查更新…";
/* No comment provided by engineer. */
"CPU is 64-Bit?" = "CPU是64位的吗?";
/* No comment provided by engineer. */
"CPU Speed (MHz)" = "CPU主频(MHz)";
/* No comment provided by engineer. */
"CPU Subtype" = "CPU子类型";
/* No comment provided by engineer. */
"CPU Type" = "CPU类型";
/* Take care not to overflow the status window. */
"Downloading update…" = "正在下载更新…";
/* Take care not to overflow the status window. */
"Extracting update…" = "正在解压更新…";
/* No comment provided by engineer. */
"Failed to resume installing update." = "无法继续安装更新。";
/* No comment provided by engineer. */
"Install and Relaunch" = "安装并重启应用";
/* Alternate title for 'Remind Me Later' button when downloaded updates can be resumed */
"Install on Quit" = "退出应用时安装";
/* Take care not to overflow the status window. */
"Installing update…" = "正在安装更新…";
/* Alternate title for 'Install Update' button when there's no download in RSS feed. */
"Learn More…" = "查看更多…";
/* No comment provided by engineer. */
"Mac Model" = "Mac机型";
/* No comment provided by engineer. */
"Memory (MB)" = "内存(MB)";
/* No comment provided by engineer. */
"No" = "不";
/* No comment provided by engineer. */
"Number of CPUs" = "CPU数量";
/* No comment provided by engineer. */
"OK" = "好";
/* No comment provided by engineer. */
"Quit %1$@, move it into your Applications folder, relaunch it from there and try again." = "退出 %1$@,将其移至“应用程序”,并在那里重新启动,然后再试。";
"OS Version" = "系统版本";
/* No comment provided by engineer. */
"Preferred Language" = "偏好语言";
/* No comment provided by engineer. */
"Quit %1$@, move it into your Applications folder, relaunch it from there and try again." = "退出%1$@,将其移至“应用程序”文件夹,并在那里重新启动,然后再试。";
/* No comment provided by engineer. */
"Ready to Install" = "可以开始安装了";
/* 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 installation failed due to not having permission to write the new update." = "安装失败,没有权限写入更新。";
/* No comment provided by engineer. */
"The updater failed to start. Please verify you have the latest version of %@ and contact the app developer if the issue still persists. Check the Console logs for more information." = "无法启动更新程序。请验证是否有最新版本的%@,并联系App开发者如果此问题持续。请查看控制台以获得更多信息。";
/* No comment provided by engineer. */
"The update is improperly signed and could not be validated. Please try again later or contact the app developer." = "此更新未正确签名,无法验证其真实性。请稍后再试或联系App开发者。";
/* No comment provided by engineer. */
"Unable to Check For Updates" = "无法检查更新";
/* No comment provided by engineer. */
"Update Error!" = "更新错误!";
/* No comment provided by engineer. */
"Updating %@" = "正在更新 %@";
"Update Installed" = "更新已安装";
/* No comment provided by engineer. */
"Use Finder to copy %1$@ to the Applications folder, relaunch it from there, and try again." = "移动 %1$@ 到应用程序文件夹并再试一次。";
"Updating %@" = "正在更新%@";
/* No comment provided by engineer. */
"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. */
"Yes" = "是";
/* No comment provided by engineer. */
"You may need to allow modifications from %1$@ in System Settings under Privacy & Security and App Management to install future updates." = "为了正常安装后续更新,您需要在“系统设置 → 隐私与安全 → App管理”内允许%1$@更新应用。";
/* 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. */
"You’re up to date!" = "您使用的就是最新版!";
@@ -98,7 +200,7 @@
"Software Update" = "软件更新";
/* Remind Me Later choice for update alert */
"Remind Me Later" = "稍后提示我";
"Remind Me Later" = "稍后提醒我";
/* Skip This Version choice for update alert */
"Skip This Version" = "跳过这个版本";
@@ -110,19 +212,19 @@
"Automatically download and install updates in the future" = "以后自动下载并安装更新";
/* Check for updates automatically response for update permission dialog */
"Check Automatically" = "自动核查";
"Check Automatically" = "自动检查";
/* Don't check for updates automatically response for update permission dialog */
"Don’t Check" = "不核查";
"Don’t Check" = "不检查";
/* Title question for update permission dialog */
"Check for updates automatically?" = "自动核查更新?";
"Check for updates automatically?" = "自动检查更新?";
/* Include anonymous system profile choice for update permission dialog */
"Include anonymous system profile" = "包括无记名系统概况";
"Include anonymous system profile" = "包括匿名的系统概况";
/* Automatically download and install updates choice for update permission dialog */
"Automatically download and install updates" = "自动下载并安装更新";
/* 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:" = "无记名系统概况信息被用于帮助我们安排将来的开发工作。如果对此存在疑问请联系我们。\n\n这是将要被发送的信息::";
"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:" = "匿名的系统概况信息有助于我们安排将来的开发工作。如果对此存在疑问请联系我们。\n\n这是将要被发送的信息:";
+71 -23
View File
@@ -1,53 +1,53 @@
/* 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$@ 已下載且可供使用!此為重要更新,您是否要立即安裝並重新啟動 %1$@?";
"%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$@已下載且可供使用!此為重要更新,您是否要立即安裝並重新啟動%1$@?";
/* 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. */
"%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$@。";
"%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$@。";
"%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$@ 時,無法進行更新。";
"%1$@ can’t be updated if it’s running from the location it was downloaded to." = "當從下載位置執行%1$@時,無法進行更新。";
/* 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$@正從唯讀卷宗(如磁碟映像檔或光碟機)執行時,無法進行更新。";
/* No comment provided by engineer. */
"%@ %@ is currently the newest version available." = "%1$@ %2$@ 已是目前最新的版本。";
"%@ %@ is currently the newest version available." = "%1$@ %2$@已是目前最新的版本。";
/* No comment provided by engineer. */
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ 已是目前最新的版本。\n(您正在執行的版本是 %3$@。)";
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@已是目前最新的版本。\n(您正在執行的版本是%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$@ 現在已可供下載,您的版本則是 %3$@。此為重要更新,您想要立即下載嗎?";
"%@ %@ is now available—you have %@. This is an important update; would you like to download it now?" = "%1$@ %2$@現在已可供下載,您的版本則是%3$@。此為重要更新,您想要立即下載嗎?";
/* Description text for SUUpdateAlert when the update is downloadable. */
"%@ %@ is now available—you have %@. Would you like to download it now?" = "%1$@ %2$@ 現在已可供下載,您的版本則是 %3$@。您想要立即下載嗎?";
"%@ %@ is now available—you have %@. Would you like to download it now?" = "%1$@ %2$@現在已可供下載,您的版本則是%3$@。您想要立即下載嗎?";
/* 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$@ 現在已可供下載,您的版本則是 %3$@。您想要瞭解更多關於此更新的資訊嗎?";
"%@ %@ is now available—you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@現在已可供下載,您的版本則是%3$@。您想要瞭解更多關於此更新的資訊嗎?";
/* The download progress in a unit of bytes, e.g. 100 KB */
"%@ downloaded" = "%@ 已下載";
"%@ downloaded" = "%@已下載";
/* No comment provided by engineer. */
"%@ is now updated to version %@!" = "%1$@ 已更新至版本 %2$@!";
"%@ is now updated to version %@!" = "%1$@已更新至版本%2$@!";
/* No comment provided by engineer. */
"%@ is now updated!" = "%@ 已完成更新!";
"%@ is now updated!" = "%@已完成更新!";
/* The download progress in units of bytes, e.g. 100 KB of 1,0 MB */
"%@ of %@" = "%1$@ / %2$@";
/* No comment provided by engineer. */
"A new version of %@ is available!" = "已有新版本的 %@ 可供下載!";
"A new version of %@ is available!" = "已有新版本的%@可供下載!";
/* No comment provided by engineer. */
"A new version of %@ is ready to install!" = "已準備安裝新版本的 %@!";
"A new version of %@ is ready to install!" = "已準備安裝新版本的%@!";
/* No comment provided by engineer. */
"An error occurred in retrieving update information. Please try again later." = "擷取更新資訊時發生錯誤。請稍後再試一次。";
@@ -74,7 +74,13 @@
"An error occurred while starting the installer. Please try again later." = "啟動安裝程式時發生錯誤。請稍後再試一次。";
/* No comment provided by engineer. */
"An important update to %@ is ready to install" = "已準備安裝 %@ 的重要更新";
"An important update to %@ is ready to install" = "已準備安裝%@的重要更新";
/* No comment provided by engineer. */
"Application Name" = "应用名称";
/* No comment provided by engineer. */
"Application Version" = "应用版本";
/* No comment provided by engineer. */
"Cancel" = "取消";
@@ -85,6 +91,18 @@
/* No comment provided by engineer. */
"Checking for updates…" = "正在檢查更新項目⋯";
/* No comment provided by engineer. */
"CPU is 64-Bit?" = "CPU是64位的吗?";
/* No comment provided by engineer. */
"CPU Speed (MHz)" = "CPU主频(MHz)";
/* No comment provided by engineer. */
"CPU Subtype" = "CPU子类型";
/* No comment provided by engineer. */
"CPU Type" = "CPU类型";
/* Take care not to overflow the status window. */
"Downloading update…" = "正在下載更新項目⋯";
@@ -106,17 +124,41 @@
/* Alternate title for 'Install Update' button when there's no download in RSS feed. */
"Learn More…" = "瞭解更多⋯";
/* No comment provided by engineer. */
"Mac Model" = "Mac機型";
/* No comment provided by engineer. */
"Memory (MB)" = "記憶體(MB)";
/* No comment provided by engineer. */
"No" = "否";
/* No comment provided by engineer. */
"Number of CPUs" = "CPU數量";
/* No comment provided by engineer. */
"OK" = "好";
/* No comment provided by engineer. */
"Quit %1$@, move it into your Applications folder, relaunch it from there and try again." = "請結束 %1$@ 並移至您的「應用程式」檔案夾,從該處重新啟動後再試一次。";
"OS Version" = "系統版本";
/* No comment provided by engineer. */
"Preferred Language" = "偏好語言";
/* No comment provided by engineer. */
"Quit %1$@, move it into your Applications folder, relaunch it from there and try again." = "請結束%1$@並移至您的「應用程式」檔案夾,從該處重新啟動後再試一次。";
/* No comment provided by engineer. */
"Ready to Install" = "準備安裝";
/* 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 installation failed due to not having permission to write the new update." = "安裝失敗,沒有權限寫入更新。";
/* No comment provided by engineer. */
"The updater failed to start. Please verify you have the latest version of %@ and contact the app developer if the issue still persists. Check the Console logs for more information." = "無法啟動更新程式。請確認您是否正在使用%@的最新版本,若問題仍持續,請聯絡軟體開發者。請查看主控台記錄以取得更多資訊。";
/* No comment provided by engineer. */
"The update is improperly signed and could not be validated. Please try again later or contact the app developer." = "此更新並未正確簽署且無法驗證。請稍後再試一次或聯絡軟體開發者。";
@@ -131,19 +173,25 @@
"Update Installed" = "已安裝更新";
/* No comment provided by engineer. */
"Updating %@" = "正在更新 %@";
"Updating %@" = "正在更新%@";
/* 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 版本過新";
"Yes" = "是";
/* No comment provided by engineer. */
"Your macOS version is too old" = "您的 macOS 版本過舊";
"You may need to allow modifications from %1$@ in System Settings under Privacy & Security and App Management to install future updates." = "若要安裝後續更新,您可能需要在「系統設定」的「隱私權與安全性」→「App管理」中允許%1$@修改應用程式。";
/* 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. */
"You’re up to date!" = "您已有最新版本!";
@@ -15,6 +15,4 @@ SPU_OBJC_DIRECT_MEMBERS @interface SUInstallUpdateViewController : NSViewControl
- (void)showReleaseNotesWithDownloadData:(SPUDownloadData *)downloadData;
- (void)dismissUpdate;
@end
@@ -96,11 +96,6 @@
}
}
- (void)dismissUpdate
{
[self installUpdateLater:nil];
}
- (IBAction)installUpdate:(id)__unused sender
{
if (_reply != nil) {
+1 -16
View File
@@ -10,24 +10,9 @@
#import <Sparkle/Sparkle.h>
@class NSWindow;
@class SUPopUpTitlebarUserDriver;
NS_ASSUME_NONNULL_BEGIN
@protocol SUPopUpTitlebarUserDriverDelegate <NSObject>
- (BOOL)userDriver:(SUPopUpTitlebarUserDriver *)userDriver shouldShowFoundUpdate:(SUAppcastItem *)updateItem state:(SPUUserUpdateState *)state;
@end
SPU_OBJC_DIRECT_MEMBERS @interface SUPopUpTitlebarUserDriver : NSObject <SPUUserDriver>
- (instancetype)initWithWindow:(nullable NSWindow *)window delegate:(id<SUPopUpTitlebarUserDriverDelegate>)delegate;
@property (nonatomic, nullable) NSWindow *window;
- (void)dismissPresentedUpdate;
- (instancetype)initWithWindow:(NSWindow *)window;
@end
NS_ASSUME_NONNULL_END
+1 -19
View File
@@ -18,7 +18,6 @@
SUInstallUpdateViewController *_installUpdateViewController;
NSTitlebarAccessoryViewController *_accessoryViewController;
NSButton *_updateButton;
__weak id<SUPopUpTitlebarUserDriverDelegate> _delegate;
uint64_t _expectedContentLength;
uint64_t _contentLengthDownloaded;
@@ -26,14 +25,11 @@
BOOL _addedAccessory;
}
@synthesize window = _window;
- (instancetype)initWithWindow:(nullable NSWindow *)window delegate:(id<SUPopUpTitlebarUserDriverDelegate>)delegate
- (instancetype)initWithWindow:(NSWindow *)window
{
self = [super init];
if (self != nil) {
_window = window;
_delegate = delegate;
}
return self;
}
@@ -132,22 +128,8 @@
}];
}
- (void)dismissPresentedUpdate
{
[self removeUpdateButton];
[_installUpdateViewController dismissUpdate];
_installUpdateViewController = nil;
}
- (void)showUpdateFoundWithAppcastItem:(SUAppcastItem *)appcastItem state:(SPUUserUpdateState *)state reply:(void (^)(SPUUserUpdateChoice))reply
{
id<SUPopUpTitlebarUserDriverDelegate> delegate = _delegate;
if (delegate != nil && ![delegate userDriver:self shouldShowFoundUpdate:appcastItem state:state]) {
reply(SPUUserUpdateChoiceDismiss);
return;
}
if (appcastItem.informationOnlyUpdate) {
// Todo: show user interface for this
NSLog(@"Found info URL: %@", appcastItem.infoURL);
+13 -88
View File
@@ -15,21 +15,15 @@
#import "SUPopUpTitlebarUserDriver.h"
#import "SUBinaryDeltaCreate.h"
@interface SUTestApplicationDelegate () <NSMenuItemValidation, SPUUpdaterDelegate, SUPopUpTitlebarUserDriverDelegate>
@interface SUTestApplicationDelegate () <NSMenuItemValidation, SPUUpdaterDelegate>
@end
@implementation SUTestApplicationDelegate
{
SPUUpdater *_updater;
SUUpdateSettingsWindowController *_updateSettingsWindowController;
SUTestWebServer *_webServer;
NSString *_testMode;
SPUUpdater *_updater;
SUPopUpTitlebarUserDriver *_popUpUserDriver;
SUAppcastItem *_presentedUpdateItem;
SPUUpdater *_backgroundUpdater;
SUPopUpTitlebarUserDriver *_backgroundPopUpUserDriver;
}
- (void)applicationDidFinishLaunching:(NSNotification * __unused)notification
@@ -170,8 +164,6 @@
abort();
}
NSLog(@"%@", appcastDestinationURL.path);
// Update the appcast with the file size and signature of the update archive
// We could be using some sort of XML parser instead of doing string substitutions, but for now, this is easier
NSError *appcastError = nil;
@@ -289,9 +281,18 @@
NSBundle *hostBundle = [NSBundle mainBundle];
NSBundle *applicationBundle = hostBundle;
self->_popUpUserDriver = [[SUPopUpTitlebarUserDriver alloc] initWithWindow:settingsWindow delegate:self];
id<SPUUserDriver> userDriver;
#if SPARKLE_BUILD_UI_BITS
if (shiftKeyHeldDown) {
userDriver = [[SUPopUpTitlebarUserDriver alloc] initWithWindow:settingsWindow];
} else {
userDriver = [[SPUStandardUserDriver alloc] initWithHostBundle:hostBundle delegate:nil];
}
#else
userDriver = [[SUPopUpTitlebarUserDriver alloc] initWithWindow:settingsWindow];
#endif
SPUUpdater *updater = [[SPUUpdater alloc] initWithHostBundle:hostBundle applicationBundle:applicationBundle userDriver:self->_popUpUserDriver delegate:self];
SPUUpdater *updater = [[SPUUpdater alloc] initWithHostBundle:hostBundle applicationBundle:applicationBundle userDriver:userDriver delegate:self];
self->_updater = updater;
self->_updateSettingsWindowController.updater = updater;
@@ -357,80 +358,4 @@
return YES;
}
- (BOOL)userDriver:(SUPopUpTitlebarUserDriver *)userDriver shouldShowFoundUpdate:(SUAppcastItem *)updateItem state:(SPUUserUpdateState *)state
{
if (userDriver == _popUpUserDriver) {
_presentedUpdateItem = updateItem;
// Start a background updater to check if new updates become available if the user driver holds onto presenting the update for a long period of time
// We only do this if the update has not already been downloaded
// If the update has already been downloaded but not installed yet (due to requiring auth), trying to disregard the shown update could lead to a worse experience.
// If the stage is at SPUUserUpdateStageInstalling, there's nothing we can do. Any background update check will return the same update from the installer agent as long as user hasn't skipped/canceled the update.
// If the stage is at SPUUserUpdateStageDownloaded, an update from A -> B and B -> C could be more bandwidth efficient than A -> C if delta updates are used. Note that SPUUserUpdateStageInstalling is more common stage than SPUUserUpdateStageDownloaded (more users don't require authorization).
if (_backgroundUpdater == nil && state.stage == SPUUserUpdateStageNotDownloaded) {
NSBundle *mainBundle = [NSBundle mainBundle];
_backgroundPopUpUserDriver = [[SUPopUpTitlebarUserDriver alloc] initWithWindow:nil delegate:self];
_backgroundUpdater = [[SPUUpdater alloc] initWithHostBundle:mainBundle applicationBundle:mainBundle userDriver:_backgroundPopUpUserDriver delegate:self];
NSError *backgroundError = nil;
if (![_backgroundUpdater startUpdater:&backgroundError]) {
NSLog(@"Error: failed to start background updater: %@", backgroundError);
[self invalidateBackgroundUpdater];
}
}
return YES;
}
assert(userDriver == _backgroundPopUpUserDriver && _presentedUpdateItem != nil);
if ([updateItem.versionString isEqualToString:_presentedUpdateItem.versionString]) {
// Retry again
return NO;
}
[self replaceUpdaterWithBackgroundUpdater];
return YES;
}
- (void)updater:(SPUUpdater *)updater userDidMakeChoice:(SPUUserUpdateChoice)choice forUpdate:(SUAppcastItem *)updateItem state:(SPUUserUpdateState *)state
{
if (updater == _updater) {
// User chose an action to dismiss or download/install an update
// At this point we no longer need the background updater.
[self invalidateBackgroundUpdater];
}
}
- (void)updater:(SPUUpdater *)updater willDownloadUpdate:(SUAppcastItem *)updateItem withRequest:(NSMutableURLRequest *)request
{
if (updater == _backgroundUpdater) {
// If the background updater skipped the user driver and started downloading updates automatically (e.g. if the user turned on automaticallyDownloadsUpdates / SUAutomaticallyUpdate),
// then use this to-be downloaded update and respect user's choice to try to silently automatically download updates
[self replaceUpdaterWithBackgroundUpdater];
}
}
- (void)replaceUpdaterWithBackgroundUpdater
{
_updater = _backgroundUpdater;
[_popUpUserDriver dismissPresentedUpdate];
_popUpUserDriver = _backgroundPopUpUserDriver;
[self invalidateBackgroundUpdater];
_popUpUserDriver.window = _updateSettingsWindowController.window;
// It's very important that there are no more strong references to the old background updater,
// otherwise it may continue running. Here for example we need to update one of our window controller's updater reference.
_updateSettingsWindowController.updater = _updater;
}
- (void)invalidateBackgroundUpdater
{
_backgroundPopUpUserDriver = nil;
_backgroundUpdater = nil;
_presentedUpdateItem = nil;
}
@end
+3
View File
@@ -52,6 +52,9 @@ class SUTestApplicationTest: XCTestCase
let checkForUpdatesMenuItem = menuBarsQuery.menuItems["Check for Updates…"]
if checkForUpdatesMenuItem.isEnabled {
checkForUpdatesMenuItem.click()
// Give some time to wait for window to show up
sleep(5)
} else {
// We haven't checked for updates in a while so an automatic check was already done
// in this case click the main menu again to deactivate it