Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replicate the macOS build for Linux? #1

Open
probonopd opened this issue Sep 24, 2017 · 5 comments
Open

Replicate the macOS build for Linux? #1

probonopd opened this issue Sep 24, 2017 · 5 comments

Comments

@probonopd
Copy link

probonopd commented Sep 24, 2017

In the Qt-based macOS Ring.app there seem to be no traces of KF5 nor a daemon...

Can we replicate the macOS build as closely as possible for Linux? It seems to have reasonable dependencies.

me@host:/mnt$ ls Ring.app/Contents/MacOS/lib*
Ring.app/Contents/MacOS/libFLAC.8.dylib
Ring.app/Contents/MacOS/libgmp.10.dylib
Ring.app/Contents/MacOS/libgnutls.30.dylib
Ring.app/Contents/MacOS/libhogweed.4.3.dylib
Ring.app/Contents/MacOS/libhogweed.4.dylib
Ring.app/Contents/MacOS/libintl.8.dylib
Ring.app/Contents/MacOS/libixml.2.dylib
Ring.app/Contents/MacOS/libnettle.6.3.dylib
Ring.app/Contents/MacOS/libnettle.6.dylib
Ring.app/Contents/MacOS/libogg.0.dylib
Ring.app/Contents/MacOS/libopendht.0.dylib
Ring.app/Contents/MacOS/libopus.0.dylib
Ring.app/Contents/MacOS/libpcre.1.dylib
Ring.app/Contents/MacOS/libqrencode.3.dylib
Ring.app/Contents/MacOS/libring.0.dylib
Ring.app/Contents/MacOS/libringclient.1.0.0.dylib
Ring.app/Contents/MacOS/libsamplerate.0.dylib
Ring.app/Contents/MacOS/libsndfile.1.dylib
Ring.app/Contents/MacOS/libspeex.1.dylib
Ring.app/Contents/MacOS/libspeexdsp.1.dylib
Ring.app/Contents/MacOS/libthreadutil.6.dylib
Ring.app/Contents/MacOS/libupnp.6.dylib
Ring.app/Contents/MacOS/libvorbis.0.dylib
Ring.app/Contents/MacOS/libvorbisenc.2.dylib

me@host:/mnt$ ls Ring.app/Contents/Frameworks/
QtCore.framework
QtGui.framework
# QtMacExtras.framework
QtPrintSupport.framework
QtSql.framework
QtWidgets.framework
# Sparkle.framework

me@host:/mnt$ find Ring.app/Contents/Plugins/
Ring.app/Contents/Plugins/
Ring.app/Contents/Plugins/imageformats
Ring.app/Contents/Plugins/imageformats/libqgif.dylib
Ring.app/Contents/Plugins/imageformats/libqicns.dylib
Ring.app/Contents/Plugins/imageformats/libqico.dylib
Ring.app/Contents/Plugins/imageformats/libqjpeg.dylib
Ring.app/Contents/Plugins/imageformats/libqtga.dylib
Ring.app/Contents/Plugins/imageformats/libqtiff.dylib
Ring.app/Contents/Plugins/platforms
# Ring.app/Contents/Plugins/platforms/libqcocoa.dylib

If we can build it in a similar way for Linux, linuxdeployqt should have no problem bundling it as an AppImage.

@Elv13
Copy link
Collaborator

Elv13 commented Sep 25, 2017

Hello,

The Dockerfile already disabled the daemon. This wasn't previously supported on Linux, but I fixed the CMakeLists.txt at some point last week to make it work.

As for KF5, this is due to the fact it's not the same application. The Ring macOS version is a native Cocoa frontend on top of LibRing and LibRingClient while Ring-KDE is a native frontend on top of LibRing and a forked LibRingClient (I am the original author, but don't own the copyright, so my version is technically a fork).

As for linuxdeployqt, I first tried it, but discarded that image as naive and unfixeable. The Ring daemon doesn't work perfectly with a mix of newer compiled packages and the one provided with 14.04. Upstream does not support it and their own package bundle all dependencies (with supported versions). Also, after after discussing with other KF5 devs, I decided to explore using static libraries instead of copy/pasting all .so. It is a "long run" choice designed to pay off once some KF5 patches get merged to enable self contained KF5 applications to be built. I hope it will, once completed, reduce the image size, improve portability, improve security, improve speed and reduce maintenance cost. I consider both options to be viable in their own rights, but favored the static path since, in my opinion (and Volker), KF5 needs to better handle sandboxed scenarios too and addressing self containment issues in the framework themselves not only make AppImages easier to build (from my point of view), but also fixes long standing shared issues on other platforms such as FlatPak, Snap and Android.

As for the progress. I am 99% done. This repository Dockerfiles creates an appimage. I am currently testing on various liveCd and chrooted distribution to see how it handles. I should be done by tomorrow.

@probonopd
Copy link
Author

As for KF5, this is due to the fact it's not the same application. The Ring macOS version is a native Cocoa frontend on top of LibRing and LibRingClient

Looks like a Qt app to me, based on the libraries found inside the bundle. But hey, as you already have 99% of the solution, that may be well irrelevant now ;-)

May I ask why linuxdeployqt was not able to fulfill your needs here?

@Elv13
Copy link
Collaborator

Elv13 commented Sep 25, 2017 via email

@probonopd
Copy link
Author

Thanks for the detailed explanation, I learned a lot from this. Looks like you know a lot more about what should go into an AppImage than me (and how to best produce that payload) and I'd be thrilled to see proper CMake AppImage integration with all the good things you mentioned. Would you consider upstreaming the essence of it, eventually?

@Elv13
Copy link
Collaborator

Elv13 commented Sep 26, 2017

Would you consider upstreaming the essence of it, eventually?

Well, this project, as you know, is sponsored by BlueSystems and the objective is to create a Ring-KDE appimage. Writing an ultra generic and perfect CPack backend is out of scope. That being said:

  • I will work on upstreaming the necessary bits to enable all KF5 frameworks to support static linking.
  • I will work to upstream patches to be able to disable some dubious dependencies that currently plague some frameworks and make them harder to deploy[1].
  • I will also discuss the possibility of adding new macros to extra-cmake-modules to make deployment on platforms such as AppImage easier.
  • I also wish to fix the add_subdirectory() capability of most frameworks as its kind of broken right now[2].

That leaves the final piece, the CPack support, to you. As I said, its way too far away from my assignment to even consider.

[1] Many of those exists for totally silly reasons, like one function being capable of sending an optional email and pulling 5 libraries (kcrash). Qt5::Test is also pulled by all frameworks for nothing. Mandatory test is toxic since it brakes the ability to cross compile the appimage for ARM and Plasma-mobile.
[2] To solve the hacky "Frankenstein-ish" workaround I used to have the file database correctly generated (see previous message)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants