README.md
author Xavier Algarra <xavier@pep-project.org>
Tue, 06 Jun 2017 07:49:23 +0200
changeset 2248 75013a586bfd
parent 2171 24d39b6449b6
child 2655 7ae47a0db044
permissions -rw-r--r--
IOS-137 add multiple accounts option with the new login
     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 ### Install CAcert root certificates
    13 
    14 Import the root certificates of the community-driven CAcert project
    15 in order to deal with the Mercurial repositories via https; for Mac
    16 OS X follow (the GUI or commandline) instructions provided:
    17 
    18 http://wiki.cacert.org/FAQ/ImportRootCert#Mac_OS_X
    19 
    20 Before using, please check the authenticity of the certificate(s)
    21 downloaded.
    22 
    23 The fingerprints should be:
    24 
    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 
    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
    27 
    28 (Cf. http://www.cacert.org/index.php?id=3)
    29 
    30 ### Dependencies of prerequisites
    31 
    32 For building the engine, you need a working python2 environment
    33 and all dependencies:
    34 
    35 ```
    36 sudo port install python27
    37 sudo port install asn1c
    38 sudo port install py27-lxml
    39 
    40 sudo port install python_select
    41 sudo port select python python27
    42 ```
    43 
    44 ### Other dependecies
    45 
    46 #### Note
    47 
    48 If you have not installed the CA Cert certificates, replace `cacert` in hostnames
    49 with `letsencrypt`.
    50 
    51 #### pEpEngine: [yml2](https://fdik.org/yml/toolchain)
    52 
    53 Clone into your home directory:
    54 
    55 ```
    56 pushd ~
    57 hg clone https://cacert.pep.foundation/dev/repos/yml2/
    58 popd
    59 ```
    60 
    61 ## Setup instructions
    62 
    63 ```
    64 mkdir ~/src
    65 cd ~/src
    66 
    67 git clone https://github.com/fdik/libetpan
    68 git clone https://cacert.pep-security.lu/gitlab/ios/OpenSSL-for-iPhone.git
    69 
    70 hg clone https://cacert.pep.foundation/dev/repos/pantomime-iOS/
    71 hg clone https://cacert.pep.foundation/dev/repos/netpgp-et
    72 hg clone https://cacert.pep.foundation/dev/repos/pEpEngine
    73 hg clone https://cacert.pep.foundation/dev/repos/pEpObjCAdapter
    74 hg clone https://cacert.pep.foundation/dev/repos/MessageModel/
    75 hg clone https://cacert.pep.foundation/dev/repos/libAccountSettings/
    76 
    77 hg clone https://cacert.pep-security.ch/dev/repos/pEp_for_iOS/
    78 ```
    79 
    80 Note that pEpEngine includes a static libcurl. For
    81 rebuilding see the respective scripts. But you should not have to do that for iOS.
    82 
    83 ### UI Tests
    84 
    85 Set up working account for UI tests. After copying, fill in working account:
    86 
    87 ```
    88 cp ./pEpForiOSUITests/UITestData.swift.sample ./pEpForiOSUITests/UITestData.swift
    89 ```
    90 ### Build Project
    91 
    92 Open pEpForiOS.xcworkspace and build schema "pEp".
    93 
    94 ### Unit Tests
    95 
    96 You need to create a copy of TestDataImpl/sample.swift as TestDataImpl.swift
    97 and populate it with corresponding (valid) settings to run the tests successfully.
    98 
    99 The tests will not compile without a syntactically correct TestData.swift.
   100 
   101 ```
   102 cp pEpForiOSTests/Util/TestData_sample.swift pEpForiOSTests/Util/TestData.swift
   103 ```