You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.2 KiB

11 months ago
9 months ago
  1. WIP
  2. HowToBuild static lib for macOS
  3. ## Deployment
  4. ```
  5. PER_MACHINE_DIRECTORY="/Library/Application Support/pEp"
  6. PER_USER_DIRECTORY=$HOME/.pEp
  7. ```
  8. ## Required Tools
  9. For building the engine, you need a working python3 environment and all dependencies:
  10. ```
  11. sudo port install git
  12. sudo port install gmake
  13. sudo port install autoconf
  14. sudo port install libtool
  15. sudo port install automake
  16. sudo port install wget
  17. sudo port install capnproto
  18. pushd ~
  19. git clone https://gitea.pep.foundation/fdik/yml2
  20. popd
  21. curl https://sh.rustup.rs -sSf | sh
  22. ```
  23. add this to ~/.profile (create if it doesn't exist):
  24. ```
  25. source $HOME/.cargo/env
  26. export PATH="$HOME/.cargo/bin:$PATH"
  27. ```
  28. restart your Console (!)
  29. ```
  30. sudo port install pkgconfig
  31. rustup update
  32. ```
  33. Install Xcode (if not installed already)
  34. ## Apple IDs & Certificates
  35. ### Apple ID
  36. You need to have an Apple ID (connected to pEp team account) configured in Xcode . Ask `#service`, if you want to be added to the team account.
  37. ## Build Dependencies
  38. ```
  39. mkdir src_pEpObjCAdapter_macOS
  40. cd src_pEpObjCAdapter_macOS
  41. git clone https://gitea.pep.foundation/buff/common-dependency-build-helpers-4-apple-hardware.git
  42. git clone http://pep-security.lu/gitlab/iOS/pep-toolbox.git
  43. git clone https://pep-security.lu/gitlab/iOS/CocoaLumberjack
  44. git clone https://pep-security.lu/gitlab/misc/libetpan.git
  45. git clone https://pep-security.lu/gitlab/misc/sqlite.git
  46. git clone https://gitea.pep.foundation/pEp.foundation/pEpEngine
  47. git clone https://gitea.pep.foundation/pep.foundation/pEpObjCAdapter.git
  48. ```
  49. ## Build
  50. ### iOS Only: Copy System DB
  51. The `system.db` from the pEpEngine repository must be copied in the bundle that uses the pEpObjCAdapter.a static lib. The ObjCAdapter copies it at runtime in the desired directory.
  52. Backround: Has been introduces to use Apple Shared App Directory of the client App.
  53. ### Using Xcode UI
  54. `open pEpMacOSAdapter/pEpObjCAdapter.xcworkspace/`
  55. Build scheme "All" of pEpObjCAdapter.xcworkspace
  56. ### Using terminal
  57. `xcodebuild -workspace "pEpObjCAdapter.xcworkspace" -scheme "PEPObjCAdapter_macOS" -configuration RELEASE`
  58. (or DEBUG)
  59. ### Build Dir & Build Artefacts
  60. You can find the build artefacts in the `pEpMacOSAdapter/build` folder