-
Notifications
You must be signed in to change notification settings - Fork 3
Phil's Setup Notes
Since our app is based on QT, it can be built as a desktop as well as the Android/iOS apps we use. Building for desktop is much easier, and sufficient for basic development.
Simply install the version of QT5 your distribution uses:
sudo apt install build-essential libqt5multimedia5 qtmultimedia5-dev qml-module-qtwebview libqt5svg5-dev libqt5webview5-dev qml-module-qtquick-dialogs qml-module-qtquick-layouts qml-module-qtquick-controls qml-module-qtquick-xmllistmodel qtcreator
(or equivalent for your distro). This should pull in all the various requirements.
Once you want to start building for Apps things get more complicated. You need a QT that's cross-compiled for Android/iOS, as well as all the various SDKs/cross compilers.
You'll want the QT Unified Installer. You'll want to choose the latest version of QT5 (the codebase does NOT support QT6) for Android as well as qtcreator.
You'll want to uninstall qtcreator from your distro, and start using the one the unified installer will install.
It'll be in ~/Qt/Tools/QtCreator/bin/qtcreator
(assuming you accepted the default of installing into ~Qt
).
When you launch qtcreator, if it doesn't find the Android QT5, you've probably launched the wrong qtcreator.
In QT Creator, go to Kit Manger, then devices, then Adnroid, and choose a path (ala ~/android_tools
), then choose "setup SDK manager". Then run the SDK manager and install the following:
- Tools
- CMake
- SDK Patch Applier
- Sources for Android {31,32,33}
- NDK (latest versions of 20, 21, 22, 23, 25)
- Android Emulator
- Android SDK Platform-Tools
- Android SDK Build-Tools (latest of 28, 30, 31)
- Android SDK Command-line Tools (latest)
- Android Tiramisu
- SDK Platform
- Google APIs Intel x86 Atom_64 System Image
- Android 12L (API32)
- SDK Platform
- Android 12.0 (S)
- SDK Platform
Make sure once it's done all the checkboxes are green.
The emulator does not properly get setup, and I'm sure there's a nice way to do it from the CLI, but until then...
Install Android Studio. During setup, pick the same directory you did above. Then launch it, and choose "More Actions" and choose "Virtual Device Manager", edit the x86emulator, and pick a device and a system image.
Under Profiles, Android, Build, choose details under the 'qmake' step and check all the boxes.
Now it should build.