Browse Source

APPLEMAIL-24 Update README.md. Move README.md to repository root.

APPLEMAIL-28
David Alarcon 2 years ago
parent
commit
f6c294f456
4 changed files with 69 additions and 118 deletions
  1. +66
    -18
      README.md
  2. +0
    -4
      pEpMacOSAdapter.xcodeproj/project.pbxproj
  3. +3
    -0
      pEpMacOSAdapter.xcworkspace/contents.xcworkspacedata
  4. +0
    -96
      pEpMacOSAdapter/README.md

+ 66
- 18
README.md View File

@ -6,30 +6,78 @@ This adapter will sport three main features:
- p≡p API via p≡p JSON adapter (still provided by miniadapter)
- p≡p Update Client
## Deployment
This software is supporting macOS 10.10 and later.
PER_MACHINE_DIRECTORY="/Library/Application Support/pEp"
PER_USER_DIRECTORY=$HOME/.pEp
## How to build
This software is supporting macOS 10.8 and later.
### Prerequisites
## Build
#### Package managers
- to build pEpMacOSAdapter use the Makefile
- to build pEpNotifications use Xcode
MacPorts for installing dependencies:
## Build using Makefile
Install [MacPorts](https://www.macports.org/) for your
[version of OS X/macOS](https://www.macports.org/install.php).
1. Download and install boost (1.72.0). https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.gz
2. Download and install crypto++ (master branch, CRYPTOPP_8_2_0). https://github.com/weidai11/cryptopp
3. Download and install openssl (1.1.1g). https://github.com/openssl/openssl
4. Go to pEpMacOSAdapter folder
5. make local.conf (only if local.conf doesn't exist)
6. Edit local.conf and update
- The paths (include and lib) from boost, crypto++ and openssl libraries
- The path from downloadclient library
- The signing identity
7. make
#### Dependencies of prerequisites
For building the prerequisites and clone the mercurial repositories you need the following dependencies
```
sudo port install mercurial
sudo port install autoconf
sudo port install libtool
sudo port install automake
sudo port install gmake
```
### Setup instructions
Create a base folder where to place all the projects and libraries and change the directory to this base folder. For example: `~/src`
```
# Create the local path
mkdir local
# Build and install Crypto++
git clone https://github.com/weidai11/cryptopp.git
pushd cryptopp
make DCRYPTOPP_DATA_DIR=$(pwd)/../local/share/crytopp
make dynamic DCRYPTOPP_DATA_DIR=$(pwd)/../local/share/crytopp
make install PREFIX=$(pwd)/../local
popd
# Build and install OpenSSL
git clone https://github.com/openssl/openssl.git
pushd openssl
./Configure --prefix=$(pwd)/../local --openssldir=$(pwd)/../local/ssl
make
make install
popd
# Build and install Boost
git clone --recursive https://github.com/boostorg/boost.git
pushd boost
git checkout tags/boost-1.74.0
./bootstrap.sh --prefix=$(pwd)/../local --with-libraries=regex,iostreams,system
./b2
./b2 install
popd
# Clone downloadclient
hg clone https://pep.foundation/dev/repos/downloadclient/
# Clone pEpMacOSAdapter
git clone https://gitea.pep.foundation/fdik/pEpMacOSAdapter.git
cd pEpMacOSAdapter
```
### Build Project
Open `pEpMacOSAdapter.xcworkspace` and build schema _pEpUpdates_.
## Implementation


+ 0
- 4
pEpMacOSAdapter.xcodeproj/project.pbxproj View File

@ -7,7 +7,6 @@
objects = {
/* Begin PBXBuildFile section */
4E71B8FC24E44C6A001016F0 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 4E71B8F524E44C69001016F0 /* README.md */; };
4E71B8FD24E44C6A001016F0 /* pEpMacOSAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E71B8F724E44C69001016F0 /* pEpMacOSAdapter.m */; };
4E71B8FE24E44C6A001016F0 /* pEpUpdater.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4E71B8FA24E44C69001016F0 /* pEpUpdater.mm */; };
4E71B8FF24E44C6A001016F0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E71B8FB24E44C69001016F0 /* main.m */; };
@ -46,7 +45,6 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
4E71B8F524E44C69001016F0 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
4E71B8F624E44C69001016F0 /* pEpMacOSAdapterProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pEpMacOSAdapterProtocol.h; sourceTree = "<group>"; };
4E71B8F724E44C69001016F0 /* pEpMacOSAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = pEpMacOSAdapter.m; sourceTree = "<group>"; };
4E71B8F824E44C69001016F0 /* pEpMacOSAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pEpMacOSAdapter.h; sourceTree = "<group>"; };
@ -130,7 +128,6 @@
isa = PBXGroup;
children = (
4E71B97424E578BC001016F0 /* pEpMacOSAdapter.entitlements */,
4E71B8F524E44C69001016F0 /* README.md */,
4E71B8F624E44C69001016F0 /* pEpMacOSAdapterProtocol.h */,
4E71B8F824E44C69001016F0 /* pEpMacOSAdapter.h */,
4E71B8F724E44C69001016F0 /* pEpMacOSAdapter.m */,
@ -200,7 +197,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4E71B8FC24E44C6A001016F0 /* README.md in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};


+ 3
- 0
pEpMacOSAdapter.xcworkspace/contents.xcworkspacedata View File

@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:README.md">
</FileRef>
<FileRef
location = "group:pEpMacOSAdapter.xcodeproj">
</FileRef>


+ 0
- 96
pEpMacOSAdapter/README.md View File

@ -1,96 +0,0 @@
# p≡p macOS Desktop adapter
This adapter will sport three main features:
- p≡p API via Apple XPC (not yet implemented)
- p≡p API via p≡p JSON adapter (still provided by miniadapter)
- p≡p Update Client
This software is supporting macOS 10.10 and later.
## How to build
### Prerequisites
#### Dependencies of prerequisites
For building the prerequisites and clone the mercurial repositories you need the following dependencies
```
sudo port install mercurial
sudo port install autoconf
sudo port install libtool
sudo port install automake
sudo port install gmake
```
### Setup instructions
```
# Create the source path
mkdir ~/src
cd ~/src
# Create the local path
mkdir local
# Build and install Crypto++
git clone https://github.com/weidai11/cryptopp.git
pushd cryptopp
make DCRYPTOPP_DATA_DIR=$HOME/src/local/share/crytopp
make dynamic DCRYPTOPP_DATA_DIR=$HOME/src/local/share/crytopp
make install PREFIX=$HOME/src/local
popd
# Build and install OpenSSL
git clone https://github.com/openssl/openssl.git
pushd openssl
./Configure --prefix=$HOME/src/local --openssldir=$HOME/src/local/ssl
make
make install
popd
# Build and install Boost
git clone --recursive https://github.com/boostorg/boost.git
pushd boost
git checkout tags/boost-1.74.0
./bootstrap.sh --prefix=$HOME/src/local --with-libraries=regex,iostreams,system
./b2
./b2 install
popd
# Clone downloadclient
hg clone https://pep.foundation/dev/repos/downloadclient/
pushd downloadclient
hg update APPLEMAIL-24
popd
# Clone pEpMacOSAdap
git clone https://gitea.pep.foundation/fdik/pEpMacOSAdapter.git
cd pEpMacOSAdapter
git checkout APPLEMAIL-24
```
### Set up Xcode
You need to have an Apple ID configured in Xcode, for code signing. You can add one in the `Accounts` tab of the settings (menu `Xcode > Preferences...`).
For some things, your Apple ID needs to be part of the pEp team account. Ask `#service`, if you want to be added to the team account. When you are a member of the team, the information on your Apple ID in the Xcode Preferences should have a record `Team: pEp Security SA`, `Role: Member`.
### Build Project
Open `pEpMacOSAdapter.xcworkspace` and build schema _pEpUpdates_.
## Implementation
The implementation is split in to parts:
1. the working code is in pEpMacOSAdapter; the implementation is in Objective C
1. the User Interface is in pEpNotifications; the implementation is in Swift
### pEpMacOSAdapterProtocol, implemented with XPC
see [pEpMacOSAdapterProtocol.h](https://gitea.pep.foundation/fdik/pEpMacOSAdapter/src/branch/master/pEpMacOSAdapter/pEpMacOSAdapterProtocol.h)
This protocol is provided to the User Interface to get informed when a download was happening.
When a subscription is active updateNow() can be used to search for immediate updates.

Loading…
Cancel
Save