-
Notifications
You must be signed in to change notification settings - Fork 3
Building Herald
Herald, in principle, builds on a wide range of platforms, but the deployment process has yet to be automated. If you have experience with build systems, please submit a pull request!
Information About Deployment Targets
Platform | Builds | Packaging | Priority |
---|---|---|---|
Linux Desktop | ✅ | ✅ | T1 |
MacOS Desktop | ✅ | ✅ | T1 |
MinGW64 Windows | ✅ | ✅ | T3 |
Android Linux x86 (Simulator) | ✅ | N/A | T2 |
Android Linux Arm V7 | ✅ | ✅ | T1 |
iOS 12.41 x86 (simulator) | ✅ | N/A | T2 |
iOS Arm64 (6s and later)* | ✅ | ✅ | T2 |
* herald uses the most recent Qt APIs, so we cannot support "vintage" apple devices, no matter how much we want to
Dependencies:
-
cargo
, confirmed to work withrustc
1.39 or later. You may be able to get by with an older version for the client, but the server relies heavily on async/await. - QtCreator, with QtQuick 5.13 or later
We statically link rust portions of the project at build time, as such you must build the library on your platform. After cloning into the directory and cd'ing into it.
cd libherald
cargo build
Open Qt creator, select the project file under herald/heraldqt/heraldqt.pro, then select the kits you wish to compile for. You should be able to modify QML and run the program as you would any other Qt application.
alternatively you may build from the command line, assuming qmake is in your path, with the following invocation.
cd client && mkdir build && cd build
qmake ../desktop/herald.pro
make
Symbols not found: make sure the respective library is in libherald/target/{BUILD_MODE}/
Dependencies:
-
cargo
, confirmed to work withrustc
1.39 or later. You may be able to get by with an older version for the client, but the server relies heavily on async/await. - QtCreator, with QtQuick 5.13, and kit MinGW64
- Msys2
We statically link rust portions of the project at build time, as such you must build the library on your platform. After cloning into the directory and cd'ing into it.
cd libherald
cargo build
Open QtCreator, select the project file under herald/heraldqt/heraldqt.pro, select the kit MinGW64, if it is not available, use the Qt maintenance tool to install it.
alternatively you may build from the command line, assuming qmake is in your path, with the following invocation.
cd client && mkdir build && cd build
qmake ../desktop/herald.pro
make
Dependencies:
-
cargo
, confirmed to work withrustc
1.39 or later. You may be able to get by with an older version for the client, but the server relies heavily on async/await. - QtCreator, with QtQuick 5.13, and kit iOS simulator
- (cargo-lipo)[https://github.com/TimNN/cargo-lipo]
if you do not already have cargo lipo, you can install it with
cargo install cargo-lipo
- use cargo lipo to build the fat static-lib, to do this run:
cargo lipo
from within the libherald directory.
- open path/to/herald/client/heraldqtMobile/heraldqtMobile.pro in qt creator
- Select the iOS simulator kit, and run.
alternatively you may run qmake on client/mobile/heraldqtMobile.pro and open the resulting .xcodeproject file in xcode where you may run it in your simulator of choice.
Dependencies:
- the android SDK and NDK, which can be downloaded from android studio.
- the android toolchain for your target triple, x86_64-linux-android for simulator, or armv7_linux-androideabi for deployement, these can be installed through the standalone toolchain installation script included with the android NDK.
- the rustc toolchains for your target triple. which can be install with
rustup toolchain add x86_64-linux-android, armv7-a_linux-androideabi
environment:
- Android SDK in your PATH variable
- Android NDK and standalone toolchains in your path variable
- ANDROID_NDK_PLATFORM set to android-28
- ANDROID_API_VERSION set to 28
- JDK in your path, and visible by QtCreator
- make sure Qt Creator recognizes your android deployment kits, upon opening /herald/client/mobile/heraldqtMobile.pro you should be able to select the appropriate kit for your deployment story.
- Compile libherald for your target triple , likely with
cargo build --target=armv7_linux-androideabi
- run from qt creator.
trouble shooting step 2:
libsodium
and rusqlite
often use the wrong toolchains for compiling the underlying C code if your ANDROID_API_VERSION and ANDROID_NDK_PLATFORM are not set correctly. rusqlite
may require you to alias the executables <target_triple<api_number>-clang and <target_triple<api_number>-clang++ as
<target_triple>-clang and clang++, without the respective api number. We recognize this is not great, and are putting together some environment helpers to make this build more portable.
as of 10/18/19 herald mobile does not deploy on the simulator set up by qt creator by default, but deploys on other simulators and actual android devices.
Libherald requires several flags to be deployed to a production device, a sample invocation for desktop is
cargo build --release --features=deploy --target=<target-platform-triple>
and similarly for IOS
cargo lipo --release --deploy
qmake will automatically link with these libraries if configured for a release build.
if your environment is configured to build herald, as with the build instructions above, you may run
cargo make build_appimage
from the root of the project to build an appimage. it will be placed in a .appimage
directory in the root of the project.
if your environment is configured to build herald, as with the build instructions above, you may run
cargo make build_appbundle
from the root of the project to build an app bundle. it will be placed in a build
directory in the root of the project.
from the root
At this time there is no build script for windows, however it should be as simple as running windeployqt on the the generated executable inside the build directory with the qml directory set to herald/client/desktop
There is no build script for android at this time. As of Qt 5.14 qmake already produces deployment ready APKs. simply move the APK onto your target device.
IOS builds can be deployed through XCode by opening the .xcodeproject file generated by qmake. an example invocation to generate this file is
qmake client/mobile/heraldqtMobile.pro -spec macx-ios-clang CONFIG+=iphoneos CONFIG+=device -after
if you have a developer certification you may deploy herald to a connected device. otherwise, wait for Tim Cook to slip under your door frame in gaseous form and produce a credit card reader from one of his many pockets.