Deprecated! The build system has been moved to https://github.com/status-im/status-desktop
Status Tablet Build System
This repository contains the build system for Status Tablet, supporting both iOS and Android platforms with Qt5 and Qt6 compatibility. Cross-compilation is currently supported on MacOs and Linux. Windows is not supported. The dev setup runs well on WSL with Windows emulator.
Table of Contents
- Quick Start Guide (Container Builds) - Android
- Developer Setup Guide
- Build System Documentation
- Troubleshooting
- Contributing
Quick Start Guide (Container Builds)
This section is for users who want to get up and running quickly with minimal technical setup.
Prerequisites
- Docker
- act (GitHub Actions local runner)
- ADB (Android Debug Bridge)
- Android Emulator
Quick setup - android
-
Install dependencies:
git clone <repository-url> cd <repository-name> git submodule update --init --recursive# macOS brew install docker --cask # Start docker open -a Docker brew install act android-platform-tools android-commandlinetools# Ubuntu sudo apt-get update sudo apt install android-sdk-common google-android-emulator-installer docker.io # Installing act in /bin (cd /;curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash) -
Verify installation:
adb --version emulator --version avdmanager --version sdkmanager --version -
Running the app
# Linux and MacOS make -f ContainerBuilds.mk run
What Happens Behind the Scenes
- The build process uses GitHub Actions containers to ensure consistent builds
- All required tools and dependencies are provided by the container
- The built APK is copied from the container to the local
bindirectory
Developer Setup Guide
This section is for developers who want full control over the build environment.ß
Prerequisites
- Git
- Python 3.x
- Qt (5.15.2 or 6.8.3)
- Platform-specific requirements (see below)
Common Setup
-
Clone the repository and submodules:
git clone <repository-url> cd <repository-name> git submodule update --init --recursive -
Install Qt using aqtinstall:
pip3 install -U pip pip3 install aqtinstall
iOS Development Setup
Prerequisites
- Xcode
- iPad Pro simulator
- Qt 5.15.2 or 6.8.3 for iOS
Setup Steps
-
Install Qt for iOS (skip if you have it already):
# Install Qt 5.15.2 (or 6.8.3 for Qt6) aqt install-qt mac ios 6.8.3 -O [**yourQtPreferredFolder**] -m all --autodesktop # If the above fails on arm64, try: arch -x86_64 aqt install-qt mac ios 6.8.3 -O [**yourQtPreferredFolder**] -m all --autodesktop -
Set environment variables:
# Add Qt to PATH. Qt6 needs both ios bin and host libexec # export PATH=[**yourQtPreferredFolder**]/6.8.3/ios/bin:[**yourQtPreferredFolder**]/[**yourQtPreferredFolder**]/6.8.3/[**yourQtHostTarget**]/libexec:${PATH} -
Build and run:
make run
Android Development Setup
Prerequisites - can be installed using the Android Studio
- JDK 17 (11 for Qt5)
- Android SDK
- Android NDK (21.3.6528147 for Qt5, 26.1.10909125 for Qt6)
- Android emulator
- Android command-line tools
Setup Steps
-
Install Qt for Android (skip if you have it already):
Note: It's best to install the qt architecture matching the system architecture
# Install Qt 5.15.2 aqt install-qt mac android 5.15.2 -O [**yourQtPreferredFolder**] # For Qt6 (includes desktop tools) # arm host aqt install-qt mac android 6.8.3 android_arm64_v8a -O [**yourQtPreferredFolder**] -m all --autodesktop # x64 host aqt install-qt mac android 6.8.3 android_x86_64 -O [**yourQtPreferredFolder**] -m all --autodesktop # optional aqt install-qt mac android 6.8.3 android_x86 -O [**yourQtPreferredFolder**] -m all aqt install-qt mac android 6.8.3 android_armv7 -O [**yourQtPreferredFolder**] -m all -
Set environment variables:
# Set Java home export JAVA_HOME=/path/to/jdk # Set Android SDK and NDK paths export ANDROID_HOME=/path/to/android-sdk export ANDROID_NDK_HOME=/path/to/android-ndk/26.1.10909125 export SDK_PATH="$ANDROID_HOME" # Add Android tools to PATH export PATH="$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH" # Add Qt to PATH. Qt6 needs both ios bin and host libexec and host bin (in this order!) # export PATH=[**yourQtPreferredFolder**]/6.8.3/[**yourPreferredAndroidTarget**]/bin:[**yourQtPreferredFolder**]/[**yourQtPreferredFolder**]/6.8.3/[**yourQtHostTarget**]/libexec:[**yourQtPreferredFolder**]/[**yourQtPreferredFolder**]/6.8.3/[**yourQtHostTarget**]/bin:${PATH} -
Create Android Virtual Device (optional - one will be created by default):
# It's best to choose the host arch avdmanager create avd -n "Test_avd_x64" -k "system-images;android-Baklava;google_apis_playstore;x86_64" -d 70 -
Build and run:
make run
Build System Documentation
Environment Variables
The build system uses several environment variables to control the build process:
Build Control Variables
USE_SYSTEM_NIM=1: Use system-installed Nim instead of building from source. Make surenimandnimbleare available
Platform Configuration
OS: Target platform (iosorandroid) - qmake drivenARCH: Target architecture - defaults to host arch for android andx86_64for ios simulator- iOS:
arm64(device) orx86_64(simulator) - Android:
arm64(arm64-v8a),arm(armeabi-v7a),x86_64, orx86
- iOS:
PATH: Should contain the path to Android or iOS Qt installationbinfolder
Android-specific Variables
ANDROID_API: Android API level (default: 28)ANDROID_NDK_HOME: Path to Android NDKANDROID_HOME: Path to Android SDKSDK_PATH: Path to Android SDK (used by some build scripts)JAVA_HOME: Path to JDK installation
iOS-specific Variables
IPHONE_SDK: iOS SDK to use (iphoneosoriphonesimulator)IOS_TARGET: Minimum iOS version (12 for Qt5, 16 for Qt6)
Qt Version Compatibility
Qt5 (Default)
- iOS minimum deployment target: iOS 12
- iOS simulator: iPad Pro
- Android target: Android 31
- Android NDK: 21.3.6528147
- Android API: 28
- JDK: 11
Qt6
- iOS minimum deployment target: iOS 16
- iOS simulator: iPad Pro
- Android target: Android 35
- Android NDK: 26.1.10909125
- Android API: 28
- JDK: 17
Directory Structure
bin/: Final build outputslib/: Compiled librariesbuild/: Intermediate build filesscripts/: Build scripts and utilities
Key Components
- Status Go
- StatusQ
- DOtherSide
- OpenSSL
- QRCodeGen
- PCRE
- Nim Status Client
Build Targets
make: Build all componentsmake clean: Clean all build artifactsmake run: Build and run the application- Platform-specific targets (e.g.,
make iosdevice)
Troubleshooting
iOS Common Issues
-
CMake Qt5 Error
CMake Error at CMakeLists.txt:36 (find_package): By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5", but CMake did not find one.Fix: Ensure
QTDIRenvironment variable points to the Qt installation folder. -
Python Interpreter Error
ios/mkspecs/features/uikit/devices.py: /usr/bin/python: bad interpreter: No such file or directoryFix: Update the Python path in
ios/mkspecs/features/uikit/devices.py. -
Missing distutils
ModuleNotFoundError: No module named 'distutils'Fix:
pip install setuptools -
Invalid CFBundleVersion
Simulator device failed to install the application. The application's Info.plist does not contain a valid CFBundleVersion.Fix: Remove
bin/Status-tablet.appand runmake run -
FBSOpenApplicationServiceErrorDomain
Underlying error (domain=FBSOpenApplicationServiceErrorDomain, code=4):Fix: In the simulator app, choose
Device -> Erase all content and settings
Android Common Issues
-
PNG Rendering on macOS Emulator
Issue: PNG files won't render on macOS emulator.
Fix: Addsetenv("QT_QUICK_BACKEND", "software", 1);in main.cpp -
Gradle Crashes
Issue: Gradle crashes during build.
Fix: Ensure sufficient RAM is available. A system restart may be needed. -
StatusQ Compilation Crashes
Issue: Compiler crashes while compiling StatusQ.
Fix: Ensure at least 10GB of free RAM is available.
Contributing
When contributing to the build system:
- Test changes on both iOS and Android platforms
- Qt6 compatibility is mandatory. Qt5 is nice to have for now
- Update this README if necessary
- Follow the existing build system patterns