Don't show installer progress if installer already displays progress

This commit is contained in:
Zorg committed 2016-04-09 15:29:18 -04:00
1 parent 33bd47cd1f
commit bb3a2e299e
5 files changed
+19 -1

No files matched your search

+1 -1
View File
@@ -491,7 +491,7 @@ static const NSTimeInterval SUDisplayProgressTimeDelay = 0.7;
__block BOOL shouldLaunchInstallerProgress = YES;
NSString *progressToolPath = self.installationData.progressToolPath;
if (progressToolPath != nil && self.shouldShowUI) {
if (progressToolPath != nil && self.shouldShowUI && ![self.installer displaysUserProgress]) {
NSURL *progressToolURL = [NSURL fileURLWithPath:progressToolPath];
if (progressToolURL != nil) {
NSError *quarantineError = nil;
+3
View File
@@ -26,6 +26,9 @@
// Should be able to be called from non-main thread
- (BOOL)performThirdStage:(NSError **)error;
// Indicates whether or not this installer will show the user visible installation progress
- (BOOL)displaysUserProgress;
// Cleans up work done from any of the previous stages. This should be invoked after stage 3 succeeds,
// or after any one of the stages fails.
// Should be able to be called from non-main thread
+5
View File
@@ -169,6 +169,11 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza
return validInstallation;
}
- (BOOL)displaysUserProgress
{
return NO;
}
- (void)cleanup
{
}
+5
View File
@@ -72,6 +72,11 @@ static NSString *SUOpenUtilityPath = @"/usr/bin/open";
return YES;
}
- (BOOL)displaysUserProgress
{
return YES;
}
- (void)cleanup
{
}
+5
View File
@@ -239,6 +239,11 @@
return [self startInstallationToURL:[NSURL fileURLWithPath:self.installationPath] fromUpdateAtURL:[NSURL fileURLWithPath:self.applicationPath] withHost:self.host error:error];
}
- (BOOL)displaysUserProgress
{
return NO;
}
- (void)cleanup
{
SUFileManager *fileManager = [self.fileManager fileManagerByPreservingAuthorizationRights];;