Skip to content

Instantly share code, notes, and snippets.

@mjakeman
Last active February 11, 2025 01:47
Show Gist options
  • Save mjakeman/0add69647a048a5e262d591072c7facb to your computer and use it in GitHub Desktop.
Save mjakeman/0add69647a048a5e262d591072c7facb to your computer and use it in GitHub Desktop.
An easy way to distribute GTK applications and dependenices on Windows

Distribute GTK Apps with Windows (MSYS2)

Under msys2, running the following command copies all dependent DLLs to the current directory:

$ ldd mygtkapp.exe | grep '\/mingw.*\.dll' -o | xargs -I{} cp "{}" .

Where mygtkapp.exe is the executable in question (e.g. gtk3-demo, etc). This ensures that the necessary DLLs are bundled in the application folder so the end user does not need their own installation of msys2.

All credit to: https://stackoverflow.com/a/50130668

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment