Gtk+ icon missing when running in MS Windows

后端 未结 2 1700
时光取名叫无心
时光取名叫无心 2021-02-06 08:27

I have a C/GTK+ application developed on Ubuntu, and I want to cross-compile it so that it runs on MS Windows.

I followed this guide to set up the compiler, and the prog

2条回答
  •  故里飘歌
    2021-02-06 09:20

    This is a late reply but I encountered this issue and I have solved it with the following steps:

    SVG icons of the default theme (adwaita) needs to be copyed to a share directory relative to the bin directory bin../share/icons/Adwaita/scalable/* also bin../share/icons/Adwaita/icon-theme.cache and bin../share/icons/Adwaita/index.theme

    After several test, it appears that the following files are also required:

    lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.dll
    lib/gdk-pixbuf-2.0/2.10.0/loaders/loaders.cache
    

    The first line of this loaders.cache file also needs to be edited to "../lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.dll"

    The file tree looks like this:

    bin/gtkapplication.exe
    bin/*.dll
    share/loader.cache
    share/glib-2.0/gschemas.compiled
    share/icons/Adwaita/scalable/*
    share/icons/Adwaita/icon-theme.cache
    share/icons/Adwaita/index.theme
    lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.dll
    lib/gdk-pixbuf-2.0/2.10.0/loaders/loaders.cache
    

    Most up-to-date repository containing GTK+3 Runtime files for Windows (as of 5-23-2019): https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer

提交回复
热议问题