From 99991c3259665910322eefbbb42f5496dbb6a61b Mon Sep 17 00:00:00 2001 From: dante ruiz Date: Mon, 15 Jul 2019 15:48:24 -0700 Subject: [PATCH] fix signing crash --- interface/interface.entitlements | 14 ++++++++++---- launchers/darwin/HQ Launcher.entitlements | 8 ++++---- launchers/darwin/src/Launcher.m | 8 +++++++- launchers/darwin/src/main.mm | 2 +- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/interface/interface.entitlements b/interface/interface.entitlements index 22747cbc32..800200933c 100644 --- a/interface/interface.entitlements +++ b/interface/interface.entitlements @@ -4,13 +4,19 @@ com.apple.security.app-sandbox + com.apple.security.application-groups + + high-fidelity.hifi + + com.apple.security.cs.allow-jit + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.device.audio-input + com.apple.security.network.client com.apple.security.network.server - com.apple.security.application-groups - - high-fidelity.hifi - diff --git a/launchers/darwin/HQ Launcher.entitlements b/launchers/darwin/HQ Launcher.entitlements index 0f41736b78..5c5393f915 100644 --- a/launchers/darwin/HQ Launcher.entitlements +++ b/launchers/darwin/HQ Launcher.entitlements @@ -4,11 +4,11 @@ com.apple.security.app-sandbox + com.apple.security.application-groups + + high-fidelity.hifi + com.apple.security.network.client - com.apple.security.application-groups - - high-fideilty.hifi - diff --git a/launchers/darwin/src/Launcher.m b/launchers/darwin/src/Launcher.m index 1a84e9143d..8e9f5a982e 100644 --- a/launchers/darwin/src/Launcher.m +++ b/launchers/darwin/src/Launcher.m @@ -226,9 +226,15 @@ static BOOL const DELETE_ZIP_FILES = TRUE; NSWorkspace* workspace = [NSWorkspace sharedWorkspace]; NSArray* apps = [workspace runningApplications]; for (NSRunningApplication* app in apps) { + NSLog(@"app: %@", [app bundleIdentifier]); if ([[app bundleIdentifier] isEqualToString:@"com.highfidelity.interface"] || [[app bundleIdentifier] isEqualToString:@"com.highfidelity.interface-pr"]) { - [app terminate]; + pid_t pid = [app processIdentifier]; + int status = kill(pid, SIGTERM); + + NSLog(@"exit status %d", status); + /*BOOL success = [app forceTerminate]; + NSLog(success ? @"SUCCESSSFUL" : @"NOT SUCCESSFUL");*/ self.waitingForInterfaceToTerminate = true; } } diff --git a/launchers/darwin/src/main.mm b/launchers/darwin/src/main.mm index b6555aad87..4d66d15549 100644 --- a/launchers/darwin/src/main.mm +++ b/launchers/darwin/src/main.mm @@ -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");