README.md
author Alejandro Gelos <agp@pep.security>
Fri, 01 Feb 2019 12:50:26 +0100
changeset 7563 13ebf0a55c60
parent 6615 c14549dd26b6
child 7571 acbfb8e59f76
permissions -rw-r--r--
Add hot fix to readme installation guide for ldns dependency
dirk@59
     1
# How to build
dirk@59
     2
dirk@59
     3
## Prerequisites
dirk@59
     4
dirk@813
     5
### Package managers
dirk@813
     6
dirk@1148
     7
MacPorts for installing all dependencies:
dirk@813
     8
dirk@813
     9
Install [MacPorts](https://www.macports.org/) for your
dirk@813
    10
[version of OS X/macOS](https://www.macports.org/install.php).
dirk@813
    11
dirk@211
    12
### Dependencies of prerequisites
dirk@211
    13
dirk@1148
    14
For building the engine, you need a working python2 environment
dirk@1148
    15
and all dependencies:
dirk@1148
    16
dirk@1148
    17
```
dirk@1225
    18
sudo port install python27
dirk@1148
    19
sudo port install asn1c
dirk@1148
    20
sudo port install py27-lxml
dirk@1148
    21
dirk@1148
    22
sudo port install python_select
dirk@1224
    23
sudo port select python python27
dirk@3524
    24
dirk@3524
    25
sudo port install autoconf
dirk@3524
    26
sudo port install libtool
dirk@3524
    27
sudo port install automake
dirk@1148
    28
```
dirk@211
    29
dirk@609
    30
### Other dependecies
dirk@609
    31
dirk@609
    32
#### pEpEngine: [yml2](https://fdik.org/yml/toolchain)
dirk@609
    33
dirk@609
    34
Clone into your home directory:
dirk@609
    35
dirk@609
    36
```
dirk@609
    37
pushd ~
dirk@3786
    38
hg clone https://pep.foundation/dev/repos/yml2/
dirk@609
    39
popd
dirk@609
    40
```
dirk@609
    41
ana@683
    42
## Setup instructions
dirk@113
    43
dirk@59
    44
```
dirk@59
    45
mkdir ~/src
dirk@59
    46
cd ~/src
dirk@59
    47
dirk@3160
    48
git clone https://github.com/fdik/libetpan.git
dirk@5659
    49
git clone https://pep-security.lu/gitlab/iOS/OpenSSL-for-iPhone.git
xavier@5641
    50
git clone https://pep-security.lu/gitlab/iOS/SwipeCellKit.git/
dirk@5659
    51
git clone https://pep-security.lu/gitlab/iOS/AppAuth-iOS.git
agp@7563
    52
git clone https://pep-security.lu/gitlab/misc/ldns.git
dirk@59
    53
dirk@3786
    54
hg clone https://pep.foundation/dev/repos/pantomime-iOS/
dirk@3786
    55
hg clone https://pep.foundation/dev/repos/netpgp-et
dirk@3786
    56
hg clone https://pep.foundation/dev/repos/pEpEngine
dirk@3786
    57
hg clone https://pep.foundation/dev/repos/pEpObjCAdapter
dirk@3786
    58
hg clone https://pep.foundation/dev/repos/MessageModel/
dirk@3786
    59
hg clone https://pep.foundation/dev/repos/libAccountSettings/
dirk@59
    60
dirk@3786
    61
hg clone https://pep-security.ch/dev/repos/pEp_for_iOS/
agp@7563
    62
agp@7563
    63
//Temp hot fix
agp@7563
    64
cd ~/ldns
agp@7563
    65
git checkout IOS-749
dirk@59
    66
```
dirk@83
    67
andreas@1802
    68
### Build Project
andreas@1802
    69
andreas@1802
    70
Open pEpForiOS.xcworkspace and build schema "pEp".
dirk@1148
    71
dirk@949
    72
### Unit Tests
dirk@113
    73
dirk@4172
    74
The non-existing file referenced in the unit test project, ./pEpForiOSTests/TestUtil/SecretTestData.swift, must be
dirk@4172
    75
created, with a class named SecretTestData, derived from TestDataBase. Override populateAccounts().
dirk@986
    76
dirk@4172
    77
The tests will not compile without a syntactically correct SecretTestData.swift that inherits from TestDataBase.
dirk@3786
    78
dirk@3707
    79
### UI Tests
dirk@3707
    80
dirk@3708
    81
There is a file referenced in the UI test project, UITestData. You need to create it
dirk@4172
    82
(./pEpForiOSUITests/SecretUITestData.swift), and implement it according to the protocol UITestDataProtocol.
dirk@3709
    83
dirk@3709
    84
The UI tests will not compile without it.
dirk@3713
    85
andreas@3864
    86
### secret.xcconfig (needed for OAuth2 config secrects and others)
dirk@3713
    87
andreas@3864
    88
Create secret.xcconfig @ pEpForiOS/secret.xcconfig, with those contents:
dirk@3713
    89
dirk@3713
    90
```
dirk@4747
    91
OAUTH2_GMAIL_CLIENT_ID = some_content
dirk@4747
    92
OAUTH2_GMAIL_REDIRECT_URL_SCHEME = some_content
dirk@4747
    93
dirk@4747
    94
OAUTH2_YAHOO_CLIENT_ID = some_content
dirk@4747
    95
OAUTH2_YAHOO_CLIENT_SECRET = some_content
dirk@4747
    96
dirk@3713
    97
```