Re: [gtk-osx-users] Preserving symlinks in bundle for themes

On Sat, Oct 14, 2017 at 7:38 PM, John Ralls <jralls ceridwen us> wrote:

> On Oct 14, 2017, at 2:58 AM, Jiří Techet <techet gmail com> wrote:
> Hi John,
> I've been playing with GTK3 version of Geany (GTK3 seems to be getting in a usable shape finally) and theming support. I used the Papirus icon theme, removed icons not needed for Geany and got to the size of about 6MB, which is acceptable. However, when creating bundle, all symlinks within the theme get replaced with copies of the files and the resulting size of the theme in bundle becomes about 50MB. This is by far the largest portion of the bundle.
> Is there some way to prevent this? It's clear that the bundler tries to avoid situations when symlinks lead to stuff outside the bundle but with icons, symlinks are always relative to the icon theme directory so having them in the bundle should be safe.
> I think there could be some option of the <icon-theme> tag in the bundle settings file so users who know that symlinks don't point outside the bundle can use it to keep the symlinks.
> What do you think?

You mean now that the first release of Gtk4 is out? :-/

Unfortunately on OS X took a long time to get usable. Hopefully GTK 4 will be better.

I don’t have a philosophical objection to copying symlinks into the bundle, but what’s getting symlinked and why? Why can’t you have a single copy of each file and call it by its name?

Names in icon themes are standardized

plus there are many names corresponding to various MIME types which can then be displayed using g_content_type_get_icon() dynamically for each file type you get using g_content_type_guess(). Icon themes use a single icon e.g. for several MIME types and these then symlink to a single physical image such as

image-bmp.svg -> image-x-generic.svg
image-gif.svg -> image-x-generic.svg
image-jpeg.svg -> image-x-generic.svg
image-png.svg -> image-x-generic.svg

Try to get e.g. the Papirus icon theme I mentioned from

and check how symlinks are used. For instance, there's a directory 16x16 containing 16x16 SVG icons. Then there's a 16x16@2x directory which contains icons with 2x resolution for HiDPI displays and this one is just a symlink to the 16x16 directory. If you get the theme try to "cp -r" it to another location which creates a file copy of every symlink and compare the sizes - the difference is huge.

This is not specific to this particular icon theme - basically all the icon themes you find do this trick to save space. So I think it would be useful to allow symlinks for icon themes to save some space in the bundle.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]