Open jonaski opened 3 years ago
Indeed. Looks like the tool failed at identifying the Qt Plugins directory.
2020/10/18 01:30:59 qt_prfxpath: /usr
2020/10/18 01:30:59 Got qt_prfxpath but it does not contain 'plugins'
This means that inside the QtCore library, qt_prfxpath
is set to /usr
, but /usr/plugins does not exist. So question, why is qt_prfxpath
set to /usr
in your binary of Qt? Wouldn't it be correct to have qt_prfxpath
set to /usr/lib64/qt5/
? (That's probably a question only the Qt maintainer for openSUSE can answer...)
More information: https://github.com/probonopd/linuxdeployqt/issues/79
Just reading that something has changed recently:
As of version 5.14.0 Qt is relocatable, i.e. it is possible to move the Qt installation to a different directory without breaking functionality or loading of plugins
https://www.qt.io/blog/qt-is-relocatable
Which Qt version are you using? It may well be that the recent changes cannot be handled by the tool correctly yet.
Details of the recent Qt change: https://codereview.qt-project.org/c/qt/qtbase/+/210936
It's Qt 5.15.1.
I managed to make it work by adding: qt_prfxpath = "/usr/lib64/qt5"
to the end of the getQtPrfxpath().
I also had to modify the tools variable and remove "uploadtool" from the list.
So I think maybe I can use this tool. However I would like to only bundle certain gstreamer plugins, not all of them, and only bundle 1 sql plugin.
Maybe we could add environment variables or command line options for setting the Qt path, qt plugins and gstreamer plugins.
I guess the part in handleGStreamer is where I want to modify it to only include certain plugins, this line: locs, err := findWithPrefixInLibraryLocations("gstreamer-1.0")
I managed to make it work by adding: qt_prfxpath = "/usr/lib64/qt5" to the end of the getQtPrfxpath().
Is there a way to find out this path programmatically?
I also had to modify the tools variable and remove "uploadtool" from the list.
Why?
However I would like to only bundle certain gstreamer plugins, not all of them, and only bundle 1 sql plugin.
Based on which criteria? Would it be possible to put your criteria into code for an improved autodetection of what to bundle and what not to bundle?
Maybe we could add environment variables or command line options for setting the Qt path, qt plugins and gstreamer plugins.
With this tool, I want to avoid configurability if possible. Everything that can be configured adds complexity, reduces supportability, and will eventually be used incorrectly. Instead. we should be striving for the tool to do the right thing without the need for configuration.
It's always possible to delete files after deploy
has been run on the AppDir.
What I simply suggest is having a environment variable or command line option that can override bundling everything, if it isn't set it can fallback to the behavior you got now bundling everything in gstreamer-1.0. Bundling all the gstreamer plugins will drag in all their dependencies, all sorts of video plugins which it doesn't use, and all the libraries they depend on. Deleting them after bundling isn't an option as it is bugprone and can accidentally delete the wrong dependencies too, and with an gstreamer upgrade might add several more plugins too, which I then have to manually update to dele again. However I realize you are not keen on this idea, so I will just use a modified version of your tool. For now I've simply hardcoded the list in handleGStreamer.
Bundling all the gstreamer plugins will drag in all their dependencies, all sorts of video plugins which it doesn't use, and all the libraries they depend on. Deleting them after bundling isn't an option as it is bugprone and can accidentally delete the wrong dependencies too, and with an gstreamer upgrade might add several more plugins too, which I then have to manually update to dele again.
I see, you are right about this.
So again my question: How do you decide which gstreamer plugins to bundle and which ones not to bundle?
I decide it based on what functionality the applications uses in gstreamer, and what relevant audio codecs are needed, etc. ie.: Strawberry got a transcoding feature, so encoding is used too. But gstreamer got a bunch of other audio plugins too that I don't use, and hardly know what is, gstreamer is huge. I don't think it's easy to automatically detect it. Work in progress here: https://github.com/jonaski/go-appimage/tree/strawberry - I don't really know Go lang but at least it runs and looks to be working, have to fiddle a bit with which qt styles I want to include too.
Looks like the tool is crashing here. I'm not familiar with Go code. Looks like it's looking for a "plugins" directory under /usr. This is openSUSE Thumbleweed. The Qt plugins directory is /usr/lib64/qt5/plugins/