README.md
author Dirk Zimmermann <dirk@pep-project.org>
Thu, 19 May 2016 19:27:35 +0200
changeset 211 8679e7fd80de
parent 159 README.MD@8a01a822ad52
child 258 bccfc0b0942d
permissions -rw-r--r--
Mentioning asn1c as engine requirement
dirk@59
     1
# How to build
dirk@59
     2
dirk@59
     3
## Prerequisites
dirk@59
     4
hernani@156
     5
### Install Revision Control Systems used
hernani@156
     6
dirk@83
     7
Choose homebrew or macports for installing.
dirk@83
     8
dirk@83
     9
* git
dirk@59
    10
* Mercurial
dirk@59
    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@211
    32
* pEpEngine: asn1c
dirk@211
    33
  ```
dirk@211
    34
  brew install asn1c
dirk@211
    35
  ```
dirk@211
    36
dirk@113
    37
## Build instructions
dirk@113
    38
dirk@59
    39
```
dirk@59
    40
mkdir ~/src
dirk@59
    41
cd ~/src
dirk@59
    42
dirk@59
    43
git clone https://github.com/fdik/libetpan
dirk@59
    44
dirk@62
    45
hg clone https://cacert.pep.foundation/dev/repos/pantomime-iOS/
dirk@59
    46
hg clone https://cacert.pep.foundation/dev/repos/netpgp-et
dirk@59
    47
hg clone https://cacert.pep.foundation/dev/repos/pEpEngine
dirk@59
    48
hg clone https://cacert.pep.foundation/dev/repos/pEpiOSAdapter
dirk@59
    49
dirk@62
    50
hg clone https://cacert.pep-security.ch/dev/repos/pEp_for_iOS/
dirk@63
    51
dirk@63
    52
# For testing server access, this is temporary:
dirk@63
    53
cp ./pEpForiOS/Sync/TestData.swift.sample ./pEpForiOS/Sync/TestData.swift
dirk@59
    54
```
dirk@83
    55
dirk@83
    56
Note that netpgp includes a static openssl, and pEpEngine a static libcurl. For
dirk@83
    57
rebuilding see the respective scripts. But you should not have to do that for iOS.
dirk@113
    58
dirk@113
    59
## Auto-generating model files
dirk@113
    60
dirk@113
    61
The core data model files are generated with mogenerator, using a modified template
dirk@113
    62
(for generating protocol definitions as well).
dirk@113
    63
dirk@211
    64
You only need to regenerate them when there were changes in the model.
dirk@211
    65
dirk@113
    66
```
dirk@113
    67
cd ~/src # Use the same base path here as previously
dirk@113
    68
hernani@156
    69
git clone https://github.com/dirkz/mogenerator.git
dirk@113
    70
dirk@113
    71
cd pEp_for_iOS
dirk@113
    72
dirk@113
    73
mogenerator --model pEpForiOS/pEpForiOS.xcdatamodeld/pEpForiOS.xcdatamodel --machine-dir pEpForiOS/Models/machine/ --human-dir pEpForiOS/Models/ --swift --base-class BaseManagedObject --template-path ../mogenerator/templates/
dirk@113
    74
```