For reference, here is the existing page: https://www.gtk.org/download/windows.php
It links to a blog post, which suggests creating a whole pacman package manifest and using that, or copying what gedit did which seems fairly complicated. Instead, I would suggest something like this:
Sample distribution structure (64 bit)
- app.exe is your app
- app_icon.svg is your app icon. Should be named to follow reverse dns notation (e.g., org.name.Project, com.name.Project)
- 16x and 32x sized icons are needed, one for standard dpi, one for hdpi
- The action icons are icons common gtk widgets use, you may need others, or none of them
- bin, lib, and share correspond to the same directories in C:\msys64\mingw64
- After copying loaders.cache, change the line from
# LoaderDir = C:\msys64\mingw64\lib\gdk-pixbuf-2.0\2.10.0\loaders
to# LoaderDir = "..\lib\gdk-pixbuf-2.0\2.10.0\loaders"
- libpixbufloader-png.dll and libpixbufloader-svg.dll are common file formats, but if you use e.g. jpegs, make sure to add the corresponding dll as well
root_directory
βββ bin
β βββ app.exe
β βββ libatk-1.0-0.dll
β βββ libbz2-1.dll
β βββ libcairo-2.dll
β βββ libcairo-gobject-2.dll
β βββ libdatrie-1.dll
β βββ libepoxy-0.dll
β βββ libexpat-1.dll
β βββ libffi-6.dll
β βββ libfontconfig-1.dll
β βββ libfreetype-6.dll
β βββ libfribidi-0.dll
β βββ libgcc_s_seh-1.dll
β βββ libgdk_pixbuf-2.0-0.dll
β βββ libgdk-3-0.dll
β βββ libgio-2.0-0.dll
β βββ libglib-2.0-0.dll
β βββ libgmodule-2.0-0.dll
β βββ libgobject-2.0-0.dll
β βββ libgraphite2.dll
β βββ libgtk-3-0.dll
β βββ libharfbuzz-0.dll
β βββ libiconv-2.dll
β βββ libintl-8.dll
β βββ libpango-1.0-0.dll
β βββ libpangocairo-1.0-0.dll
β βββ libpangoft2-1.0-0.dll
β βββ libpangowin32-1.0-0.dll
β βββ libpcre-1.dll
β βββ libpixman-1-0.dll
β βββ libpng16-16.dll
β βββ libstdc+Β±6.dll
β βββ libthai-0.dll
β βββ libwinpthread-1.dll
β βββ zlib1.dll
βββ lib
β βββ gdk-pixbuf-2.0
β βββ 2.10.0
β βββ loaders
β β βββ libpixbufloader-png.dll
β β βββ libpixbufloader-svg.dll
β βββ loaders.cache
βββ share
βββ icons
βββ Adwaita
β βββ 16x16
β β βββ actions
β β βββ list-add-symbolic.symbolic.png
β β βββ list-remove-symbolic.symbolic.png
β β βββ pan-down-symbolic.symbolic.png
β β βββ pan-up-symbolic.symbolic.png
β β βββ window-close-symbolic.symbolic.png
β β βββ window-maximize-symbolic.symbolic.png
β β βββ window-minimize-symbolic.symbolic.png
β β βββ window-restore-symbolic.symbolic.png
β βββ 32x32
β βββ actions
β βββ list-add-symbolic.symbolic.png
β βββ list-remove-symbolic.symbolic.png
β βββ pan-down-symbolic.symbolic.png
β βββ pan-up-symbolic.symbolic.png
β βββ window-close-symbolic.symbolic.png
β βββ window-maximize-symbolic.symbolic.png
β βββ window-minimize-symbolic.symbolic.png
β βββ window-restore-symbolic.symbolic.png
βββ hicolor
βββ scalable
βββ apps
βββ app_icon.svg
In addition, you may want to create an msi installer. You can use WiX, sample manifest here (taken from my project, and therefore needs to be generalized into a more generic template): https://paste.gnome.org/pi48ygyic
Converting an svg to an ico (requires inkscape and imagemagick, does the glob work? Not sure, didnβt want to manually list all 14 files):
inkscape -z -e icon1.png -w 16 -h 16 icon.svg
inkscape -z -e icon2.png -w 20 -h 20 icon.svg
inkscape -z -e icon3.png -w 24 -h 24 icon.svg
inkscape -z -e icon4.png -w 30 -h 30 icon.svg
inkscape -z -e icon5.png -w 32 -h 32 icon.svg
inkscape -z -e icon6.png -w 36 -h 36 icon.svg
inkscape -z -e icon7.png -w 40 -h 40 icon.svg
inkscape -z -e icon8.png -w 48 -h 48 icon.svg
inkscape -z -e icon9.png -w 60 -h 60 icon.svg
inkscape -z -e icon10.png -w 64 -h 64 icon.svg
inkscape -z -e icon11.png -w 72 -h 72 icon.svg
inkscape -z -e icon12.png -w 80 -h 80 icon.svg
inkscape -z -e icon13.png -w 96 -h 96 icon.svg
inkscape -z -e icon14.png -w 256 -h 256 icon.svg
convert *.png icon.ico
Questions still to be answered:
- The website says that due to the gpl license, you also need to distribute gtk etc source code. What does that entail? Is linking to gtk gitlab enough? What about your own gpl licensed source code?
- Better mingw64/msys2 usage instructions need to be written. I withheld from doing this since I only have rust stuff, not sure how other languages locate gtk libs and stuff
- macOS also needs better documentation + dmg template, but I havenβt gotten around to doing that for my app yet, so I have nothing for that at this time
- When alt-tabbing my gtk app, the icon over the window preview was the generic gtk icon, not sure why
- What other files (gtk builder xml, gsettings etc) should be shown in the sample?
- Dark vs light theme: Should the app provide a switch between these? How should this be handled?