Search code examples
windowsgtkmingwglibmsys2

Problems with deploying a GTK Application


I am currently testing the GTK Application that I built on windows using the MSYS2 64bit shell.

For the program to be able to run outside of the shell, I packed all the required DLLs with it as well as the following:

FOLDER\lib\gdk-pixbuf-2.0\2.10.0\loaders\\*
FOLDER\lib\gdk-pixbuf-2.0\2.10.0\loaders.cache
FOLDER\share\glib-2.0\schemas\gschemas.compiled 
FOLDER\share\icons\Adwaita\\*
FOLDER\share\icons\hicolor\\*

The good news is: It works :) And it also works flawlessly on another PC that doesnt have GTK/Msys2/whatever installed.

The bad news is: On yet another PC (I have tested it on 2 other Systems other than my developing System so far, one one of them it works flawlessly), the program itself works, but the GUI is not rendered sharply (texts are blurry).

Do you guys have any idea on what could be the reason for that? I'm guessing it could be one of the following:

  • The affected system could have some general display problems that have nothing to do with my app.
  • The gschemas.compiled file does not suit the affected system. In that case I would probably have to create that file dynamically, but I have no idea how to do this.
  • I am missing some file from GTK or Glib that would solve the problem.

I am thankful for any help :) Compiling/Deploying a GTK App for Windows has proven to be a pain in the ***, but since (almost) everything works now, I feel like its not much that I am missing unless I have overseen something critical.

Regards,

tagelicht


Solution

  • Given the way you created your package, my bet is that you are missing some components, making the drawing code use some fallback routines, hence the "sharp" drawing. Try to run the application in command line on the machine where your have the problem, to see if there are some unusual warnings you don't have when running it on your machine.

    See also my answer on how to distribute a GTK+ application on Windows.