I fixed the Windows runtime path so gdk-pixbuf can actually find/use its loader modules before GTK initializes, by adding win32_configure_pixbuf_loaders() and calling it in startup on Windows. This sets GDK_PIXBUF_MODULEDIR / GDK_PIXBUF_MODULE_FILE from the bundled install tree so SVG resources can render instead of placeholder icons.

I also fixed Windows packaging to include what the SVG path needs at runtime: librsvg DLLs, gdk-pixbuf loader modules, and loaders.cache in the release bundle.
This commit is contained in:
2026-02-17 21:30:51 -07:00
parent afc490aa18
commit 1a920ba955
2 changed files with 53 additions and 0 deletions

View File

@@ -67,6 +67,7 @@
<None Include="$(DepsRoot)\bin\*pangocairo-1.0-0.dll" />
<None Include="$(DepsRoot)\bin\*pangoft2-1.0-0.dll" />
<None Include="$(DepsRoot)\bin\*pangowin32-1.0-0.dll" />
<None Include="$(DepsRoot)\bin\*rsvg*.dll" />
<None Include="$(DepsRoot)\bin\*zlib*.dll" />
<None Include="$(DepsRoot)\bin\luajit*.dll" />
<None Include="$(DepsRoot)\bin\*girepository*.dll" />
@@ -82,6 +83,8 @@
<Gtk3Immodules Include="$(DepsRoot)\lib\gtk-3.0\3.0.0\immodules\**\*" />
<Gtk3PrintBackends Include="$(DepsRoot)\lib\gtk-3.0\3.0.0\printbackends\**\*" />
<GSettingsSchemas Include="$(DepsRoot)\share\glib-2.0\schemas\*" />
<GdkPixbufLoaders Include="$(DepsRoot)\lib\gdk-pixbuf-2.0\**\loaders\**\*" />
<GdkPixbufLoaderCache Include="$(DepsRoot)\lib\gdk-pixbuf-2.0\**\loaders.cache" />
<FontConfig Include="$(DepsRoot)\etc\fonts\*" />
<Share Include="share\**\*" />
@@ -95,6 +98,8 @@
<Copy SourceFiles="@(FontConfig)" DestinationFolder="$(ZoiteChatRel)\etc\fonts" />
<Copy SourceFiles="@(Gtk3Immodules)" DestinationFiles="@(Gtk3Immodules->'$(ZoiteChatRel)\lib\gtk-3.0\3.0.0\immodules\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(Gtk3PrintBackends)" DestinationFiles="@(Gtk3PrintBackends->'$(ZoiteChatRel)\lib\gtk-3.0\3.0.0\printbackends\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(GdkPixbufLoaders)" DestinationFiles="@(GdkPixbufLoaders->'$(ZoiteChatRel)\lib\gdk-pixbuf-2.0\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(GdkPixbufLoaderCache)" DestinationFiles="@(GdkPixbufLoaderCache->'$(ZoiteChatRel)\lib\gdk-pixbuf-2.0\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(GSettingsSchemas)" DestinationFiles="@(GSettingsSchemas->'$(ZoiteChatRel)\share\glib-2.0\schemas\%(Filename)%(Extension)')" />
<Copy SourceFiles="@(Share)" DestinationFiles="@(Share->'$(ZoiteChatRel)\share\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(DepsRootIcons)" DestinationFiles="@(DepsRootIcons->'$(ZoiteChatRel)\share\icons\%(RecursiveDir)%(Filename)%(Extension)')" />