How to compile and debug ddnet on Windows in Visual Studio

Guides about mapping and everything Teeworlds related.

User avatar
justafish
User
Posts: 58
Joined: Sun Dec 18, 2016 7:49 pm
Location: Sweden
Player profile: Just%20a%20fish

Re: How to compile and debug ddnet on Windows in Visual Studio

Post by justafish » Fri Apr 07, 2017 6:56 pm

deen wrote:The C files should be compiled with a C compiler, not with a C++ one. That's all I can tell though, hopefully someone with Visual Studio experience can chime in.
I guess I am not that experienced with C compiler. I just followed the guide and hoped the setup would work for me c: I know how to code, just not how to set things up ._.
BeaR wrote:Looks like the scripts for generating the protocol files aren't executed properly. Either call them manually or fix your python setup.
How can I call them manually? Which protocol files are you talking about.. what is a protocol file ._.?


If it is easier to get everything to work under Linux I could try that as well.
Smoking kills. If you're killed, you've lost a very important part of your life.

User avatar
Ryozuki
User
Posts: 1736
Joined: Tue Feb 24, 2015 7:28 am
Location: Catalonia
Player profile: Ryozuki
Mapper profile: Ryozuki
Clan: Unique
Website: https://ryozuki.xyz/

Re: How to compile and debug ddnet on Windows in Visual Studio

Post by Ryozuki » Fri Apr 07, 2017 9:16 pm

justafish wrote:
deen wrote:The C files should be compiled with a C compiler, not with a C++ one. That's all I can tell though, hopefully someone with Visual Studio experience can chime in.
I guess I am not that experienced with C compiler. I just followed the guide and hoped the setup would work for me c: I know how to code, just not how to set things up ._.
BeaR wrote:Looks like the scripts for generating the protocol files aren't executed properly. Either call them manually or fix your python setup.
How can I call them manually? Which protocol files are you talking about.. what is a protocol file ._.?


If it is easier to get everything to work under Linux I could try that as well.
You have python installed and or added it to the windows PATH?

User avatar
justafish
User
Posts: 58
Joined: Sun Dec 18, 2016 7:49 pm
Location: Sweden
Player profile: Just%20a%20fish

Re: How to compile and debug ddnet on Windows in Visual Studio

Post by justafish » Fri Apr 07, 2017 11:04 pm

Ryozuki wrote:You have python installed and or added it to the windows PATH?
Yes I have python3 installed and added to my windows path. I can reach it from the cmd anywhere with the command
"python"
Smoking kills. If you're killed, you've lost a very important part of your life.

milk
User
Posts: 207
Joined: Mon May 05, 2014 5:25 pm
Player profile: milk

Re: How to compile and debug ddnet on Windows in Visual Studio

Post by milk » Sat Apr 08, 2017 8:43 pm

justafish wrote:I have been trying to follow this guide, but I just can't get it to work.
Here is what I get in Visual Studio Express 10.0:
http://pasted.co/aae99a7a

Errors everywhere! Can someone please help me? :/
I was able to get these errors when completely removed python (my visual studio crashed then actually). So I assume Bear is right.
Try to reinstall python maybe. (If you didn't do this)

BeaR
User
Posts: 54
Joined: Fri May 30, 2014 10:18 am
Player profile: BeaR

Re: How to compile and debug ddnet on Windows in Visual Studio

Post by BeaR » Sun Apr 09, 2017 8:26 pm

justafish wrote:
BeaR wrote:Looks like the scripts for generating the protocol files aren't executed properly. Either call them manually or fix your python setup.
How can I call them manually? Which protocol files are you talking about.. what is a protocol file ._.?
I should have clarified it. On windows, bam assumes that *.py files are associated with the python installation. This probably didnt happen on your system during the python installation. So bam tries to call `compile.py` (and the other datasrc scripts) but they won't be exectued.
As you have installed python already, you can try to simply execute the scripts in /datasrc manually, which will generate some C/C++ files. (I don't remember the output directory, somthing like src/generated..)
Please double-check if you call them manually that these files are generated, might have to call the scripts from a different directory!

The proper way would be as milk described to fix the problem. This means manually associating *.py files with your python interpreter (compiler, w/e) or re-installing it from scratch. IIRC you can select during installation if you want the installer to setup the association for you.

Linux is also an option, but shouldn't be much harder on windows (:
I hope this helps!

User avatar
justafish
User
Posts: 58
Joined: Sun Dec 18, 2016 7:49 pm
Location: Sweden
Player profile: Just%20a%20fish

Re: How to compile and debug ddnet on Windows in Visual Studio

Post by justafish » Sun Apr 09, 2017 8:59 pm

Thank you guys for the help! I will try as soon as I have time :)!

I do think that I tried running the *.py scripts manually from the terminal, but I don't think they actually generated anything.
Also I have to say that I had some problem with just getting the "rights" for bam.exe to execute properly, and when i press F7 the script pops up a fresh (none privileged and missing dependencies) terminal which bam.exe start to run at. Bam will complain about missing "cl" (which I figured was some kind of dependencies/etc from VS... so I had to manually run some vsusarr-ish.bat command from (visual studio 2010)/VC/ before I could run bam manually.)

I will try again, will come back for more awesome feedback if needed :D!

----------
Funny thing, right after I wrote this I think I know exactly what you mean now. When I clicked F7 sublime was weirdly popping up with random python scripts at my face... which I suppose was actually going to get executed by python, not edited by sublime.
Smoking kills. If you're killed, you've lost a very important part of your life.

User avatar
DEXi
User
Posts: 10
Joined: Fri Nov 17, 2017 1:45 pm
Location: Dexter Laboratory
Player profile: DEXi
Mapper profile: DEXi
Clan: Royal4

Re: How to compile and debug ddnet on Windows in Visual Studio

Post by DEXi » Tue Nov 21, 2017 3:39 pm

Visual studio 2010 doesn't compile "DDNet" anymore. ( lack "log2f" function and ...)
~~~~Simple

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest