PDA

View Full Version : Resource files not showing on Ubuntu 16.04



EVARATE
14th April 2020, 18:32
Hi.
I write an application on my main system (Ubuntu 18.04) and build the executable in a virtual machine (Ubuntu 16.04). I synchronize the two projects via a github repository. When running my project in debug mode on Ubuntu 18.04 everything works and all icons show up. However when doing the same on the Ubuntu 16.04 system none of the items are visible in the UI of the application.
I make the Appimages with linuxdeployqt (https://github.com/probonopd/linuxdeployqt).

Things I've tried:
- Run qmake
- Rebuild the project
- In the source code when hovering the mouse cursor above the resource path the correct images get previewed
- All the icon files are added to the .qrc file
- There is only one .qrc file
- The icons are missing in the in-application build as well as in the generated Appimage file when executing it on Ubuntu 16.04 and Ubuntu 18.04

The icons are in the .svg vector graphics, could that be the problem?

ChrisW67
14th April 2020, 23:28
So you have built on 18.04, made a deployment package on 18.04 using a third-party tool, deployed that package on 16.04, and you do not see the SVG icons.

If you are using the QRC file correctly then resources are built in to the executable; they cannot be missing but they will not be files in the deployment bundle either. If you are explicitly loading them, then you should be referring to them by the pseudo-path "qrc:///images/someicon.svg" and not some relative path like "images/someicon.svg"

Check that the third party tool has placed ".../imageformats/libqsvg.so" and/or ".../iconengines/libqsvgicon.so" in the deployment package. If it hasn't then there are options to force it to do so.