README.MD
author Dirk Zimmermann <dirk@pep-project.org>
Mon, 02 May 2016 09:14:09 +0200
changeset 113 862c9a651345
parent 83 a1765d8f2a4a
child 156 5a002aed6346
permissions -rw-r--r--
Generating machine files with protocol
dirk@59
     1
# How to build
dirk@59
     2
dirk@59
     3
## Prerequisites
dirk@59
     4
dirk@83
     5
Choose homebrew or macports for installing.
dirk@83
     6
dirk@83
     7
* git
dirk@59
     8
* Mercurial
dirk@59
     9
dirk@113
    10
## Build instructions
dirk@113
    11
dirk@59
    12
```
dirk@59
    13
mkdir ~/src
dirk@59
    14
cd ~/src
dirk@59
    15
dirk@59
    16
git clone https://github.com/fdik/libetpan
dirk@59
    17
dirk@62
    18
hg clone https://cacert.pep.foundation/dev/repos/pantomime-iOS/
dirk@59
    19
hg clone https://cacert.pep.foundation/dev/repos/netpgp-et
dirk@59
    20
hg clone https://cacert.pep.foundation/dev/repos/pEpEngine
dirk@59
    21
hg clone https://cacert.pep.foundation/dev/repos/pEpiOSAdapter
dirk@59
    22
dirk@62
    23
hg clone https://cacert.pep-security.ch/dev/repos/pEp_for_iOS/
dirk@63
    24
dirk@63
    25
# For testing server access, this is temporary:
dirk@63
    26
cp ./pEpForiOS/Sync/TestData.swift.sample ./pEpForiOS/Sync/TestData.swift
dirk@59
    27
```
dirk@83
    28
dirk@83
    29
Note that netpgp includes a static openssl, and pEpEngine a static libcurl. For
dirk@83
    30
rebuilding see the respective scripts. But you should not have to do that for iOS.
dirk@113
    31
dirk@113
    32
## Auto-generating model files
dirk@113
    33
dirk@113
    34
The core data model files are generated with mogenerator, using a modified template
dirk@113
    35
(for generating protocol definitions as well).
dirk@113
    36
dirk@113
    37
```
dirk@113
    38
cd ~/src # Use the same base path here as previously
dirk@113
    39
dirk@113
    40
git clone https://github.com:dirkz/mogenerator.git
dirk@113
    41
dirk@113
    42
cd pEp_for_iOS
dirk@113
    43
dirk@113
    44
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
    45
```