README.md
author Dirk Zimmermann <dirk@pep-project.org>
Thu, 24 Nov 2016 17:37:07 +0100
changeset 1148 2c909bb015b4
parent 986 0272826f3770
child 1224 8b4475a0991e
permissions -rw-r--r--
IOS-241 README.md
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
hernani@156
    12
### Install CAcert root certificates
hernani@156
    13
hernani@156
    14
Import the root certificates of the community-driven CAcert project
hernani@157
    15
in order to deal with the Mercurial repositories via https; for Mac
hernani@158
    16
OS X follow (the GUI or commandline) instructions provided:
hernani@156
    17
hernani@156
    18
http://wiki.cacert.org/FAQ/ImportRootCert#Mac_OS_X
hernani@156
    19
hernani@158
    20
Before using, please check the authenticity of the certificate(s)
hernani@159
    21
downloaded.
hernani@158
    22
hernani@158
    23
The fingerprints should be:
hernani@158
    24
hernani@158
    25
* Class 1 PKI Key (SHA1): 13:5C:EC:36:F4:9C:B8:E9:3B:1A:B2:70:CD:80:88:46:76:CE:8F:33 
hernani@158
    26
* Class 3 PKI Key (SHA1): AD:7C:3F:64:FC:44:39:FE:F4:E9:0B:E8:F4:7C:6C:FA:8A:AD:FD:CE
hernani@158
    27
hernani@158
    28
(Cf. http://www.cacert.org/index.php?id=3)
hernani@158
    29
dirk@211
    30
### Dependencies of prerequisites
dirk@211
    31
dirk@1148
    32
For building the engine, you need a working python2 environment
dirk@1148
    33
and all dependencies:
dirk@1148
    34
dirk@1148
    35
```
dirk@1148
    36
sudo port install asn1c
dirk@1148
    37
sudo port install py27-lxml
dirk@1148
    38
dirk@1148
    39
sudo port install python_select
dirk@1148
    40
```
dirk@211
    41
dirk@609
    42
### Other dependecies
dirk@609
    43
dirk@609
    44
#### pEpEngine: [yml2](https://fdik.org/yml/toolchain)
dirk@609
    45
dirk@609
    46
Clone into your home directory:
dirk@609
    47
dirk@609
    48
```
dirk@609
    49
pushd ~
dirk@609
    50
hg clone https://cacert.pep.foundation/dev/repos/yml2/
dirk@609
    51
popd
dirk@609
    52
```
dirk@609
    53
ana@683
    54
## Setup instructions
dirk@113
    55
dirk@59
    56
```
dirk@59
    57
mkdir ~/src
dirk@59
    58
cd ~/src
dirk@59
    59
dirk@59
    60
git clone https://github.com/fdik/libetpan
dirk@59
    61
dirk@62
    62
hg clone https://cacert.pep.foundation/dev/repos/pantomime-iOS/
dirk@59
    63
hg clone https://cacert.pep.foundation/dev/repos/netpgp-et
dirk@59
    64
hg clone https://cacert.pep.foundation/dev/repos/pEpEngine
dirk@59
    65
hg clone https://cacert.pep.foundation/dev/repos/pEpiOSAdapter
dirk@807
    66
hg clone https://cacert.pep.foundation/dev/repos/MailModel/
dirk@59
    67
dirk@62
    68
hg clone https://cacert.pep-security.ch/dev/repos/pEp_for_iOS/
dirk@59
    69
```
dirk@83
    70
dirk@83
    71
Note that netpgp includes a static openssl, and pEpEngine a static libcurl. For
dirk@83
    72
rebuilding see the respective scripts. But you should not have to do that for iOS.
dirk@113
    73
dirk@1148
    74
### UI Tests
dirk@1148
    75
dirk@1148
    76
Set up working account for UI tests. After copying, fill in working account:
dirk@1148
    77
dirk@1148
    78
```
dirk@1148
    79
cp ./pEpForiOSUITests/UITestData.swift.sample ./pEpForiOSUITests/UITestData.swift
dirk@1148
    80
```
dirk@1148
    81
dirk@949
    82
### Unit Tests
dirk@113
    83
dirk@986
    84
You need to create a copy of TestData.swift.sample as TestData.swift
dirk@986
    85
and populate it with corresponding (valid) settings to run successful tests.
dirk@986
    86
dirk@986
    87
The tests will not compile without a syntactically correct TestData.swift.
dirk@211
    88
dirk@113
    89
```
dirk@986
    90
cp pEpForiOSTests/Util/TestData.swift.sample pEpForiOSTests/Util/TestData.swift
dirk@113
    91
```