please document how to build distribution package for Windows
I'm a newbie of GTK3.
Everything work on Debian.
I also can successfully cross-compile from Debian to Windows using MXE (https://mxe.cc/) my simple GTK3 app, both dynamically linked and statically linked. Statically linked 64bit, generate a 18 MB stripped .exe and require only .glade file to work, no themes or external icons.
Now I'm trying to build that simple GTK app for Windows, using Windows and Mingw/MSYS2 as documented at: https://www.gtk.org/docs/installations/windows MSYS2 is amazing as work really like Linux, Makefile and GNU toolchain, so generating a dynamic binary and collecting all the DLL is easy.
MinGW64 GTK version is 3.24.34
The dynamic 64bit binary is 128 kB, then I collected all the DLL reported by ldd and are about 22 MB all stripped.
The resulting binary does not start as complaint with this error:
Gtk:ERROR:../gtk/gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load C:\ProgramFiles\msys64\mingw64\share\icons\Adwaita\16x16/status\image-missing.png: U nrecognized image file format (gdk-pixbuf-error-quark, 3) Bail out! Gtk:ERROR:../gtk/gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load C:\ProgramFiles\msys64\mingw64\share\icons\Adwaita\16x16/status\image-miss ing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
I tryed to follow the steps "Building and distributing your application" at https://www.gtk.org/docs/installations/windows but some are not clear.
Step 1: OK
Step 2: is not clear where copy the "Adwaita" directory, I put to <appDir>/share/icons/Adwaita
Step 3: there are no icons in hicolor package, I copyed the one from:
/mingw64/share/icons/hicolor
to:
<appDir>/share/icons/hicolor
Step 4: OK
Step 5: I had to manually create the dir:
<appDir>/share/glib-2.0/schemas
or I got missing directory error.
Then I got always this:
<appDir>$ glib-compile-schemas share/glib-2.0/schemas
No schema files found: doing nothing.
The binary still does not start as complaint with the same error as above.
What other I have to do?
Is there an updated how to for generating a native Win binary?
thank you