Closed probonopd closed 7 years ago
Especially since the current bundling doesn't seem to really work:
$ '/home/me/Downloads/redtimer-v1.2-pre9-ubuntu-14.04-x86_64/RedTimerClient'
/home/me/Downloads/redtimer-v1.2-pre9-ubuntu-14.04-x86_64/RedTimerClient: error while loading shared libraries: libQt5X11Extras.so.5: cannot open shared object file: No such file or directory
linuxdeployqt can take care of that.
Please note the additional requirements for building on Ubuntu 14.04:
https://github.com/fathomssen/redtimer/blob/v1.2-pre9/README.Ubuntu.md#ubuntu-1404-1
But yes, AppImage sounds great. I will integrate it into the Travis build process.
Do you have any experience in using AppImage with Travis? Otherwise, I will just follow the instructions at https://github.com/probonopd/AppImageKit/wiki/Docker-Hub-Travis-CI-Workflow.
Best regards Frederick Thomssen
Do you have any experience in using AppImage with Travis? Otherwise, I will just follow the instructions at https://github.com/probonopd/AppImageKit/wiki/Docker-Hub-Travis-CI-Workflow.
Yes, I am the main developer of AppImageKit ;-) Let me know if you run into any issues.
The Docker-Hub-Travis-CI-Workflow is only needed if you really want to support distributions as old as CentOS 6 or debian oldstable. If you are fine with Ubuntu 14.04 and newer, you can just build on Travis CI like normal and use linuxdeployqt
to wrap everything up in a self-contained bundled AppDir and/or a one-file self-mounting AppImage.
These projects are already using Travis CI and linuxdeployqt
to provide AppImages of their builds, check yout their .travis.yml
files:
redtimer-v1.2-pre10-linux-x86_64.AppImage
has issues finding required plugins:
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior 2, swapInterval 1, profile 0)
Aborted
I had hoped that I had fixed this in https://github.com/probonopd/linuxdeployqt/issues/30 but apparently not.
Perhaps running linuxdeployqt twice would help; it seemed to do the trick for me (the reason for this is still a mystery to me, must be a linuxdeployqt bug).
If that doesn't help can you retry using https://transfer.sh/ihv7a/linuxdeployqt-42fc34c-x86-64.appimage?
Still persists in redtimer-v1.2-pre10.1-linux-x86_64.AppImage
. The xcbglintegrations
directory and the files therein are missing, they should have been bundled by linuxdeployqt... Most likely a linuxdeployqt bug.
I think I found the cause, linuxdeployqt issue linked above.
I tried to run linuxdeployqt twice using -always-overwrite which resulted in this error: https://travis-ci.org/fathomssen/redtimer/jobs/169983789#L1238
I am a bit clueless at the moment, let's try to replicate on our local machines...
Now I ran linuxdeployqt twice and deleted the AppImage file in between. Could you pls check whether v1.2-pre10.3 works for you?
Works for me :+1: Thanks for being patient. Now the only question is why it takes 2 runs, the winner of this quiz gets 100 points :100:
Now, please put something nice inside instead of default.desktop
and default.png
. It will help appimaged desktop integration.
Hi
I still have a problem though in Ubuntu 16.04: The tray icon has a low res. Have you experiences such a problem before? In a native build, it looks normal.
For the two runs, I guess that linuxdeployqt does not consider the newly copied files for scanning. Thus, it does not see that the xcbglintegration is required by a lib that has just been copied to the deployment folder.
I will add the desktop file and the image later. Which resolution should the PNG file have?
Best regards Frederick Thomssen
The tray icon has a low res. Have you experiences such a problem before? In a native build, it looks normal.
No, I have not noticed that yet. How is the location of the image to be displayed determined? Does your application do that or some Qt frameworks? Maybe there is a setting in qt.conf
that might need to be adjusted (just guessing here)?
For the two runs, I guess that linuxdeployqt does not consider the newly copied files for scanning.
Yes, that's a bug in linuxdeployqt
. Can you spot where it could be fixed best? Probably around here...
I will add the desktop file and the image later. Which resolution should the PNG file have?
A 256x256 png would be fine, or a resolution-indepdendent svg. Put the name of the icon into the Icon=
key, without the filename ending.
For the systray icon, I use QSystemTrayIcon. The displayed icon is an SVG file. As I said, when using the native build, it looks razor sharp...
That is strange; does strace give any clues whether both versions are trying to load the SVG from the same place? Could it be that the location to the SVG is somehow hardcoded with an absolute path?
The SVG icon engine was missing from the AppImage. I now included it in https://github.com/fathomssen/redtimer/releases/tag/v1.2-pre13.
This did not only fix the systray icon, but also the icon sizes within the app.
Please refer to my deploy script: https://github.com/fathomssen/redtimer/blob/v1.2-pre13/.travis/deploy.linux.sh#L24-L25
Best regards Frederick Thomssen
In Ubuntu 16.04, there is no app icon in the task bar on the left side of the screen. Is this a problem with my provided SVG file or do I have to do anything else?
If you launch the AppImage via a desktop file, then the icon should be there. If you launch the AppImage by executing the AppImage directly, then you need to use
QApplication::setWindowIcon()
to make the icon show up in the Ubuntu Unity dock.
I am using QApplication::setWindowIcon()
(https://github.com/fathomssen/redtimer/blob/master/client/main.cpp#L29) - also tried the PNG version but still no icon. Now, not even when I build natively on the same machine.
But I now have a proper icon for the .AppImage
file - for some reason, I had to use the PNG file instead of the SVG file.
Whoops, my SVG files are too small by default. I have resizes them to 256x256 and now, it looks better.
Still no application icon....
Now, I have generated .deb and .rpm files additionally to the AppImage (from the AppImage using fpm). With those packages that provide .desktop and icon files, there is also an application icon.
Thank you very much for pointing me to AppImage. It seems to work great!
Best regards Frederick Thomssen
Please provide an AppImage for Linux that would run on many distributions without the need for installation. I've had success with downloading the source code, compiling it in Qt Creator, and then running linuxdeployqt (twice; had to add a .desktop file and matching icon first)