linuxdeployqt
linuxdeployqt copied to clipboard
Automatically bundle Qt plugin for AppImage updates
I would like to integrate this into linuxdeployqt
so that linuxdeployqt
users must do nothing special to get the update functionality for their Qt apps automatically.
https://github.com/TheFutureShell/updatedeployqt/issues/9
cc @antony-jr
Its possible, You don't really need any code from updatedeployqt
, it really just writes configuration and copies the plugins to the respective directory in the AppDir. So you just need to write the configuration before hand and copy those plugins like you copy any additional plugins with linuxdeployqt. (After all its just a normal Qt Plugin , but you need to replace the QtXCB plugin too which is not that hard)
Great :+1:
Currently we still need to specify where the update menu is. Can you "guesstimate" it so that the configuration does not need to be changed for every application?
So I will write an option to pre-build Qt Plugins and Qt Plugin Injector for doing this stuff. updatedeployqt
will output all QtXCB plugin for all Qt version and a single plugin for AppImageUpdater which can run with any Qt version(5.6.0 >=). You need to find the qt version of the payload and copy the correct QtXCB plugin w.r.t qt version and simply copy AppImageUpdater plugin regardless of the Qt Version. As usual updatedeployqt
will read from .json file for controlling the behavior of the updater.
OR
We could just write the program to guesstimate everything.
I think the former is more work you, isn't it? Its up to you to decide because you are the maintainer.
Guesstimate everything :+1:
Guesstimate everything +1
So you are going to use sub process to use the tool? like you do with appimagetool? I think that solves a lot of problem. Okay then.
Or we could build updatedeployqt
functionality directly into linuxdeployqt
if this makes things easier. For example, linuxeployqt
already knows the qmake that is being used, and could figure out the Qt version from there:
https://github.com/probonopd/linuxdeployqt/blob/11e35ce7afe28139a923114c5cae8db54713c659/shared/shared.cpp#L1057
It is a small C program, it only depends on standard C libraries so integrating it is not that hard but it adds more complication. Like you need to copy the OpenSSL libs too. For now we copy the build system's OpenSSL libs assuming that it works because the build system should have successfully built the program itself but this is not fail safe. It would be nice if linuxdeployqt can package all the dependencies of the plugins you package, All we need is Qt network module which in turn depends on OpenSSL
For example, linuxeployqt already knows the qmake that is being used, and could figure out the Qt version from there:
I think we can pass a command line argument for that.
If linuxdeployqt automatically packages OpenSSL then we can save a lot of time. If you want the updater, you depend on the Qt Network module and OpenSSL so linuxdeployqt should automatically package that.
I'm currently making everything into a single repo(in updatedeployqt), you can see that in the experimental branch. So I might need some time.
Yes, everything in one repository sounds good, just ping me when you think it is ready.
Okay everything is now in a single repo(but untested). I also added the option to guess the configuration.
You have to execute it like this,
$ updatedeployqt -a "AppImageUpdaterBridge" [APPDIR]
For now there is no AppImage available for the latest build, But the build and deploy is in progress at travis-ci
Each build and deploy takes about 2:30 hours since we have to build 5 versions of Qt from source. I will not be available for the next 14 hours so if this build succeeds -> https://travis-ci.org/TheFutureShell/updatedeployqt/builds/567591279 then you can get the AppImage from the releases under the continuous tag as usual.
If everything goes well I will delete all unwanted repos from the org and start refactoring the code.
Wow, that is very exciting @antony-jr thank you. Keep me updated once there is an AppImage available. :+1:
oh cool this seems very exciting, would this help with this issue? https://github.com/nextcloud/desktop/issues/168
oh cool this seems very exciting, would this help with this issue? nextcloud/desktop#168
@Fuseteam Thanks for your interest but this is very alpha(i.e updatedeployqt -> https://github.com/antony-jr/updatedeployqt), But I've had it working for any Qt application but for now it's not suitable for production. But I do have the Qt Plugin and library in a very good condition but the thing it's not official, the official one is at https://github.com/AppImage/AppImageUpdate but if you want to look at the unofficial library which gives full support for the Qt framework then take a look at https://antony-jr.github.io/QAppImageUpdate (this can be built as plugin or as a library however you wish to use it) (There is also python support for it via Qt plugins)
@antony-jr it all still a bit foreign to me, so thanks for explaining