-
Notifications
You must be signed in to change notification settings - Fork 30
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
QtApp: Linux compile howto #17
Comments
This maybe different from Linux to Linux. We already had Linux systems where it compiled 1:1 as it is. Anyway - a howto is missing for all platforms. |
To not change MainWindow.cpp (OSX and Win port would be broken) you also could change line 56 in the .pro to: |
Would be nice if it would work out of the box for all distros. I have now made an appimage. Turned out to be quite easy, thanks to linuxdeployqt ./linuxdeployqt m/MLVApp -appimage -bundle-non-qt-libs -verbose=2 where in folder m is the MLVApp executeable, a MLVApp.desktop file with Exec=MLVApp line in it, and MLVApp.png as well as a static FFMpeg executeable |
I added some lines to switch between ubuntu and opensuse in this commit. |
The desktop file is lacking a According to the menu spec,
Hence, please add at least one of the following in the
In addition, you could specify one or more from the longer list of Additional Categories. Please test the result with References: |
@probonopd : Do you know how to do that with linuxdeployqt or Qt? I have no idea. |
Yes, simply edit or create a desktop file and add the |
I would not recommend that, because on every build this is overwritten. The whole package is autocreated (as revast wrote some posts above). |
This is not sufficient. A valid desktop file needs more lines in it than just this. |
nope, this was created by hand, as linuxdeployqt failed to point the prefix right in qt.conf (or I did something wrong, actually the prefix line does not work at all, I tried numerous configurations)
So I made an AppRun script which sets the environment variables accordingly:
I had to set it to fusion or MLVApp would have had troubles on a vanilla xubuntu 17.10: instead of I am not entirely sure whats causing this... I tried to put all the theme - and style - plugins into the appimage beforehand. My goal was to ship the appimage with all the common theme and style engines for qt5, but this did not work out as expected - the KDE5 based ones want me to ship KDE libraries, and with the GTK one, I got an error:
Now about the categories: Yeah I have missed that out, but that was because I was following the info in appimage wiki , where it also is missing, would be nice if somebody could fix it there, too. Now what is that line
useful for? It plays a role when the .desktop file is copied to ~/.local/share/applications, so that the app is shown under the right submenu in the system's applications list. I now also tried to fulfill the freedesktop appstream specifications, which is useful because all the appstores under linux (gnome's cinnamon's ...) are using this metadata. But I failed so far, with com.github.ilia3101.MLVApp.appdata.xml contents:
|
Thanks for the hint, updated the wiki page.
It places the application into the correct menu when used e.g., with the optional
Thanks 👍 |
|
I know... but that is really hard. Especially for Linux you could write for every distro and version another readme. That really sucks. I tried on Ubuntu 12.04 and it is different to what sescho and revast wrote before.
Mac:
Windows:
This should be it... but there will be differences on many systems... |
Thanks for the info! Is Creator IDE not necessary, just enough to install Qt libraries? I think what you have written is very useful, I've simply pasted it on the read_me, and if any issues / changes arise, it can easily be edited or fixed. It will be useful even how it is already. |
Creator makes editing and debugging a lot easier, because it is a superior IDE. But for just building you don't need it. In principle that should be the same on Win&OSX, but I did not try. On my old Ubuntu I did not get Creator to work :-P and audio does not work (driver problem) :-P hehehehe Maybe I need a newer Ubuntu for that. |
This is still an issue. Reference: |
Could you please explain your reference? I don't understand what you are doing there... sry... |
The desktop file is lacking a According to the menu spec,
Hence, please add at least one of the following in the
In addition, you could specify one or more from the longer list of Additional Categories. Please test the result with |
I still don't understand - there is no *.desktop file in the repos... so where to add that?! |
Then that's the problem. Please create a proper desktop file. |
This should do:
Please replace |
And where do I add that in the repos (repos path)? Is there a Qt command to add it anywhere in the build as it is for OSX to add the info.plist file? Exec and Icon needs a path? But how do I know a path on any users computer?! This could be all or nothing... (sry, I am not deep enough in linux) |
And now? |
Please use
and
(without a path or suffix) assuming that your icon file is called The desktop file needs to go to |
Okay, thanks:
And how does linux find the icon file? |
I added the desktop file to the repos and tried to write a automated copy command for Qt. No idea if that works... |
Thanks. You can check by running the AppImage with the |
@probonopd : do you use Qt? I saw you have a repos for linuxdeployqt ... you are not able to try it out? The biggest problem should be to include ffmpeg, but as long as you don't export it maybe works without. It is just downloading, loading into QtCreator, configure and build. If you know Qt it is really simple. |
@masc4ii I am happy to help if the upstream authors package QtApp with linuxdeployqt and are running into issues. https://github.com/probonopd/linuxdeployqt/#using-linuxdeployqt-with-travis-ci should get them started. |
Tried out to build an app package: Please try out... 😄 |
Can not be run here ubuntu 16.04. $ ./MLVApp.AppImage Unfortunately I have GLIBC_2.23. I guess GLIBC also has to be included into AppImage. |
Works here on openSUSE. Exporting, too. |
Thanks for your tests! If I remember right, there was an option to explicitely pack libs into the package... I'll try out tomorrow! It was created on Ubuntu 18.04 LTS. |
It needs to be created on Ubuntu 14.04 if it is supposed to run on all still-supported versions. Otherwise it will fail on all but the very newest distributions. Please see https://github.com/AppImage/AppImageKit/wiki/Creating-AppImages#creating-appimages-that-are-compatible-with-many-systems |
Thanks everybody! Made the same procedure on Ubuntu 14.04 - please try again! |
Yes it is. |
Looks good to me now. Thank you very much! 👍 |
To build the app image, create an application directory
Get linuxdeployqt release from here: https://github.com/probonopd/linuxdeployqt |
Normally these commands should do this:
By default, qmake
If |
Now it works fine under Ubuntu 16.04 :) Is there a way to set the default MLV App icon of this AppImage? |
For me the MLVApp icon is only shown in the taskbar, when the app is opened. The appimage icon itself is different... 😢 |
Yes exactly. Edit: here is the related link |
If you want the icon of the AppImage file to look nicely, you currently need to have the optional |
So it is not that easy atm... okay. |
@probonopd : how can I add a second executable to the appimage, in a way this one can be started from the main application? The executable binary (ffmpeg) is now |
Sorry for asking... I think I got it... was my fault. |
ffmpeg is now included in the appimage as well. (Same download link again) Now, MLVApp can export on Linux systems where no ffmpeg was installed before... |
Yup, working :) |
As fastest qt lib bouncyball and me found 5.9.2 (at least faster than 5.9.5 and 5.7.1), so I'll take this version for future appimage releases. This thread should be finished now... close. |
Btw: thanks everybody for your help! |
sudo apt-get install libpng16-dev qtmultimedia5-dev qt5-qmake qtbase5-dev
ubuntu 16.04 with kubuntu packports ppa activated, so qt 5.6.1
I had to change line 22 of MainWindow.cpp to
#include <**libpng16/**png.h>
and line 55 of MLVApp.pro to
linux-g++*: LIBS += -L/usr/local/lib/ -lz -lpng16
then the ususal
qmake-qt5 MLVApp.pro
make
The text was updated successfully, but these errors were encountered: