diff --git a/launchers/darwin/src/Launcher.h b/launchers/darwin/src/Launcher.h index 5838e25a82..69484a378d 100644 --- a/launchers/darwin/src/Launcher.h +++ b/launchers/darwin/src/Launcher.h @@ -57,6 +57,7 @@ typedef enum LoginErrorTypes - (BOOL) loginShouldSetErrorState; - (void) displayErrorPage; - (void) showLoginScreen; +- (NSString*) getLauncherPath; - (ProcessState) currentProccessState; - (void) setCurrentProcessState:(ProcessState) aProcessState; - (void) setLoginErrorState:(LoginError) aLoginError; diff --git a/launchers/darwin/src/Launcher.m b/launchers/darwin/src/Launcher.m index 07fc8878da..3ab4379e7a 100644 --- a/launchers/darwin/src/Launcher.m +++ b/launchers/darwin/src/Launcher.m @@ -73,6 +73,11 @@ static BOOL const DELETE_ZIP_FILES = TRUE; return filePath; } +- (NSString*) getLauncherPath +{ + return [[[NSBundle mainBundle] bundlePath] stringByAppendingString:@"/Contents/MacOS/"]; +} + - (void) extractZipFileAtDestination:(NSString *)destination :(NSString*)file { NSTask* task = [[NSTask alloc] init]; @@ -174,7 +179,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE; - (NSString*) getAppPath { - return [[[NSBundle mainBundle] bundlePath] stringByAppendingString:@"/Contents/MacOS/"]; + return [self getDownloadPathForContentAndScripts]; } - (BOOL) loginShouldSetErrorState @@ -317,7 +322,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE; - (void) launchInterface { - NSString* launcherPath = [[self getAppPath] stringByAppendingString:@"HQ Launcher"]; + NSString* launcherPath = [[self getLauncherPath] stringByAppendingString:@"HQ Launcher"]; [[Settings sharedSettings] setLauncherPath:launcherPath]; [[Settings sharedSettings] save]; @@ -351,8 +356,6 @@ static BOOL const DELETE_ZIP_FILES = TRUE; } [workspace launchApplicationAtURL:url options:NSWorkspaceLaunchNewInstance configuration:[NSDictionary dictionaryWithObject:arguments forKey:NSWorkspaceLaunchConfigurationArguments] error:&error]; - //NSLog(@"arguments %@", [NSDictionary dictionaryWithObject:arguments forKey:NSWorkspaceLaunchConfigurationArguments]); - [NSApp terminate:self]; }