mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 13:12:39 +02:00
allow launcher to work from mounted dmg
This commit is contained in:
parent
1e827a925a
commit
00baaffb97
4 changed files with 11 additions and 5 deletions
|
@ -46,6 +46,8 @@
|
|||
NSString* downloadFileName = [sharedLauncher getDownloadFilename];
|
||||
|
||||
NSLog(@"extract interface zip");
|
||||
NSLog(@"%@", appPath);
|
||||
NSLog(@"%@", [appPath stringByAppendingString:downloadFileName]);
|
||||
[sharedLauncher extractZipFileAtDestination:appPath :[appPath stringByAppendingString:downloadFileName]];
|
||||
NSLog(@"finished extracting interface zip");
|
||||
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ void redirectLogToDocuments()
|
|||
|
||||
int main(int argc, const char* argv[]) {
|
||||
//NSApp.appearance = [NSAppearance appearanceNamed: NSAppearanceNameAqua];
|
||||
redirectLogToDocuments();
|
||||
//redirectLogToDocuments();
|
||||
NSArray* apps = [NSRunningApplication runningApplicationsWithBundleIdentifier:@"com.highfidelity.launcher"];
|
||||
if ([apps count] > 1) {
|
||||
NSLog(@"launcher is already running");
|
||||
|
|
Loading…
Reference in a new issue