mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-28 05:14:34 +00:00
Rename registerRelaunchBundlePath to registerApplicationBundlePath
This commit is contained in:
1 parent
6f337aa6f3
commit
251feb7e07
3 files changed
+10
-10
No files matched your search
@@ -299,7 +299,7 @@ static const NSTimeInterval SUDisplayProgressTimeDelay = 0.7;
|
||||
// For a plug-in this makes a big difference; we want to wait until the app hosting the plug-in terminates
|
||||
// Otherwise for an app, the relaunch path and host path should be identical
|
||||
|
||||
[self.agentConnection.agent registerRelaunchBundlePath:self.relaunchPath reply:^(NSNumber * _Nullable processIdentifier) {
|
||||
[self.agentConnection.agent registerApplicationBundlePath:self.relaunchPath reply:^(NSNumber * _Nullable processIdentifier) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
self.terminationListener = [[TerminationListener alloc] initWithProcessIdentifier:processIdentifier];
|
||||
[self startInstallation];
|
||||
|
||||
@@ -192,17 +192,17 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.3;
|
||||
return [matchedRunningApplications copy];
|
||||
}
|
||||
|
||||
- (void)registerRelaunchBundlePath:(NSString *)relaunchBundlePath reply:(void (^)(NSNumber *))reply
|
||||
- (void)registerApplicationBundlePath:(NSString *)applicationBundlePath reply:(void (^)(NSNumber *))reply
|
||||
{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if (relaunchBundlePath != nil && !self.willTerminate) {
|
||||
NSBundle *relaunchBundle = [NSBundle bundleWithPath:relaunchBundlePath];
|
||||
if (relaunchBundle == nil) {
|
||||
SULog(@"Error: Encountered invalid path for waiting termination: %@", relaunchBundlePath);
|
||||
if (applicationBundlePath != nil && !self.willTerminate) {
|
||||
NSBundle *applicationBundle = [NSBundle bundleWithPath:applicationBundlePath];
|
||||
if (applicationBundle == nil) {
|
||||
SULog(@"Error: Encountered invalid path for waiting termination: %@", applicationBundlePath);
|
||||
[self cleanupAndExitWithStatus:EXIT_FAILURE];
|
||||
}
|
||||
|
||||
NSArray<NSRunningApplication *> *runningApplications = [self runningApplicationsWithBundle:relaunchBundle];
|
||||
NSArray<NSRunningApplication *> *runningApplications = [self runningApplicationsWithBundle:applicationBundle];
|
||||
|
||||
// We're just picking the first running application to send..
|
||||
// Ideally we'd send them all and have the installer monitor all of them but I don't want to deal with that complexity at the moment
|
||||
@@ -216,7 +216,7 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.3;
|
||||
reply(processIdentifier);
|
||||
|
||||
self.repliedToRegistration = YES;
|
||||
self.applicationBundle = relaunchBundle;
|
||||
self.applicationBundle = applicationBundle;
|
||||
self.applicationInitiallyAlive = (processIdentifier != nil);
|
||||
}
|
||||
});
|
||||
@@ -243,7 +243,7 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.3;
|
||||
});
|
||||
}
|
||||
|
||||
// The pathToRelaunch passed to here is not necessarily the same as the one passed in -registerRelaunchBundlePath:reply: if the developer uses SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME
|
||||
// The pathToRelaunch passed to here is not necessarily the same as the one passed in -registerApplicationBundlePath:reply: if the developer uses SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME
|
||||
// Note the installer won't tell us to launch an application unless it was already running before
|
||||
- (void)relaunchPath:(NSString *)pathToRelaunch
|
||||
{
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol SPUInstallerAgentProtocol
|
||||
|
||||
- (void)registerRelaunchBundlePath:(NSString *)relaunchBundlePath reply:(void (^)(NSNumber * _Nullable processIdentifier))reply;
|
||||
- (void)registerApplicationBundlePath:(NSString *)applicationBundlePath reply:(void (^)(NSNumber * _Nullable processIdentifier))reply;
|
||||
|
||||
- (void)registerInstallationInfoData:(NSData *)installationInfoData;
|
||||
|
||||
|
||||
Reference in new issue
Block a user