README.md
author Dirk Zimmermann <dirk@pep-project.org>
Thu, 25 Aug 2016 10:27:27 +0200
changeset 609 25f7e767c0c1
parent 531 7713b4432b83
child 676 1d7b13a6d89f
permissions -rw-r--r--
Build instruction update
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@475
    36
* mogenerator
dirk@475
    37
  ```
dirk@475
    38
  brew install mogenerator
dirk@475
    39
  ```
dirk@211
    40
dirk@609
    41
### Other dependecies
dirk@609
    42
dirk@609
    43
#### pEpEngine: [yml2](https://fdik.org/yml/toolchain)
dirk@609
    44
dirk@609
    45
Clone into your home directory:
dirk@609
    46
dirk@609
    47
```
dirk@609
    48
pushd ~
dirk@609
    49
hg clone https://cacert.pep.foundation/dev/repos/yml2/
dirk@609
    50
popd
dirk@609
    51
```
dirk@609
    52
dirk@113
    53
## Build instructions
dirk@113
    54
dirk@59
    55
```
dirk@59
    56
mkdir ~/src
dirk@59
    57
cd ~/src
dirk@59
    58
dirk@59
    59
git clone https://github.com/fdik/libetpan
dirk@59
    60
dirk@62
    61
hg clone https://cacert.pep.foundation/dev/repos/pantomime-iOS/
dirk@59
    62
hg clone https://cacert.pep.foundation/dev/repos/netpgp-et
dirk@59
    63
hg clone https://cacert.pep.foundation/dev/repos/pEpEngine
dirk@59
    64
hg clone https://cacert.pep.foundation/dev/repos/pEpiOSAdapter
dirk@59
    65
dirk@62
    66
hg clone https://cacert.pep-security.ch/dev/repos/pEp_for_iOS/
dirk@63
    67
dirk@531
    68
# Set up working account for unit tests. After copying, fill in working account:
dirk@63
    69
cp ./pEpForiOS/Sync/TestData.swift.sample ./pEpForiOS/Sync/TestData.swift
dirk@531
    70
dirk@531
    71
# Set up working account for UI tests. After copying, fill in working account:
dirk@531
    72
cp ./pEpForiOSUITests/UITestData.swift.sample ./pEpForiOSUITests/UITestData.swift
dirk@59
    73
```
dirk@83
    74
dirk@83
    75
Note that netpgp includes a static openssl, and pEpEngine a static libcurl. For
dirk@83
    76
rebuilding see the respective scripts. But you should not have to do that for iOS.
dirk@113
    77
dirk@113
    78
## Auto-generating model files
dirk@113
    79
dirk@475
    80
The core data model files are generated with mogenerator, using modified templates
dirk@113
    81
(for generating protocol definitions as well).
dirk@113
    82
dirk@211
    83
You only need to regenerate them when there were changes in the model.
dirk@211
    84
dirk@113
    85
```
dirk@113
    86
cd pEp_for_iOS
dirk@113
    87
dirk@475
    88
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
    89
```