Browse Source

APPLEMAIL-24 Update README.md. Minor changes

APPLEMAIL-28
David Alarcon 2 years ago
parent
commit
610ccf2da1
5 changed files with 167 additions and 18 deletions
  1. +2
    -2
      pEpMacOSAdapter.xcodeproj/project.pbxproj
  2. +2
    -2
      pEpMacOSAdapter.xcworkspace/contents.xcworkspacedata
  3. +160
    -11
      pEpMacOSAdapter/README.md
  4. +2
    -2
      pEpUpdates/pEpUpdates.xcodeproj/project.pbxproj
  5. +1
    -1
      pEpUpdates/pEpUpdates/AppDelegate.swift

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

@ -208,7 +208,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
@ -260,7 +260,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;


+ 2
- 2
pEpMacOSAdapter.xcworkspace/contents.xcworkspacedata View File

@ -2,10 +2,10 @@
<Workspace
version = "1.0">
<FileRef
location = "group:pEpUpdates/pEpUpdates.xcodeproj">
location = "group:pEpMacOSAdapter.xcodeproj">
</FileRef>
<FileRef
location = "group:pEpMacOSAdapter.xcodeproj">
location = "group:pEpUpdates/pEpUpdates.xcodeproj">
</FileRef>
<FileRef
location = "group:../downloadclient/downloadclient/downloadclient.xcodeproj">


+ 160
- 11
pEpMacOSAdapter/README.md View File

@ -16,20 +16,169 @@ This software is supporting macOS 10.8 and later.
## Build
- to build pEpMacOSAdapter use the Makefile
- to build pEpNotifications use Xcode
- to build pEpNotifications use XCode
## Build using Makefile
1. Download and install boost (1.72.0). https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.gz
2. Download and install crypto++ (master branch, CRYPTOPP_8_2_0). https://github.com/weidai11/cryptopp
3. Download and install openssl (1.1.1g). https://github.com/openssl/openssl
4. Go to pEpMacOSAdapter folder
5. make local.conf (only if local.conf doesn't exist)
6. Edit local.conf and update
- The paths (include and lib) from boost, crypto++ and openssl libraries
- The path from downloadclient library
- The signing identity
7. make
1. Download and install boost (1.72.0). [Source Code](https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.gz)
2. Download and install crypto++ (master branch, CRYPTOPP_8_2_0). [Crypto++ Github](https://github.com/weidai11/cryptopp)
3. Download and install openssl (1.1.1g). (do not use _macports_ openssl) [OpenSSL Github](https://github.com/openssl/openssl)
4. Go to **downloadclient** folder
5. Create the local.conf file where the environtment variables should be updated (only if local.conf doesn't exist).
```
make local.conf
```
6. Edit *local.conf* and update the paths from:
- boost
- crypto++
- openssl
```
local.conf
------------------------
PREFIX=/Users/davidalarcon/local
PEP=/Users/davidalarcon/local
BOOST_INCLUDE=[boost_folder]/boost_1_72_0/include
BOOST_LIB=[boost_folder]/boost_1_72_0/lib
CRYPTOPP_INCLUDE=[crypto_folder]/include
CRYPTOPP_LIB=[crypto_folder]/lib
OPENSSL_INCLUDE=[openssl]/include
OPENSSL_LIB=[openssl]/lib
```
7. Build **downloadclient**
```
make
```
8. Go to **pEpMacOSAdapter** folder
9. Create the local.conf file where the environtment variables should be updated (only if local.conf doesn't exist).
```
make local.conf
```
10. Edit *local.conf* and update the signing identity and the paths from:
- boost
- crypto++
- openssl
- downloadclient
```
DOWNLOADCLIENT=../../downloadclient
BOOST_INCLUDE=[boost_folder]/boost_1_72_0/include
BOOST_LIB=[boost_folder]/boost_1_72_0/lib
CRYPTOPP_INCLUDE=[crypto_folder]/include
CRYPTOPP_LIB=[crypto_folder]/lib
OPENSSL_INCLUDE=[openssl]/include
OPENSSL_LIB=[openssl]/lib
SIGNING_IDENTITY=68AD28395D8090C2A8ACDD3A31FA6735C8DAE2F4
```
11. Build **pEpMacOSAdapter**
```
make
```
## Build using XCode
### Dependencies of prerequisites
For building **pepMacOSAdapter**, you need boost, crypto++, openssl and downloadclient libraries
1. Create a _source_ folder where you are going to put al the libraries and projects
```
mkdir -p [SOURCE_PATH]
cd [SOURCE_PATH]
```
2. Create a _library_ folder where you are going to install the libraries: `[LIBRARIES_PATH]`
```
cd [SOURCE_PATH]
mkdir -p [SOURCE_PATH]/libraries
```
#### Crypto++
1. Clone
```
cd [SOURCE_PATH]
[HTTPS] git clone https://github.com/weidai11/cryptopp.git
[SSH] git clone git@github.com:weidai11/cryptopp.git
```
2. Build
```
cd [SOURCE_PATH]/cryptopp
make DCRYPTOPP_DATA_DIR=[LIBRARIES_PATH]/share/crytopp
make test
```
3. Install
```
make install PREFIX=[LIBRARIES_PATH]
```
#### OpenSSL
1. Clone
```
cd [SOURCE_PATH]
[HTTPS] git clone https://github.com/openssl/openssl.git
[SSH] git clone git@github.com:openssl/openssl.git
```
2. Build
```
cd [SOURCE_PATH]/openssl
./Configure --prefix=[LIBRARIES_PATH] --openssldir=[LIBRARIES_PATH]/ssl
make
make test
```
3. Install
```
make install
```
#### Boost
1. Clone
```
cd [SOURCE_PATH]
[HTTPS] git clone https://github.com/boostorg/boost.git
[SSH] git clone git@github.com:boostorg/boost.git
git checkout tags/boost-1.74.0
```
2. Build
```
cd [SOURCE_PATH]/boost
./bootstrap.sh --prefix=[LIBRARIES_PATH] --with-libraries=regex,iostreams,system
./b2
```
3. Install
```
./b2 install
```
#### Downloadclient
1. Clone
```
cd [SOURCE_PATH]
[hg clone https://pep.foundation/dev/repos/downloadclient/
```
### pEpMacOSAdapter
1. Clone
```
git clone https://gitea.pep.foundation/fdik/pEpMacOSAdapter.git
```
2. Open project
```
cd pEpMacOSAdapter
git checkout APPLEMAIL-24
open pEpMacOSAdapter.xcworkspace
```
## Implementation


+ 2
- 2
pEpUpdates/pEpUpdates.xcodeproj/project.pbxproj View File

@ -323,7 +323,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
@ -378,7 +378,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;


+ 1
- 1
pEpUpdates/pEpUpdates/AppDelegate.swift View File

@ -198,7 +198,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
// connect to XPC service
connection = NSXPCConnection.init(machServiceName: "pEp.foundation.pEpMacOSAdapter"/*"foundation.pEp.adapter.macOS"*//*"pEp.foundation.pEpMacOSAdapter"*/)
connection = NSXPCConnection.init(machServiceName: "pEp.foundation.pEpMacOSAdapter")
if connection != nil {
connection.remoteObjectInterface = NSXPCInterface.init(with: pEpMacOSAdapterProtocol.self)
connection.resume()


Loading…
Cancel
Save