mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Launch AutoUpdate via LaunchServices again.
I was being stupid for trying to launch the executable rather than the app.
This commit is contained in:
1 parent
a3a2310952
commit
38a69cee5b
2 files changed
+8
-8
No files matched your search
@@ -9,6 +9,7 @@
|
||||
#import "SUInstallerLauncher.h"
|
||||
#import "SUFileManager.h"
|
||||
#import "SULog.h"
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
@implementation SUInstallerLauncher
|
||||
|
||||
@@ -23,15 +24,14 @@
|
||||
SULog(@"Failed to release quarantine on installer at %@ with error %@", installerPath, quarantineError);
|
||||
}
|
||||
|
||||
BOOL taskDidLaunch = NO;
|
||||
@try {
|
||||
[NSTask launchedTaskWithLaunchPath:installerPath arguments:arguments];
|
||||
taskDidLaunch = YES;
|
||||
} @catch (NSException *exception) {
|
||||
SULog(@"Raised exception when launching update tool: %@", exception);
|
||||
NSError *launchError = nil;
|
||||
NSRunningApplication *runningApplication = [[NSWorkspace sharedWorkspace] launchApplicationAtURL:[NSURL fileURLWithPath:installerPath] options:NSWorkspaceLaunchDefault configuration:@{NSWorkspaceLaunchConfigurationArguments : arguments} error:&launchError];
|
||||
|
||||
if (runningApplication != nil) {
|
||||
SULog(@"Failed to launch AutoUpdate app with error: %@", launchError);
|
||||
}
|
||||
|
||||
completionHandler(taskDidLaunch);
|
||||
completionHandler(runningApplication != nil);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -360,7 +360,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
NSString *relaunchToolPath = [[NSBundle bundleWithPath:relaunchPath] executablePath];
|
||||
NSString *relaunchToolPath = [[NSBundle bundleWithPath:relaunchPath] bundlePath];
|
||||
if (!relaunchToolPath || ![[NSFileManager defaultManager] fileExistsAtPath:relaunchPath]) {
|
||||
// Note that we explicitly use the host app's name here, since updating plugin for Mail relaunches Mail, not just the plugin.
|
||||
NSError *error =
|
||||
|
||||
Reference in new issue
Block a user