README.md
author Dirk Zimmermann <dirk@pep-project.org>
Tue, 05 Dec 2017 13:44:36 +0100
changeset 3524 06028486baf6
parent 3504 a7de37eb24e4
child 3530 706af44fc8cd
permissions -rw-r--r--
Backed out changeset a7de37eb24e4 (autoconf needed)
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@1225
    36
sudo port install python27
dirk@1148
    37
sudo port install asn1c
dirk@1148
    38
sudo port install py27-lxml
dirk@1148
    39
dirk@1148
    40
sudo port install python_select
dirk@1224
    41
sudo port select python python27
dirk@3524
    42
dirk@3524
    43
sudo port install autoconf
dirk@3524
    44
sudo port install libtool
dirk@3524
    45
sudo port install automake
dirk@1148
    46
```
dirk@211
    47
dirk@609
    48
### Other dependecies
dirk@609
    49
dirk@2074
    50
#### Note
dirk@2074
    51
dirk@2074
    52
If you have not installed the CA Cert certificates, replace `cacert` in hostnames
dirk@2074
    53
with `letsencrypt`.
dirk@2074
    54
dirk@609
    55
#### pEpEngine: [yml2](https://fdik.org/yml/toolchain)
dirk@609
    56
dirk@609
    57
Clone into your home directory:
dirk@609
    58
dirk@609
    59
```
dirk@609
    60
pushd ~
dirk@609
    61
hg clone https://cacert.pep.foundation/dev/repos/yml2/
dirk@609
    62
popd
dirk@609
    63
```
dirk@609
    64
ana@683
    65
## Setup instructions
dirk@113
    66
dirk@59
    67
```
dirk@59
    68
mkdir ~/src
dirk@59
    69
cd ~/src
dirk@59
    70
dirk@3471
    71
git clone https://letsencrypt.pep-security.lu/gitlab/misc/ldns/
dirk@3160
    72
git clone https://github.com/fdik/libetpan.git
dirk@3186
    73
git clone https://github.com/x2on/OpenSSL-for-iPhone.git
xavier@3310
    74
git clone https://github.com/SwipeCellKit/SwipeCellKit.git
dirk@59
    75
dirk@62
    76
hg clone https://cacert.pep.foundation/dev/repos/pantomime-iOS/
dirk@59
    77
hg clone https://cacert.pep.foundation/dev/repos/netpgp-et
dirk@59
    78
hg clone https://cacert.pep.foundation/dev/repos/pEpEngine
dirk@2171
    79
hg clone https://cacert.pep.foundation/dev/repos/pEpObjCAdapter
dirk@2171
    80
hg clone https://cacert.pep.foundation/dev/repos/MessageModel/
dirk@1787
    81
hg clone https://cacert.pep.foundation/dev/repos/libAccountSettings/
dirk@59
    82
dirk@62
    83
hg clone https://cacert.pep-security.ch/dev/repos/pEp_for_iOS/
dirk@59
    84
```
dirk@83
    85
dirk@2074
    86
Note that pEpEngine includes a static libcurl. For
dirk@83
    87
rebuilding see the respective scripts. But you should not have to do that for iOS.
dirk@113
    88
dirk@1148
    89
### UI Tests
dirk@1148
    90
dirk@1148
    91
Set up working account for UI tests. After copying, fill in working account:
dirk@1148
    92
dirk@1148
    93
```
dirk@1148
    94
cp ./pEpForiOSUITests/UITestData.swift.sample ./pEpForiOSUITests/UITestData.swift
dirk@1148
    95
```
andreas@1802
    96
### Build Project
andreas@1802
    97
andreas@1802
    98
Open pEpForiOS.xcworkspace and build schema "pEp".
dirk@1148
    99
dirk@949
   100
### Unit Tests
dirk@113
   101
dirk@2655
   102
You need to create a copy of `./pEpForiOSTests/Util/TestData_sample.swift` as TestData.swift
dirk@2655
   103
in the same directory. Populate it with your test accounts. The base class, TestDataBase, is checked in,
dirk@2655
   104
so structural changes will be noticed
dirk@986
   105
dirk@2655
   106
The tests will not compile without a syntactically correct TestData.swift that inherits from TestDataBase.
dirk@211
   107
dirk@113
   108
```
dirk@1777
   109
cp pEpForiOSTests/Util/TestData_sample.swift pEpForiOSTests/Util/TestData.swift
dirk@113
   110
```
dirk@2655
   111
dirk@2655
   112
### UI Tests
dirk@2655
   113
dirk@2655
   114
```
dirk@2655
   115
cp ./pEpForiOSUITests/UITestData.swift.sample ./pEpForiOSUITests/UITestData.swift
dirk@2655
   116
```