mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Merge pull request #15705 from danteruiz/allowing-launching-from-dmg
BUGZ-588: MAC LAUNCHER: We can not run from inside of the DMG
This commit is contained in:
commit
355249a402
2 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue