Skip to content

Privatehive/QtAppBase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QtAppBase

Conan Remote Recipe

Bundles common functionalities for all Qt based Apps


os arch CI Status
Linux x86_64 GitHub Actions Workflow Status
Windows x86_64 GitHub Actions Workflow Status
Macos armv8 GitHub Actions Workflow Status
Android x86 GitHub Actions Workflow Status
Android x86_64 GitHub Actions Workflow Status
Android armv7 GitHub Actions Workflow Status
Android armv8 GitHub Actions Workflow Status

Features

  • LogMessageHandler logger with log rotation functionality
  • QtApplicationBase a wrapper for native Qt QCoreApplication, QGuiApplication classes used for bootstrapping
  • [qml=True] QmlApplicationEngine with hot reloading support:
    • Injects global function instanceOf(var item, var type) to workaround broken instanceOf check after hot reload.
    • Injects global property isDebug which equals true if QtAppBase was compiled as debug, false otherwise.
  • SecretsManager
  • CMake based deployment for Android, Linux, Windows
    • Linux: AppImage
    • Window: Installer (Qt Installer Framework)
    • macOS: App package
    • Android: APK, AAB

Environment variables

Windows Installer:

  • WIN_CODESIGN_OPTIONS: Options passed to signtool. Each option must be separated by a ; e.g.: /n;MyCodeSigningCert;/fd;SHA256;/t;http://timestamp.digicert.com

macOS App package:

  • APPLE_CODESIGN_IDENTITY: The identity used to sign the app: It's the 10 character long alpha numeric string of the Apple Developer cert found in the Keychain Access

Android APK/AAB:

The env vars are consumed by androiddeployqt

  • QT_ANDROID_KEYSTORE_PATH: The absolute path pointing to a .jks keystore file
  • QT_ANDROID_KEYSTORE_ALIAS: The alias used for signing
  • QT_ANDROID_KEYSTORE_STORE_PASS: The store password
  • QT_ANDROID_KEYSTORE_KEY_PASS: The key password

Tip

Declare the needed env vars in a new conan profile named e.g. sign_env:

[buildenv]
WIN_CODESIGN_OPTIONS=...
APPLE_CODESIGN_IDENTITY=...

Then pass the profile as a host profile to the conan command (multiple host profiles are allowed): conan create . -pr:h=sign_env ...

How to run on Raspberry Pi (EGLFS)

Flash the Raspberry Pi OS Lite image

  • Enable the GL (Full KMS) driver in raspi-config (also make sure at least 64 MB GPU memory is selected)
  • Install: libegl1, libgles2, libxkbcommon0, libinput10
  • Run the AppImage

How to compile AppImage runtime for Armv6

The AppImageKit release only contains the AppImage binaries for x86_64, i686, aarch64, armhf ( armv7). Binaries for armv6 are missing (necessary for some Raspberry PIs).

To compile the Armv6 binaries do the following:

  • Install Raspberry Pi OS Lite (Legacy)
  • Update the system sudo apt-get update && sudo apt-get upgrade
  • Install the following packages sudo apt-get install git cmake automake zsync libtool desktop-file-utils libglib2.0-dev libcairo2-dev libfuse-dev libssl-dev libgpgme-dev libgcrypt-dev
  • Clone the AppImageKit repo: git clone --recurse-submodules https://github.com/AppImage/AppImageKit.git
  • Apply the following patch
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f2247b4..f9f2df5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -31,8 +31,8 @@ target_include_directories(appimagetool
 # required for appimagetool's signing
 # we're using CMake's functionality directly, since we want to link those statically
 find_package(PkgConfig)
-pkg_check_modules(libgpgme REQUIRED gpgme IMPORTED_TARGET)
-pkg_check_modules(libgcrypt REQUIRED libgcrypt IMPORTED_TARGET)
+find_library(LIB_libgpgme NAMES gpgme)
+find_library(LIB_libgcrypt NAMES gcrypt)
 
 # trick: list libraries on which imported static ones depend on in the PUBLIC section
 # CMake then adds them after the PRIVATE ones in the linker command
@@ -44,8 +44,8 @@ target_link_libraries(appimagetool
     libglib
     libgio
     libzlib
-    PkgConfig::libgcrypt
-    PkgConfig::libgpgme
+    ${LIB_libgcrypt}
+    ${LIB_libgpgme}
     xz
 )
  • Run ./ci/build-binaries-and-appimage.sh

You should now see the follwing binaries appimagetool-.AppImage, AppRun, runtime (the arch suffix armv6 is missing).

About

Provides the foundation for every Qt App

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors