Although I successfully built the GNOME official GTK+ example using vcpkg, the running application main window shows empty maximize/minimize/close buttons, with console output:
(hello_gtk.exe:1936): Gtk-WARNING **: Could not find the icon 'window-minimize-symbolic-ltr'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
http://icon-theme.freedesktop.org/releases
The window looks like this:

From a casual stackoverflow search, I noticed that most similar questions are about MSYS2, where installing an icon-set package or fixing the relative folder structure would solve the issue. But with vcpkg, I found that certain magic happens when building the app: All the dependency DLLs will be copied to the EXE folder. This makes it hard to understand what's going on with the relative paths.
Another problem is that it's unclear how to install any GNOME icon themes using vcpkg.
Any ideas how to fix this?
I worked around the problem by fixing the icons manually. The GTK doc was a big help.
However, having that 3-paragraph instruction for a manual hack is a shame. There should be a one-click fix in vcpkg, even if there were legal concerns.
All the dependency DLLs will be copied to the EXE folder. This makes it hard to understand what's going on with the relative paths.
That has to do with where Windows searches for DLLs. You can toogle that feature by VCPKG_APPLOCAL_DEPS. If you deactivate it, dont forget to add the triplets/(debug/)bin folder to PATH variable or you will be greated with an error message when starting your application
I worked around the problem by fixing the icons manually.
did you need to install anything extra on top of gtk or did you just move folders around?
did you need to install anything extra on top of gtk or did you just move folders around?
Like I mentioned in my last message, I basically did what GTK doc says. To find out, you can click that inline link and jump to Section Building and distributing your application.
hmm at least the old windows style should work correctly which could be considered a vcpkg issue.
Installing other/additional themes or icons should be done by your cmake script and is not a vcpkg issue.
hmm at least the old windows style should work correctly which could be considered a vcpkg issue.
Installing other/additional themes or icons should be done by your cmake script and is not a vcpkg issue.
Agreed. The default Windows theme should be available out of the box.
Have you fix this?
Looking forward for this to be fixed too. I had to redistribute a copy of the entire "share" folder in MSYS2 when installing the icons in there. It isn't convenient to redistribute such a big folder along with my application.
Having the same issue. The "GTK doc" linked above is a dead link.
Edit: Found the page, despite the dead link. Here it is. Some of the instructions there are really not specific enough. Is the stuff in Step 2 and Step 3 going into the share/themes/Windows10/gtk-3.0 directory, or do they get their own directory? This isn't clear by the statement "Perform the same steps" in Step 3. Where is share/glib-2.0/schemas coming from in Step 5? Should it already exist, or am I creating it? What is its contents?
In short, there's a lot of unstated assumptions being made and details left out of the instructions. For someone having zero experience with GTK, I'm left with a brute force "keep moving stuff around in the directories until it works" kind of approach.
I know I'm mostly commenting on the GTK documentation, but their poor documentation should be a good motivation to make installation easier here for Windows (or Microsoft can write a better alternative documentation for this issue).
It'd be cool if vcpkg can use their downloaded MSYS2 to download the icons and treat them "like DLLs" so they get copied to the right destination.
Having the same issue. The "GTK doc" linked above is a dead link.
Edit: Found the page, despite the dead link. Here it is. Some of the instructions there are really not specific enough. Is the stuff in Step 2 and Step 3 going into the
share/themes/Windows10/gtk-3.0directory, or do they get their own directory? This isn't clear by the statement "Perform the same steps" in Step 3. Where isshare/glib-2.0/schemascoming from in Step 5? Should it already exist, or am I creating it? What is its contents?In short, there's a lot of unstated assumptions being made and details left out of the instructions. For someone having zero experience with GTK, I'm left with a brute force "keep moving stuff around in the directories until it works" kind of approach.
I know I'm mostly commenting on the GTK documentation, but their poor documentation should be a good motivation to make installation easier here for Windows (or Microsoft can write a better alternative documentation for this issue).
Completely agreed. These are not hard problems but probably need traction to get the dev attention. Having such a visible problem would be a surprise to any newcomers and thus a bad PR.