How to distribute a GTK+ application on Windows?

前端 未结 4 675
小鲜肉
小鲜肉 2020-12-05 08:30

I have installed GTK+ (specifically GTK3) via MSYS and MinGW on Windows. I now want to copy the GTK+ dlls to my application directory so that it can be run on a computer wit

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-05 09:01

    The following procedure can be used to obtain the necessary DLLs:

    1. Download Listdlls
    2. Leave your application running
    3. Open the PowerShell window where Listdlls.exe is located
    4. Use the command ./Listdlls.exe application_name.exe
    5. Copy all listed paths to a text file
    6. Delete all lines that contain "C:\WINDOWS*" in your text file
    7. Leave only the lines that contain "C:\msys64*...*.dll" in your text file
    8. Open Msys2 Shell
    9. Use $ cp "paste_all_paths_from_dlls" "destination_path"

    Cautions before using the $ cp command. In your text file, change "\" to "/" in the paths and remove line breaks.

提交回复
热议问题