Open asteding opened 4 years ago
Take a look here: https://gtk-rs.org/docs-src/tutorial/cross#packaging
You need to include the dlls from the docker container. They are located in /usr/x86_64-w64-mingw32/sys-root/mingw/bin
.
Edit: I made two new docker images to be able to compile Rust GTK-3 applications for Linux and Windows on CircleCI. You can find examples here: https://github.com/olback/dockerimages/tree/master/dockerfiles
I just compiled my first gtk-rs app natively in Windows, but had the same problem when I tried to distribute the .exe to another Windows machine. Is there a way to bundle the .dlls into the executable?
You can use an application packing framework or create an MSI installer to distribute the DLLs.
Thanks @NoraCodes, I meant statically bundle the libs, but yes i guess creating an installer works too. Thanks for everything you do!
Absolutely! I think it is possible to statically bundle them, but better not to because a lot of people will already have them installed, so if you provide an installer that checks for them you can reduce install size and update burden.
Best of luck!
Hello @NoraCodes i stumbled arcross your post and thought i might give it a try since i need to crosscompile from linux to windows.
I followed the instruction on your repo and build a windows .exe of the gtk-rs minimum example found at their page. Sadly if i try start the .exe on my Windows 10 (x64) i get several errors at startup. E.g.
What am i doing wrong? I'd like the approach and if it's simple to use i'd switch to rust for my next little project instead of a PyQt GUI.
Thanks for any help, have a nice day.