How to port GTK applications for Windows #57
RickBarretto
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, everyone! I'm here again to show a bit more about
owkettle
working with Windows Operational System.Well, basically after show how to compile for Windows and do some PR to make things easier, I tried to distribute my application.
In this case I tested it locally, masking my PATH variable. I tested it in three different ways.
How I tested it
Before continue and say How I did it, I'll explain how I tested what I'm saying.
Well, I tested it in three different ways, as I said before. Running from
cmd
,Msys2
and fromexplorer
.I wanted to make sure that my binary was getting the DLLs and configuration from local path, and not from System/Msys2's paths
Running from
cmd
Path
withPath=""
to don't get libraries from my/mingw64/bin
pathmyapp.exe
, well, it's working.Running from
Msys2
PATH
withPATH=""
, as I did for mycmd
./myapp.exe
, working well tooRunning from
explorer
:How I did it
First at all, thanks for @PhilippMDoerner for your help. He sent me this StackOverflow's thread that made me find a good article of how do this the right way by @mjakeman, so, please fork and star his awesome article 🙂, all credits to him!
But, in short (with some minor changes):
Notes about the process
I made some minor changes about the original article, changing the directory structure. Note that I'm putting
lib/
andshare/
insidebin/
folder instead of the root folder. It's because I had some problems to runmyapp.exe
when I was atbin
folder, it just worked to me when I was at the root folder (let's say,myapp/
) and running with./bin/myapp
. When I tried to run my application with a double-click from Explorer, my application just printed a message that I used with Nim'secho
and closed without any GUI, since it didn't find the other folders.But, putting
lib/
andshare/
insidebin/
, I can run it without any problems... 😉The old structure:
The new structure:
I hope I have helped, any doubts, comments, issues, please let me know! 🙂
Related:
gorge
breaking builds #54Beta Was this translation helpful? Give feedback.
All reactions