Skip to content
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

Copy certain plugins unless "-no-plugins" is specified #82

Closed
bjorn opened this issue Feb 21, 2017 · 14 comments
Closed

Copy certain plugins unless "-no-plugins" is specified #82

bjorn opened this issue Feb 21, 2017 · 14 comments

Comments

@bjorn
Copy link
Contributor

bjorn commented Feb 21, 2017

When I released Tiled 0.18.1, the Linux archive built with linuxdeployqt (version 9a1fbab) contained libQt5Svg.so.5 and the libqsvg.so image format plugin. Now that I'm using linuxdeployqt release 2, neither of these are included anymore.

I would like to use release 2, because it fixes the shipping of all other image format plugins. However I would prefer not to drop the SVG plugin. The problem is that Tiled does not itself rely on QtSvg (I tried linking it to QtSvg, but that was not enough to fool linuxdeployqt, I needed to actually use it).

What would a proper solution look like? I could imagine specifying additional Qt libraries to include, or specifying additional Qt plugins to include, or handling SVG explicitly with an -qtsvg command line option.

@probonopd
Copy link
Owner

What exactly in your AppImage requires/uses the SVG plugin, and how could appimaged detect that?

@bjorn
Copy link
Contributor Author

bjorn commented Feb 21, 2017 via email

@probonopd
Copy link
Owner

probonopd commented Feb 21, 2017

Sorry for my ignorance here, but which component uses, i.e., takes advantage of a present, SVG image plugin? (So could we say, if this component is present, we should also deploy the SVG image plugin?)

As a workaround, have you tried running linuxdeployt, then manually copying in the SVG image plugin, then running linuxdeployqt -appimage?

@bjorn
Copy link
Contributor Author

bjorn commented Feb 21, 2017 via email

@probonopd
Copy link
Owner

OK, I begin to understand, you are saying conceptually there is no way for linuxdeployqt to know that your application can benefit from this plugin. Is running linuxdeployt, then manually copying in the SVG image plugin, then running linuxdeployqt -appimage an accaptable solution?

@bjorn
Copy link
Contributor Author

bjorn commented Feb 22, 2017

Is running linuxdeployt, then manually copying in the SVG image plugin, then running linuxdeployqt -appimage an accaptable solution?

Hmm, I guess it would! I did not realize that I could use linuxdeployqt this way. I'll give it a try this evening.

@vadi2
Copy link

vadi2 commented Mar 8, 2017

I don't think Qt needs QtSvg to read SVG format - I learnt that a couple of days ago myself on #qt. You only need QtSvg if you are actually QT+=svg and you so stuff with the QtSvg class. Try it to be sure, but I think this is a case of misunderstanding.

@bjorn
Copy link
Contributor Author

bjorn commented Mar 8, 2017

I don't think Qt needs QtSvg to read SVG format

The SVG image plugin uses QtSvg for rasterizing the SVG into a QImage. So, the plugin will not work if you do not distribute QtSvg with your program.

This of course does not apply when you're not distributing your program, or when the program is distributed as an operating system package with Qt as a dependency. In that case, the SVG image plugin installed on the system will be used, which will pick up the QtSvg library installed on the system and you don't need to worry about it.

@probonopd
Copy link
Owner

Actually we inherited from macdeployqt the sentence

The accessibility, image formats, and text codec plugins are always copied, unless "-no-plugins" is specified

but didn't implement it so far... so would this solve your concern, do you think this would be a sensible thing to implement?

@vadi2
Copy link

vadi2 commented Mar 26, 2017 via email

@bjorn
Copy link
Contributor Author

bjorn commented Mar 26, 2017

Yeah, that would work fine for me as well.

The only problem I guess would be that packages are a little larger for those not shipping QtSvg, but the SVG image plugin is really small anyway (only about 23K), so I guess the logic meant to exclude it could just be removed.

@probonopd
Copy link
Owner

OK, the path of action is clear then:

The accessibility, image formats, and text codec plugins are always copied, unless "-no-plugins" is specified

needs to be implemented.

@probonopd probonopd changed the title Deploying SVG image format plugin when not using QtSvg Copy certain plugins unless "-no-plugins" is specified Mar 26, 2017
@probonopd
Copy link
Owner

PR welcome!

@bjorn
Copy link
Contributor Author

bjorn commented Jul 15, 2017

I've currently solved the issue in Tiled by copying over the SVG image plugin before running linuxdeployqt, like you suggested back in February:

cp /opt/qt58/plugins/imageformats/libqsvg.so Tiled/usr/plugins/imageformats/

But maybe I can try a PR for this on Monday.

oxy86 added a commit to socnetv/app that referenced this issue Feb 16, 2019
…d *. For the SVG icon engine and SVG in nodes, the problem was resolved by adding qtsvg package in travis - See last commit by @probonopd in probonopd/linuxdeployqt#82
turmary pushed a commit to turmary/linuxdeployqt that referenced this issue Jul 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants