README.md
author buff <andreas@pep-project.org>
Mon, 25 Feb 2019 17:16:01 +0100
branchrefactor
changeset 7776 1211c30a5059
parent 7643 930dbd472228
child 7802 56619c167902
permissions -rw-r--r--
rm obsolete hotfix
     1 # How to build
     2 
     3 ## Prerequisites
     4 
     5 ### Package managers
     6 
     7 MacPorts for installing all dependencies:
     8 
     9 Install [MacPorts](https://www.macports.org/) for your
    10 [version of OS X/macOS](https://www.macports.org/install.php).
    11 
    12 ### Dependencies of prerequisites
    13 
    14 For building the engine, you need a working python2 environment
    15 and all dependencies:
    16 
    17 ```
    18 sudo port install python27
    19 sudo port install asn1c
    20 sudo port install py27-lxml
    21 
    22 sudo port install python_select
    23 0
    24 
    25 sudo port install autoconf
    26 sudo port install libtool
    27 sudo port install automake
    28 
    29 sudo port install gmake
    30 ```
    31 
    32 ### Other dependecies
    33 
    34 #### pEpEngine: [yml2](https://fdik.org/yml/toolchain)
    35 
    36 Clone into your home directory:
    37 
    38 ```
    39 pushd ~
    40 hg clone https://pep.foundation/dev/repos/yml2/
    41 popd
    42 ```
    43 
    44 ## Setup instructions
    45 
    46 ```
    47 mkdir ~/src
    48 cd ~/src
    49 
    50 git clone https://github.com/fdik/libetpan.git
    51 git clone https://pep-security.lu/gitlab/iOS/OpenSSL-for-iPhone.git
    52 git clone https://pep-security.lu/gitlab/iOS/SwipeCellKit.git/
    53 git clone https://pep-security.lu/gitlab/iOS/AppAuth-iOS.git
    54 git clone https://pep-security.lu/gitlab/misc/ldns.git
    55 
    56 hg clone https://pep.foundation/dev/repos/pantomime-iOS/
    57 hg clone https://pep.foundation/dev/repos/netpgp-et
    58 hg clone https://pep.foundation/dev/repos/pEpEngine
    59 hg clone https://pep.foundation/dev/repos/pEpObjCAdapter
    60 hg clone https://pep.foundation/dev/repos/MessageModel/
    61 hg clone https://pep.foundation/dev/repos/libAccountSettings/
    62 
    63 hg clone https://pep-security.ch/dev/repos/pEp_for_iOS/
    64 
    65 # Temp hot fix
    66 cd ~/ldns
    67 git checkout IOS-749
    68 ```
    69 
    70 ### Build Project
    71 
    72 Open pEpForiOS.xcworkspace and build schema "pEp".
    73 
    74 ### Unit Tests
    75 
    76 Out of the box, most tests expect a local test server:
    77 
    78 ```
    79 cd ~/Downloads
    80 wget http://central.maven.org/maven2/com/icegreen/greenmail-standalone/1.5.9/greenmail-standalone-1.5.9.jar
    81 shasum -a 256 greenmail-standalone-1.5.9.jar
    82 8301b89007e986e8d5e93e2504aad866a58b07b53ac06abb87e6e43eb7646261  greenmail-standalone-1.5.9.jar
    83 java -Dgreenmail.setup.test.all -Dgreenmail.users=test001:pwd@localhost,test002:pwd@localhost,test003:pwd@localhost -jar ~/Downloads/greenmail-standalone-1.5.9.jar
    84 ```
    85 
    86 The non-existing file referenced in the unit test project, ./pEpForiOSTests/TestUtil/SecretTestData.swift, must be
    87 created, with a class named SecretTestData, derived from TestDataBase.
    88 
    89 In `SecretTestData.swift`, you must override `populateVerifiableAccounts`, adding servers that are either registered in the LAS database or provide DNS SRV for IMAP and SMTP in order to test the "automatic account login".
    90 
    91 If you want to run the tests against your own servers, override `populateAccounts` accordingly.
    92 
    93 ### UI Tests
    94 
    95 There is a file referenced in the UI test project, UITestData. You need to create it
    96 (./pEpForiOSUITests/SecretUITestData.swift), and implement it according to the protocol UITestDataProtocol.
    97 
    98 The UI tests will not compile without it.
    99 
   100 ### secret.xcconfig (needed for OAuth2 config secrects and others)
   101 
   102 Create secret.xcconfig @ pEpForiOS/secret.xcconfig, with those contents:
   103 
   104 ```
   105 OAUTH2_GMAIL_CLIENT_ID = some_content
   106 OAUTH2_GMAIL_REDIRECT_URL_SCHEME = some_content
   107 
   108 OAUTH2_YAHOO_CLIENT_ID = some_content
   109 OAUTH2_YAHOO_CLIENT_SECRET = some_content
   110 
   111 ```