-
Notifications
You must be signed in to change notification settings - Fork 83
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
Consider a Gtk+ plugin #2
Comments
|
I'd love to see someone maintain such a plugin externally. Do you know anybody who might be interested in that? |
|
Maybe @aferrero2707? |
|
Such a plugin might use https://github.com/TheAssassin/linuxdeploy-plugin-qt for inspiration. This plugin re-uses facilities maintained by the linuxdeploy authors to deploy files into the AppDir. |
|
@probonopd is there any code that showcases what needs to be done to bundle Gtk+? |
|
Not that I am aware of |
|
@TheAssassin @probonopd I think that my GIMP AppImage script can be taken as a good example of bundled GTK+ app, which is also fully relocatable. Is there a specific reason for using C/C++ for [the Qt plug-in[(https://github.com/TheAssassin/linuxdeploy-plugin-qt), instead of simple bash? |
|
The Qt plugin makes use of the linuxdeploy_core library which provides an AppDir class that allows for easy deployment of libraries and their dependencies. This is useful for deploying Qt plugin libraries. Also, it copies copyright files for the files it bundles. Because I wanted to experiment a bit, I wrote the AppImage plugin https://github.com/TheAssassin/linuxdeploy-plugin-appimage in C++ as well. It could be a shell script though, too. I am working on a bash plugin at the moment, see https://github.com/TheAssassin/linuxdeploy-plugin-checkrt. |
|
@TheAssassin @probonopd I have recently done some more work that attempts to generalise the bundling of GTK applications, partly also inspired by your linuxdeploy-plugin-checkrt code. The current scripts can be found here: https://github.com/aferrero2707/appimage-helper-scripts, and an example of bundling script here: https://github.com/aferrero2707/pf-build-appimage/blob/master/package-appimage.sh In particular, I took your environment hacking code, but changed a couple of details:
The custom functions.sh and bundle-gtk2.sh scripts provide a set of standard functions that help automating the bundling process, while apprun-helper.sh provides some helper functions for the main I can explain all the details if you are interested. |
|
It would be great if you could convert your code into a linuxdeploy plugin to make deploying GTK software as easy as never before. It would be great if you as a sort-of-GTK-expert could maintain that. Also, we'd have a consistent user experience. Not sure what you mean with |
|
Would help the cause if you could closely work together on this, @aferrero2707 and @TheAssassin. From what I observed, the Gtk+ developer community does not really embrace C++ but uses C with glib. Hence it might be worthwhile to implement the Gtk+ plugin using that stack, so that it comes naturally to Gtk+ developers. |
|
I'm maybe too pessimistic, but I don't expect much help from the GTK devs on this, so I would go for whatever language is more appropriate. No problem to collaborate with @TheAssassin. One technical question: does the code support hooks for custom scripts to be run during the bundling process, or should one always implement a plugin? |
I'm not sure if I understand. In terms of linuxdeploy, the only way to add functionality is to write plugins. The plugins can do whatever they want. |
|
@TheAssassin Here is an example: https://github.com/aferrero2707/gimp-appimage/blob/master/package-appimage.sh#L285 Such cases cannot be handled by a "generic" GTK linuxdeploy plug-in, hence the need of some "hooks" that allow to run some application-specific commands/actions on top of the generic ones. I hope it is more clear now. Anyway, I am planning to start coding some GTK plugin during next week, following the Qt example. |
|
@aferrero2707 at the moment it's possible to have plugins create an AppRun file, which linuxdeploy will not replace (unlike linuxdeploy, that's a feature for users who ship their own AppRun anyway). See e.g., https://github.com/TheAssassin/linuxdeploy-plugin-checkrt. The problem is that if multiple plugins try to create an AppRun file, they either have to replace them (losing the functionality other plugins might have installed) or not place their file. We have been discussing some strategies, but didn't like any of them really. If you have a suggestion how we could implement some "install your own startup hooks" feature thingy, please post them. Edit: if we come up with a solution, we should include it into the plugin specification. |
This si also what I was thinking about: a folder populated by hook scripts, that can be prioritised with a numerical prefix. By the way, as I was trying to explain, a similar problem exists when populating the AppDir, because there can be some application-specific things that need to be bundled and that cannot be handled by a generic infrastructure. For example, GIMP has its own configuration files that need to be copied into the AppDir. My idea would be to solve this problem in the same way, i.e. a folder where to put hook scripts prior to running I will try to come up with a working example during the next days. |
I think we should standardize that hooks must not expect to be run in a specific order. If we combine that with a rule that scripts must allow for multiple execution, scripts could check for other scripts, and run them before they make their own changes. Then, you can have a guaranteed, script-specified order of execution. |
|
I think this issue can be closed: https://github.com/linuxdeploy/linuxdeploy-plugin-gtk |
|
Indeed. Thanks. |
(Low priority, mainly a placeholder for the link below I just stumbled across)
Consider a Gtk+ plugin that would bundle the subset of Gtk+ that is needed.
Maybe some code (or inspiration) from https://github.com/jralls/gtk-mac-bundler could be adopted.
The text was updated successfully, but these errors were encountered: