I would like to run a program written in C/GTK2 outside the msys shell.
Through ldd I checked the libraries needed at startup and put them in a folder outside msys2 together with the executable, I also added the contents of /lib/gdk-pixbuf-2.0/2.10.0/loaders.
From this position the program starts correctly but does not load the theme and icons.
this part of the program runs without returning any errors:
pixmap_dir = strdup("../img");
add_pixmap_directory (pixmap_dir);
Icon_path = g_strdup("../img/mini/");
g_free (pixmap_dir);
but the icons are not loaded.
I did these other tests which are valid for GTK3:
From MSYS2 I copied share/themes/Windows10/gtk-2.0 to the program folder
Also from MSYS2 I copied etc/gtk-2.0 into the program folder and inside it I created the settings.ini file with these lines:
[Settings]
gtk-theme-name=Windows10
gtk-font-name=Segoe UI 9
in the end I ran:
$ glib-compile-schemas /mingw64/share/glib-2.0/schemas/ --targetdir=/c/openhp/bin/
the program is loaded correctly if executed inside the shell and from the compilation directory, if through the shel I move to the external folder and run it from that position it fails to load neither the theme nor the icons.
I tried changing the PATH variable to g_setenv
g_setenv("PATH","./" ,TRUE);
but at the moment I can't find a solution
Does any of you have experience?
Thanks in advance for your attention
Paul