Browse Source

APPLEMAIL-24 Refactor xpc service plist. Modify linker flags in libraries path to relative path. Add constant service name

APPLEMAIL-24
David Alarcon 2 years ago
parent
commit
963c5bd2aa
3 changed files with 19 additions and 18 deletions
  1. +14
    -14
      pEpMacOSAdapter.xcodeproj/project.pbxproj
  2. +4
    -3
      pEpMacOSAdapter/main.m
  3. +1
    -1
      pEpMacOSAdapter/pEp.foundation.pEpMacOSAdapter.plist

+ 14
- 14
pEpMacOSAdapter.xcodeproj/project.pbxproj View File

@ -319,13 +319,13 @@
"$(PROJECT_DIR)/../local/lib",
);
OTHER_LDFLAGS = (
/Users/davidalarcon/src/local/lib/libboost_iostreams.a,
/Users/davidalarcon/src/local/lib/libboost_regex.a,
/Users/davidalarcon/src/local/lib/libboost_system.a,
/Users/davidalarcon/src/local/lib/libcrypto.a,
/Users/davidalarcon/src/local/lib/libcryptopp.a,
/Users/davidalarcon/src/local/lib/libssl.a,
/Users/davidalarcon/src/downloadclient/libdownloadclient.a,
../local/lib/libboost_iostreams.a,
../local/lib/libboost_regex.a,
../local/lib/libboost_system.a,
../local/lib/libcrypto.a,
../local/lib/libcryptopp.a,
../local/lib/libssl.a,
../downloadclient/libdownloadclient.a,
);
PRODUCT_BUNDLE_IDENTIFIER = pEp.foundation.pEpMacOSAdapter;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -351,13 +351,13 @@
"$(PROJECT_DIR)/../local/lib",
);
OTHER_LDFLAGS = (
/Users/davidalarcon/src/local/lib/libboost_iostreams.a,
/Users/davidalarcon/src/local/lib/libboost_regex.a,
/Users/davidalarcon/src/local/lib/libboost_system.a,
/Users/davidalarcon/src/local/lib/libcrypto.a,
/Users/davidalarcon/src/local/lib/libcryptopp.a,
/Users/davidalarcon/src/local/lib/libssl.a,
/Users/davidalarcon/src/downloadclient/libdownloadclient.a,
../local/lib/libboost_iostreams.a,
../local/lib/libboost_regex.a,
../local/lib/libboost_system.a,
../local/lib/libcrypto.a,
../local/lib/libcryptopp.a,
../local/lib/libssl.a,
../downloadclient/libdownloadclient.a,
);
PRODUCT_BUNDLE_IDENTIFIER = pEp.foundation.pEpMacOSAdapter;
PRODUCT_NAME = "$(TARGET_NAME)";


+ 4
- 3
pEpMacOSAdapter/main.m View File

@ -13,7 +13,7 @@
#import "pEpMacOSAdapter.h"
#import "pEpUpdater.h"
const NSString *kMachServiceName=@"pEp.foundation.pEpMacOSAdapter";
NSString *kMachServiceName=@"pEp.foundation.pEpMacOSAdapter";
pEpUpdater* updater = nil;
@ -58,10 +58,11 @@ pEpUpdater* updater = nil;
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];
return [[NSWorkspace sharedWorkspace] openURL:url];*/
return true;
}
@ -80,7 +81,7 @@ int main(int argc, const char *argv[])
ServiceDelegate *delegate = [ServiceDelegate new];
// Set up the one NSXPCListener for this service. It will handle all incoming connections.
NSXPCListener *listener = [[NSXPCListener alloc] initWithMachServiceName:kMachServiceName/*@"foundation.pEp.adapter.macOS"*/];
NSXPCListener *listener = [[NSXPCListener alloc] initWithMachServiceName:kMachServiceName];
NSLog(@"Starting service [%@] ...", kMachServiceName);
listener.delegate = delegate;
[listener resume];


+ 1
- 1
pEpMacOSAdapter/pEp.foundation.pEpMacOSAdapter.plist View File

@ -5,7 +5,7 @@
<key>Label</key>
<string>pEp.foundation.pEpMacOSAdapter</string>
<key>Program</key>
<string>/Users/davidalarcon/Library/Application Support/pEp/pEpMacOSAdapter/pEpMacOSAdapter</string>
<string>$HOME/Library/Application Support/pEp/pEpMacOSAdapter/pEpMacOSAdapter</string>
<key>MachServices</key>
<dict>
<key>pEp.foundation.pEpMacOSAdapter</key>


Loading…
Cancel
Save