Browse Source

APPLEMAIL-24 Update README.md. Change libraries to local in search path

APPLEMAIL-28
David Alarcon 2 years ago
parent
commit
388d0ae5cb
2 changed files with 48 additions and 154 deletions
  1. +4
    -4
      pEpMacOSAdapter.xcodeproj/project.pbxproj
  2. +44
    -150
      pEpMacOSAdapter/README.md

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

@ -327,12 +327,12 @@
ENABLE_HARDENED_RUNTIME = YES;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/../libraries/include",
"$(PROJECT_DIR)/../local/include",
);
INFOPLIST_FILE = pEpMacOSAdapter/Info.plist;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/../libraries/lib",
"$(PROJECT_DIR)/../local/lib",
);
PRODUCT_BUNDLE_IDENTIFIER = pEp.foundation.pEpMacOSAdapter;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -350,12 +350,12 @@
ENABLE_HARDENED_RUNTIME = YES;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/../libraries/include",
"$(PROJECT_DIR)/../local/include",
);
INFOPLIST_FILE = pEpMacOSAdapter/Info.plist;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/../libraries/lib",
"$(PROJECT_DIR)/../local/lib",
);
PRODUCT_BUNDLE_IDENTIFIER = pEp.foundation.pEpMacOSAdapter;
PRODUCT_NAME = "$(TARGET_NAME)";


+ 44
- 150
pEpMacOSAdapter/README.md View File

@ -6,186 +6,80 @@ This adapter will sport three main features:
- p≡p API via p≡p JSON adapter (still provided by miniadapter)
- p≡p Update Client
## Deployment
This software is supporting macOS 10.10 and later.
PER_MACHINE_DIRECTORY="/Library/Application Support/pEp"
PER_USER_DIRECTORY=$HOME/.pEp
## How to build
This software is supporting macOS 10.8 and later.
### Prerequisites
## Build
#### Dependencies of prerequisites
- to build pEpMacOSAdapter use the Makefile
- to build pEpNotifications use XCode
For building the prerequisites and clone the mercurial repositories you need the following dependencies
## Build using Makefile
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
sudo port install mercurial
BOOST_INCLUDE=[boost_folder]/boost_1_72_0/include
BOOST_LIB=[boost_folder]/boost_1_72_0/lib
sudo port install autoconf
sudo port install libtool
sudo port install automake
CRYPTOPP_INCLUDE=[crypto_folder]/include
CRYPTOPP_LIB=[crypto_folder]/lib
OPENSSL_INCLUDE=[openssl]/include
OPENSSL_LIB=[openssl]/lib
SIGNING_IDENTITY=68AD28395D8090C2A8ACDD3A31FA6735C8DAE2F4
sudo port install gmake
```
11. Build **pEpMacOSAdapter**
```
make
```
## Build using XCode
### Dependencies of prerequisites
For building **pepMacOSAdapter**, you need boost, crypto++, openssl and downloadclient libraries
### Setup instructions
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++
# Create the source path
mkdir ~/src
cd ~/src
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 dynamic DCRYPTOPP_DATA_DIR=[LIBRARIES_PATH]/share/crytopp
make test
```
3. Install
```
make install PREFIX=[LIBRARIES_PATH]
```
# Create the local path
mkdir local
#### OpenSSL
# Build and install Crypto++
git clone https://github.com/weidai11/cryptopp.git
pushd cryptopp
make DCRYPTOPP_DATA_DIR=$HOME/src/local/share/crytopp
make dynamic DCRYPTOPP_DATA_DIR=$HOME/src/local/share/crytopp
make install PREFIX=$HOME/src/local
popd
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
# Build and install OpenSSL
git clone https://github.com/openssl/openssl.git
pushd openssl
./Configure --prefix=$HOME/src/local --openssldir=$HOME/src/local/ssl
make
make test
```
3. Install
```
make install
```
popd
#### Boost
1. Clone
```
cd [SOURCE_PATH]
[HTTPS] git clone --recursive https://github.com/boostorg/boost.git
[SSH] git clone --recursive git@github.com:boostorg/boost.git
```
2. Build
```
cd [SOURCE_PATH]/boost
# Build and install Boost
git clone --recursive https://github.com/boostorg/boost.git
pushd boost
git checkout tags/boost-1.74.0
./bootstrap.sh --prefix=[LIBRARIES_PATH] --with-libraries=regex,iostreams,system
./bootstrap.sh --prefix=$HOME/src/local --with-libraries=regex,iostreams,system
./b2
```
3. Install
```
./b2 install
```
popd
#### Downloadclient
1. Clone
```
cd [SOURCE_PATH]
# Clone downloadclient
hg clone https://pep.foundation/dev/repos/downloadclient/
```
2. Select the branch
```
cd downloadclient
pushd downloadclient
hg update APPLEMAIL-24
```
popd
### pEpMacOSAdapter
1. Clone
```
cd [SOURCE_PATH]
# Clone pEpMacOSAdap
git clone https://gitea.pep.foundation/fdik/pEpMacOSAdapter.git
```
2. Open project
```
cd pEpMacOSAdapter
git checkout APPLEMAIL-24
open pEpMacOSAdapter.xcworkspace
```
### Set up Xcode
You need to have an Apple ID configured in Xcode, for code signing. You can add one in the `Accounts` tab of the settings (menu `Xcode > Preferences...`).
For some things, your Apple ID needs to be part of the pEp team account. Ask `#service`, if you want to be added to the team account. When you are a member of the team, the information on your Apple ID in the Xcode Preferences should have a record `Team: pEp Security SA`, `Role: Member`.
### Build Project
Open `pEpMacOSAdapter.xcworkspace` and build schema _pEpUpdates_.
## Implementation


Loading…
Cancel
Save