Rename un/nonguided package to interactive package, and guided to normal

This commit is contained in:
Zorg committed 2016-07-29 00:22:52 -04:00
1 parent 097710e27a
commit 0d0258a87f
5 files changed
+14 -14

No files matched your search

+6 -6
View File
@@ -93,11 +93,11 @@
}
if (isPackage) {
// Guided installs used to be opt-in (i.e, Sparkle would detect foo.sparkle_guided.pkg or foo.sparkle_guided.mpkg),
// but to get an unguided install, the developer now must opt-out of guided installations.
// 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_unguided.pkg or foo.sparkle_unguided.mpkg
if ([[[newAppDownloadPath stringByDeletingPathExtension] pathExtension] isEqualToString:@"sparkle_unguided"]) {
// foo.app -> foo.sparkle_interactive.pkg or foo.sparkle_interactive.mpkg
if ([[[newAppDownloadPath stringByDeletingPathExtension] pathExtension] isEqualToString:@"sparkle_interactive"]) {
isGuided = NO;
}
}
@@ -139,9 +139,9 @@
installer = [[SUGuidedPackageInstaller alloc] initWithPackagePath:newDownloadPath];
}
} else if (isPackage) {
if (![expectedInstallationType isEqualToString:SUInstallationTypePackage]) {
if (![expectedInstallationType isEqualToString:SUInstallationTypeInteractivePackage]) {
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, SUInstallationTypePackage] }];
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Found package installer but '%@=%@' was probably missing in the appcast item enclosure", SUAppcastAttributeInstallationType, SUInstallationTypeInteractivePackage] }];
}
} else {
installer = [[SUPackageInstaller alloc] initWithPackagePath:newDownloadPath];
+2 -2
View File
@@ -284,8 +284,8 @@ static NSString *SUAppcastItemInstallationTypeKey = @"SUAppcastItemInstallationT
*error = [NSString stringWithFormat:@"Feed item's enclosure lacks valid %@ (found %@)", SUAppcastAttributeInstallationType, _installationType];
}
return nil;
} else if ([_installationType isEqualToString:SUInstallationTypePackage]) {
SULog(@"warning: '%@' for %@ is deprecated. Use '%@' instead.", SUInstallationTypePackage, SUAppcastAttributeInstallationType, SUInstallationTypeGuidedPackage);
} else if ([_installationType isEqualToString:SUInstallationTypeInteractivePackage]) {
SULog(@"warning: '%@' for %@ is deprecated. Use '%@' instead.", SUInstallationTypeInteractivePackage, SUAppcastAttributeInstallationType, SUInstallationTypeGuidedPackage);
}
// Find the appropriate release notes URL.
+3 -3
View File
@@ -10,11 +10,11 @@
#define SUInstallationType_h
#define SUInstallationTypeApplication @"application" // the default installation type for ordinary application updates
#define SUInstallationTypeGuidedPackage @"guided-package" // the preferred installation type for package installations
#define SUInstallationTypePackage @"package" // the deprecated installation type; use guided package instead
#define SUInstallationTypeGuidedPackage @"package" // the preferred installation type for package installations
#define SUInstallationTypeInteractivePackage @"interactive-package" // the deprecated installation type; use guided package instead
#define SUInstallationTypeDefault SUInstallationTypeApplication
#define SUInstallationTypesArray (@[SUInstallationTypeApplication, SUInstallationTypeGuidedPackage, SUInstallationTypePackage])
#define SUInstallationTypesArray (@[SUInstallationTypeApplication, SUInstallationTypeGuidedPackage, SUInstallationTypeInteractivePackage])
#define SUValidInstallationType(x) ((x != nil) && [SUInstallationTypesArray containsObject:x])
#endif /* SUInstallationType_h */
+2 -2
View File
@@ -262,8 +262,8 @@
updaterAllowsInteraction = [self.updaterDelegate updaterShouldAllowInstallerInteraction:self.updater];
}
// Note only non-guided package updates cannot be performed silently (which is one reason why they're deprecated)
// A consequence of this is it may not be possible for the installer to install the update (via a non-guided package)
// Note only interactive package updates cannot be performed silently (which is one reason why they're deprecated)
// A consequence of this is it may not be possible for the installer to install the update (via an interactive package)
// if the application to relaunch has already been terminated because the installer won't wait for us to decide to show UI in that case
if (!canInstallSilently && !updaterAllowsInteraction) {
[self.delegate installerIsRequestingAbortInstallWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{ NSLocalizedDescriptionKey:SULocalizedString(@"An interactive installation could not be performed because the updater disallowed it.", nil) }]];
+1 -1
View File
@@ -14,7 +14,7 @@ BOOL SUNeedsSystemAuthorizationAccess(NSString *path, NSString *installationType
BOOL result;
if ([installationType isEqualToString:SUInstallationTypeGuidedPackage]) {
result = YES;
} else if ([installationType isEqualToString:SUInstallationTypePackage]) {
} else if ([installationType isEqualToString:SUInstallationTypeInteractivePackage]) {
result = NO;
} else {
NSFileManager *fileManager = [NSFileManager defaultManager];