Browse Source

start helper app

works_for_me Release_2.1.0-RC4
Volker Birk 2 years ago
parent
commit
a6879dfa58
2 changed files with 14 additions and 1 deletions
  1. +1
    -1
      pEpMacOSAdapter/Makefile
  2. +13
    -0
      pEpMacOSAdapter/main.m

+ 1
- 1
pEpMacOSAdapter/Makefile View File

@ -27,7 +27,7 @@ LDFLAGS+=$(BOOST_LIB)/libboost_regex.a $(BOOST_LIB)/libboost_iostreams.a $(BOOST
LDFLAGS+=$(CRYPTOPP_LIB)/libcryptopp.a
LDFLAGS+=$(OPENSSL_LIB)/libssl.a $(OPENSSL_LIB)/libcrypto.a
LDFLAGS+=$(DOWNLOADCLIENT)/libdownloadclient.a
LDFLAGS+=-lobjc -framework Foundation
LDFLAGS+=-lobjc -framework Foundation -framework AppKit
ifdef NDEBUG
CFLAGS+=-O3 -DNDEBUG


+ 13
- 0
pEpMacOSAdapter/main.m View File

@ -9,6 +9,7 @@
#include <signal.h>
#import <Foundation/Foundation.h>
#import <AppKit/NSWorkspace.h>
#import "pEpMacOSAdapter.h"
#import "pEpUpdater.h"
@ -53,6 +54,14 @@ pEpUpdater* updater = nil;
@end
BOOL start_helper(void)
{
NSURL *url = [NSURL
fileURLWithPath:@"/Library/Application Support/pEp/pEp.app/Contents/Library/LoginItems/pp updates.app"];
return [[NSWorkspace sharedWorkspace] openURL:url];
}
void signal_TERM(int signal)
{
NSLog(@"stopping agent");
@ -73,6 +82,10 @@ int main(int argc, const char *argv[])
listener.delegate = delegate;
[listener resume];
// start the GUI helper app
BOOL opened = start_helper();
assert(opened);
NSLog(@"going into main runLoop");
NSRunLoop* runLoop = [NSRunLoop currentRunLoop];
[runLoop run];


Loading…
Cancel
Save