From 690f04e356a9d1a3dc569b5c48dc95bda595280f Mon Sep 17 00:00:00 2001 From: andym Date: Wed, 14 Nov 2007 11:08:41 +0000 Subject: [PATCH] Fixed the relaunch tool to have Leoaprd compatibility (thanks, Cedric Luthi) --- Sparkle.xcodeproj/project.pbxproj | 2 +- relaunch.m | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 9e324498..0e12b328 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -72,7 +72,7 @@ isa = PBXContainerItemProxy; containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; proxyType = 1; - remoteGlobalIDString = D1E42C2E0CE754AE00F50EB9 /* Relaunch Tool */; + remoteGlobalIDString = D1E42C2E0CE754AE00F50EB9; remoteInfo = "Relaunch Tool"; }; /* End PBXContainerItemProxy section */ diff --git a/relaunch.m b/relaunch.m index 489a196a..568e759e 100644 --- a/relaunch.m +++ b/relaunch.m @@ -47,7 +47,7 @@ - (void) relaunch { [[NSWorkspace sharedWorkspace] launchApplication:[NSString stringWithUTF8String:executablePath]]; - [NSApp terminate:self]; + [NSApp stop:self]; } @end @@ -60,9 +60,8 @@ int main (int argc, const char * argv[]) [NSApplication sharedApplication]; [[[TerminationListener alloc] initWithExecutablePath:argv[1] parentProcessId:atoi(argv[2])] autorelease]; - [NSApp run]; + [[NSApplication sharedApplication] run]; - // This will not be executed because -[NSApp terminate:] is called [pool release]; return EXIT_SUCCESS;