QPrompt-Teleprompter icon indicating copy to clipboard operation
QPrompt-Teleprompter copied to clipboard

QPrompt's Supported Platforms

Open Cuperino opened this issue 2 years ago • 11 comments

Help Wanted

Hello! Here are some ways you can help:

  1. Create working RPM for the oldest currently supported version of Fedora Linux
  2. Create and maintain QPrompt package for FreeBSD
  3. Create and maintain QPrompt package for Haiku OS
  4. Create QPrompt DMG with native binary for M1 Macs
  5. Port KCoreAddons to iOS
  6. Port Ki18n to iOS
  7. Get the most current version of Kirigami framework 5 working on iOS

QPrompt Dependencies

QPrompt is written using the Qt Framework, which is a native cross-platform framework that supports many platforms. A full list of these platforms is available at: https://doc.qt.io/qt-5/supported-platforms.html

Besides the Qt framework, QPrompt also uses the following libraries from the KDE community, which at the time of writing can run on the following platforms:

  • Kirigami (Android FreeBSD Linux Windows iOS macOS)
  • KI18n (Android FreeBSD Linux Windows macOS)
  • KCoreAddons (Android, FreeBSD, Linux, Windows, macOS) source: https://api.kde.org/frameworks/index.html

Platform Support Goals (updated May 15, 2022)

My personal goal is that we can fully support the following platforms, on the following architectures:

  • Linux (x86_64, arm64, risc-v)
  • Windows (x86_64, arm64)
  • macOS (x86_64, arm64)
  • Android (arm64-v8a, armeabi-v7a)
  • iOS / iPadOS (arm64-v8)

This means making upstream contributions so that the KI18n and KCoreAddons libraries can run on iOS. Plus help maintain Kirigami supported on both macOS and iOS. For this reasons iOS / iPad OS will likely be the last platforms to be supported.

Currently Supported Platforms (updated May 15, 2022)

At the time of writing, I'm creating the following distributable packages for the x86_64 and arm64 architectures:

  • Linux (x86_64, Flatpak, Snap, AppImage; arm64, Flatpak, Snap, DEB)
  • Windows (x86_64, NSIS installer)
  • macOS (x86_64, DMG)
  • Android (arm64-v8a, APK)

ARM Support

In relation to ARM architectures, QPrompt depends on the last open source version of Qt 5, version 5.15.2, and this limits on what distros it can run. The choice to use Qt 5.15.2 was deliberate to guarantee that it works well with the KDE libraries of today, while making it very straightforward to port QPrompt to Qt 6 when the KDE libraries are ready for it. Due to this, the Qt versions present on the current Raspberry Pi OS and the Ubuntu 18.04 LTS (used by the NVIDIA Jetson nano) are too old to compile QPrompt.

Several features would be lost in the attempt to backport, so it's simply not worth the time and effort to develop for an obsolete system. What I plan to do instead is install Fedora 34 on my Jetson nano and use that to create the first ARM64 builds. Then for the Raspberry Pi I will wait for the release of the first Raspberry Pi OS developed on top of the brand new Debian 11, and use that to make the ARMhf builds when it becomes available.

Cuperino avatar Aug 17 '21 08:08 Cuperino

Status update for October 6, 2021,

All platforms

Some icons did not load on non Freedesktop operating systems. This is no longer the case, all icons load correctly in all builds of every system, except for Flatpak.

Linux

I've solved the low performance issues present in Flatpak builds. Snaps are working perfectly.

AppImages had the exact same permissions issues Flatpaks had, which limited performance, and additional issues with using Qt's Material Dark theme, which is required for transparent windows to work across all platforms. AppImage issues are only present when using GNU GCC compiler in Craft, Clang builds, on the other hand, don't show any issues on Craft. To my understanding this is an issue with Craft, not an issue with GCC. Nonetheless, while these problems are fixed upstream, future Linux AppImages of QPrompt will be built using Clang.

ARM on Linux

Now that both Flatpak and Snaps make proper use of hardware acceleration, I'll attempt to create a Flatpak build for armhf and arm64 architectures.

Snap relies on the kde-neon extension, which only supports the amd64 architecture, therefore, ARM Snaps are not an option unless we package Qt and KF5 inside the Snap, like it's done on Windows. This should be avoided for it drastically increases program and installer size.

AppImage won't run on ARM anytime soon due to reliance on the Craft building system and it not directly supporting ARM architecture. Our options here are to run Craft on a Docker environment setup for cross compilation, similar to how it's done for Android builds; or create the AppImage manually, without using Craft at all. In my opinion, the first approach is preferable for it makes use of the existing infrastructure, which saves time that could be spent developing other parts of the software.

Android

QPrompt can now be built for Android on armeabi-v7a and arm64-v8a architectures. arm64-v8a builds have trouble launching. armeabi-v7a have excellent performance on the Pixel 3a in which they were tested and have no trouble launching.

For QPrompt to be truly usable on tablets and phones, additional tweaks must be made to the user interface to maximize productivity. A soon to come first Android beta release will reflect these changes.

Cuperino avatar Oct 07 '21 00:10 Cuperino

Status update for October 7, 2021,

ARM on Linux

I was able to backport QPrompt to run on the old Qt 5.12 present in Ubuntu 20.04. Running QPrompt on these libraries results in graphical problems specific to the UI, but the program functions as intended with a few modifications. On an arm64 Jetson Nano, performance is good enough to prompt smoothly on 2 screens at 1920x1080 resolution, using Qt's font renderer. Using the native font renderer increases CPU cost enough to cause small jitter occasionally. A slightly lower resolution or exclusive use of the Qt text renderer is advised on the Jetson Nano and lower spec SoC.

Attempts to build QPrompt as a Flatpak on the arm64 architecture were also successful. Because Flatpak ties into its own, up to date, containerized libraries, there were no graphical issues, and no modification was required to run QPrompt on Ubuntu 20.04 with the Flatpak. The only problem with the Flatpak on arm64 is that it is failing to connect to OpenGL for graphics acceleration, giving the following errors on application startup:

Qt Session management error: None of the authentication protocols specified are supported
libEGL warning: DRI2: failed to authenticate

This seems to be an issue between Flatpak and the Jetson nano's GPU drivers, and not an issue with QPrompt, because GPU acceleration was confirmed to work with the system libraries, and for Flatpak under the x86 architecture. I'll try getting another distro running on the Jetson nano, but I doubt much progress will be made, because driver support is limited to a few kernel versions.

Cuperino avatar Oct 08 '21 05:10 Cuperino

Status update for October 10, 2021,

Linux AppImage

The AppImage specific issues mentioned on October 6, 2021 have all been fixed upstream. See bug report 443416 on KDE Craft for details: https://bugs.kde.org/show_bug.cgi?id=443416

ARM on Linux

Since Flatpaks work on ARM but OpenGL connection cannot be guaranteed at the moment, I proceeded to attempt the creation of distro specific Debian and RPM packages, targeting Ubuntu 21.04 and Fedora 33 distributions.

I was able to get a build made on KDE neon install and run on Ubuntu 21.04, automatically satisfying package dependencies. This means it is be possible to build a deb package for Ubuntu 21.04 arm64 and have these run on a Raspberry Pi 4 model with at least 4 GB of RAM. I still need to get an RPi 4, but I'll try getting Ubuntu 21.04 working on the Jetson nano in the meantime.

I was not able to get the RPM to install on Fedora x86 due to package conflicts with icon directory structure.

Cuperino avatar Oct 10 '21 09:10 Cuperino

Status update for October 31, 2021,

Linux DEB on ARM64 Raspberry Pi

I was able to successfully build and install a Debian package for Ubuntu 21.04 on the Raspberry Pi 400. 4 GB of RAM are not enough to successfully compile QPrompt due to the large size of some of its assets. I ran the commands from a TTY, with no active desktop environment nor window manager active for the build to succeed.

Performance on the RPi was lower than expected, but more consistent than Imaginary Teleprompter's. OpenGL acceleration seems to be in place. I suspect the lower frame rates are due to the low specs of it's GPU. On the bright side, duplicate screens resulted in no mayor performance drop, which is impressive given how costly and CPU based this operation is in QPrompt.

Cuperino avatar Oct 31 '21 17:10 Cuperino

Status update for November 12, 2021,

Linux DEB on ARM64 and Android builds are out

Binaries are now available for arm64 Ubuntu 21.04 and Android at: https://github.com/Cuperino/QPrompt/releases/tag/v1.0.0-beta-005

Cuperino avatar Nov 12 '21 18:11 Cuperino

Quick update: After modifying package dependencies, the Ubuntu 21.04 DEB I linked to in my previous comment now works for both the 64 bit version of Raspberry Pi OS Bullseye and Ubuntu 21.04.

There won't be support for the regular 32 bit version of Raspberry Pi OS for now, until I can figure out how to cross compile it, because the program can't be built on the system due to the limited amount of virtual RAM that can be allocated under 32 bits.

Cuperino avatar Nov 14 '21 07:11 Cuperino

Quick update: Windows version now loads icons like all other OS, making beta-005 feature complete for the 1.0.0 release.

Cuperino avatar Nov 24 '21 06:11 Cuperino

I'm going to close this issue now that all the platforms and architectures I wanted to support for the 1.0 release are being supported.

Android, iOS and WASM support is far away. Android is the closest but I don't expect to be able to make an iOS build before 2023 because the Kirigami framework must support Qt 6 before I can successfully port to iOS. The same is true about compiling for M1 Macs, but QPrompt works flawlessly through Rosetta.

In the meantime, I'll continue to improve the mobile experience on Android and on Linux distros for mobile devices.

Cuperino avatar Nov 24 '21 06:11 Cuperino

I'm adding Flatpak support for amd64 and arm64 architectures. The following command will install the Flatpak for version 1.0.0 on Linux systems of either architecture that support Flatpak.

flatpak install --user https://dl.flathub.org/build-repo/72033/com.cuperino.qprompt.flatpakref

Cuperino avatar Jan 10 '22 06:01 Cuperino

QPrompt is out and available as a Flatpak for both amd64 and arm64 architectures:

https://flathub.org/apps/details/com.cuperino.qprompt

Cuperino avatar Jan 10 '22 16:01 Cuperino

Bugs I've reported to Craft, the software used to make QPrompt's build pipeline on Windows, macOS, Android, and Linux for the AppImage, that are currently difficulting or prohibiting QPrompt's distribution in some platforms:

  1. Prohibiting Linux AppImage build with correct Qt libraries https://bugs.kde.org/show_bug.cgi?id=456455
  2. Preventing Windows build process without manual intervention https://bugs.kde.org/show_bug.cgi?id=445248
  3. Preventing Intel Mac build process without first time use only manual intervention https://bugs.kde.org/show_bug.cgi?id=456452
  4. Prohibiting M1 Mac support https://bugs.kde.org/show_bug.cgi?id=454506

Cuperino avatar Jul 14 '22 06:07 Cuperino