mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Merge pull request #1771 from sparkle-project/fix-1768
Fix XQuartz update failing because NSLog caused issues
This commit is contained in:
7 files changed
+36
-10
No files matched your search
@@ -281,6 +281,8 @@
|
||||
72AC6B2A1B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B291B9AAF3A00F62325 /* SparkleTestCodeSignApp.tar.bz2 */; };
|
||||
72AC6B2C1B9AB0EE00F62325 /* SparkleTestCodeSignApp.tar.xz in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B2B1B9AB0EE00F62325 /* SparkleTestCodeSignApp.tar.xz */; };
|
||||
72AC6B2E1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B2D1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg */; };
|
||||
72C4AB7A25E0B4C500D14562 /* SULog.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C14F05136EF6DB00649790 /* SULog.m */; };
|
||||
72C4ABAB25E0BF1900D14562 /* SULog.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C14F05136EF6DB00649790 /* SULog.m */; };
|
||||
72D4DAA11AD7632900B211E2 /* SUBinaryDeltaCreate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7268AC621AD634C200C3E0C1 /* SUBinaryDeltaCreate.m */; };
|
||||
72E1D7DD25A3E3AD0001BA6D /* SUWebViewCommon.m in Sources */ = {isa = PBXBuildFile; fileRef = 72E1D7D625A3E3AC0001BA6D /* SUWebViewCommon.m */; };
|
||||
72E1D7DE25A3E3AD0001BA6D /* SUWebViewCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 72E1D7D725A3E3AC0001BA6D /* SUWebViewCommon.h */; };
|
||||
@@ -2417,6 +2419,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
72C4ABAB25E0BF1900D14562 /* SULog.m in Sources */,
|
||||
14652F7D19A9726700959E44 /* SUBinaryDeltaApply.m in Sources */,
|
||||
14652F7C19A9725300959E44 /* SUBinaryDeltaCommon.m in Sources */,
|
||||
7268AC631AD634C200C3E0C1 /* SUBinaryDeltaCreate.m in Sources */,
|
||||
@@ -2469,6 +2472,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
72C4AB7A25E0B4C500D14562 /* SULog.m in Sources */,
|
||||
722954B71D04ADAF00ECF9CA /* fileop.m in Sources */,
|
||||
722954BD1D04AE3800ECF9CA /* SUConstants.m in Sources */,
|
||||
722954BC1D04AE1100ECF9CA /* SUFileManager.m in Sources */,
|
||||
|
||||
Vendored
+4
-2
@@ -136,7 +136,7 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.5;
|
||||
self.statusController = [[SUStatusController alloc] initWithHost:host];
|
||||
[self.statusController setButtonTitle:SULocalizedString(@"Cancel Update", @"") target:nil action:Nil isDefault:NO];
|
||||
[self.statusController beginActionWithTitle:SULocalizedString(@"Installing update...", @"")
|
||||
maxProgressValue:100 statusText: @""];
|
||||
maxProgressValue:installer.supportsDeterminateProgress ? 100 : 0 statusText: @""];
|
||||
[self.statusController showWindow:self];
|
||||
}
|
||||
|
||||
@@ -153,7 +153,9 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.5;
|
||||
|
||||
void(^progressBlock)(double) = ^(double progress){
|
||||
dispatch_async(dispatch_get_main_queue(), ^(){
|
||||
self.statusController.progressValue = progress * 100.0;
|
||||
if (installer.supportsDeterminateProgress) {
|
||||
self.statusController.progressValue = progress * 100.0;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Vendored
+9
-8
@@ -10,6 +10,7 @@
|
||||
#import "SUOperatingSystem.h"
|
||||
#import "SUFileOperationConstants.h"
|
||||
|
||||
#import "SULog.h"
|
||||
#import "SUErrors.h"
|
||||
|
||||
#include <sys/xattr.h>
|
||||
@@ -320,7 +321,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSLog(@"Sparkle: Authorization required to remove quarantine %@", rootURL);
|
||||
SULog(SULogLevelDefault, @"Sparkle: Authorization required to remove quarantine: %@", rootURL);
|
||||
|
||||
NSError *executeError = nil;
|
||||
BOOL success = [self _authorizeAndExecuteCommand:SUFileOpRemoveQuarantineCommand sourcePath:path destinationPath:NULL error:&executeError];
|
||||
@@ -520,7 +521,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSLog(@"Sparkle: Authorization required to copy %@ to %@", sourceURL, destinationURL);
|
||||
SULog(SULogLevelDefault, @"Sparkle: Authorization required to copy %@ to %@", sourceURL, destinationURL);
|
||||
|
||||
NSError *executeError = nil;
|
||||
if (![self _authorizeAndExecuteCommand:SUFileOpCopyCommand sourcePath:sourcePath destinationPath:destinationPath error:&executeError]) {
|
||||
@@ -614,7 +615,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSLog(@"Sparkle: Authorization required to move %@ to %@", sourceURL, destinationURL);
|
||||
SULog(SULogLevelDefault, @"Sparkle: Authorization required to move %@ to %@", sourceURL, destinationURL);
|
||||
|
||||
char sourcePath[PATH_MAX] = {0};
|
||||
if (![sourceURL.path getFileSystemRepresentation:sourcePath maxLength:sizeof(sourcePath)]) {
|
||||
@@ -785,7 +786,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSLog(@"Sparkle: Authorization required to change permissions of %@ to match %@", targetURL, matchURL);
|
||||
SULog(SULogLevelDefault, @"Sparkle: Authorization required to change permissions of %@ to match %@", targetURL, matchURL);
|
||||
|
||||
NSError *executeError = nil;
|
||||
BOOL success = [self _authorizeAndExecuteCommand:SUFileOpChangeOwnerAndGroupCommand sourcePath:targetPath destinationPath:matchPath error:&executeError];
|
||||
@@ -844,7 +845,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSLog(@"Sparkle: Authorization required to update timestamp of %@", targetURL);
|
||||
SULog(SULogLevelDefault, @"Sparkle: Authorization required to update timestamp of %@", targetURL);
|
||||
|
||||
NSError *executeError = nil;
|
||||
BOOL success = [self _authorizeAndExecuteCommand:SUFileOpUpdateModificationAndAccessTimeCommand sourcePath:path destinationPath:NULL error:&executeError];
|
||||
@@ -888,7 +889,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSLog(@"Sparkle: Authorization required to make directory %@", url);
|
||||
SULog(SULogLevelDefault, @"Sparkle: Authorization required to make directory %@", url);
|
||||
|
||||
char path[PATH_MAX] = {0};
|
||||
if (![url.path getFileSystemRepresentation:path maxLength:sizeof(path)]) {
|
||||
@@ -952,7 +953,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSLog(@"Sparkle: Authorization required to delete %@", url);
|
||||
SULog(SULogLevelDefault, @"Sparkle: Authorization required to delete %@", url);
|
||||
|
||||
char path[PATH_MAX] = {0};
|
||||
if (![url.path getFileSystemRepresentation:path maxLength:sizeof(path)]) {
|
||||
@@ -990,7 +991,7 @@ static BOOL SUMakeRefFromURL(NSURL *url, FSRef *ref, NSError **error) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSLog(@"Sparkle: Authorization required to run pkg installer %@", packageURL);
|
||||
SULog(SULogLevelDefault, @"Sparkle: Authorization required to run pkg installer %@", packageURL);
|
||||
|
||||
NSError *executeError = nil;
|
||||
BOOL success = [self _authorizeAndExecuteCommand:SUFileOpInstallCommand sourcePath:path destinationPath:NULL lineCallback:^(NSString *line){
|
||||
|
||||
Vendored
+7
@@ -54,4 +54,11 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
// We used to, but it broke due to fragile text processing
|
||||
// Maybe one day someone will fix it, but until then.
|
||||
- (BOOL)supportsDeterminateProgress
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
Vendored
+2
@@ -31,6 +31,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
// Should be thread safe
|
||||
- (NSString *)installationPath;
|
||||
|
||||
- (BOOL)supportsDeterminateProgress;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Vendored
+5
@@ -78,4 +78,9 @@ static NSString *SUOpenUtilityPath = @"/usr/bin/open";
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)supportsDeterminateProgress
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
Vendored
+5
@@ -265,4 +265,9 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)supportsDeterminateProgress
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user