mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-27 05:04:27 +00:00
Rename un/nonguided package to interactive package, and guided to normal
This commit is contained in:
1 parent
097710e27a
commit
0d0258a87f
5 files changed
+14
-14
No files matched your search
@@ -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];
|
||||
|
||||
Vendored
+2
-2
@@ -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.
|
||||
|
||||
Vendored
+3
-3
@@ -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 */
|
||||
Vendored
+2
-2
@@ -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) }]];
|
||||
|
||||
Vendored
+1
-1
@@ -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];
|
||||
|
||||
Reference in new issue
Block a user