How to download and compile DDNet on Windows

Read tips and guides about teeworlds-related subjects (mapping, compiling, ..).
heinrich5991
Posts: 47
Joined: Sat Sep 05, 2015 7:18 pm

How to download and compile DDNet on Windows

Post by heinrich5991 »

How to download and compile DDNet on Windows
written by heinrich5991

This should have no prerequisites except a recent Windows installation and a web browser.
If you encounter ANY problems with the process, please report these problems in this thread.

1. Open https://www.visualstudio.com/.
Image

2. Hover the left button "Download Visual Studio".
Image

3. Click "Community 2017".
Image

4. Wait a couple of seconds until the download window appears.
Image

5. Click "Save File".
Image

6. Execute the downloaded installer "vs_Community.exe".
Image

7. Confirm the UAC prompt by clicking "Yes".
[Sorry, couldn't easily take a screenshot of the UAC prompt.]

8. Click "Continue" to accept the licensing terms.
Image

9. Wait for the progress bar to complete.
Image

10. In the new window, select "Desktop development with C++" and "Python development".
Image

11. Click on "Individual Components".
Image

12. Select "Git for Windows" in the "Code tools" list.
Image

13. Click "Install".
Image

14. Wait a loong time for the installer to finish.
Image

15. Still waiting.
Image

16. Click "Launch".
Image

17. In the welcome screen, click "Not now, maybe later".
Image

18. In the theme selection screen, click "Start Visual Studio".
Image

19. Wait a second for Visual Studio to start.
Image

20. Select "Team Explorer" in the "View" menu.
Image

21. In the "Team Explorer", in "Local Git Repositories", click "Clone".
Image

22. Enter "https://github.com/ddnet/ddnet" into the first line, and adjust the second path if you want to. Click "Clone".
Image

23. Wait a bit until the repository is cloned. (A few terminals might pop up.)
Image

24. Your screen should now look something like this. Click the arrow next to "Select Startup Item…".
Image

25. In the submenu, click "DDNet.exe".
Image

26. Click the button with the green arrow and "DDNet.exe", wait for DDNet to compile.
Image

27. The client should start up, you might be greeted by a firewall message. Select "Public networks" in addition to the already selected "Private networks" and click "Allow access".
Image

28. You should now see the typical DDNet client.
Image Image

Congratulations, you have successfully compiled DDNet.
User avatar
ChillerDragon
Posts: 133
Joined: Thu Oct 23, 2014 2:21 pm
Location: Germany - Munich
Player profile: http://ddnet.tw/players/ChillerDragon/
Mapper profile: https://ddnet.tw/mappers/ChillerDragon/
Clan: Chilli.*
Website: http://chillerdragon.weebly.com/
YouTube: user/GermanMinecraftZC

Re: How to download and compile DDNet on Windows

Post by ChillerDragon »

Thanks for the nice Tutorial c:
Image
Image
Index
Posts: 1133
Joined: Mon May 05, 2014 7:30 pm
Clan: Eagle

Re: How to download and compile DDNet on Windows

Post by Index »

Thanks for the detailed tutorial, edited the headline and added it to the link list :3
We also have a similar guide by milk (viewtopic.php?f=16&t=3061), but that's totally fine.
heinrich5991
Posts: 47
Joined: Sat Sep 05, 2015 7:18 pm

Re: How to download and compile DDNet on Windows

Post by heinrich5991 »

My tutorial also uses Visual Studio. The two tutorial titles about compiling suggest that it does not. The difference is only in what tools the tutorials install and which build systems they use.

Milk's tutorial uses bam, you have to install MSVS and Python, and compile bam. It currently doesn't work because it doesn't use git to get the sources. Mine uses CMake (you don't have to install that separately), and you only have to install MSVS 2017.
[mod=Index]Oh, thanks for the explanation)) Just a random Index revealing his nub knowledge here xdd .____.
[/mod]
Frr
Posts: 121
Joined: Sat Dec 12, 2015 9:57 am
Player profile: https://ddnet.tw/players/Frr-32--58-3/

Re: How to download and compile DDNet on Windows

Post by Frr »

Doesn't work.

It fails with the following output:
1>
1> Change Dir: C:/Users/Frr/CMakeBuilds/e687eef7-e2c3-2033-9852-cb0e8d07bc7a/build/x86-Release/CMakeFiles/CMakeTmp
1>
1>
1>
1> Run Build
1> Command:"C:/PROGRA~2/MIB055~1/2017/COMMUN~1/Common7/IDE/COMMON~1/MICROS~1/CMake/Ninja/ninja.exe"
1> "cmTC_bb90e"
1>
1> ninja: error: build.ninja:30: loading 'rules.ninja':


25. In the submenu, click "DDNet.exe".

There is nothing except "Current Document"

x86-Debug
x86-Release
x64-Debug
x64-Release

The bam compiling work for me in a proper way.
User avatar
deen
TECHNICAL Team
Posts: 3575
Joined: Mon May 05, 2014 2:30 pm
Player profile: https://ddnet.org/players/deen/
Discord: deen#5910

Re: How to download and compile DDNet on Windows

Post by deen »

Give us more output. Not sure what's going wrong with cmake there.
heinrich5991
Posts: 47
Joined: Sat Sep 05, 2015 7:18 pm

Re: How to download and compile DDNet on Windows

Post by heinrich5991 »

Also, can you tell us what operating system you're on (Windows 7, Windows 10, ...) and whether you had installed Microsoft Visual Studio or other development tools before this tutorial.
Frr
Posts: 121
Joined: Sat Dec 12, 2015 9:57 am
Player profile: https://ddnet.tw/players/Frr-32--58-3/

Re: How to download and compile DDNet on Windows

Post by Frr »

Windows 10 x64. After all steps there is no such a option "make ddnet.exe" or something, just current document and release choices.

Other things i did by this guide.

There is no "project file" in your guide so it's a mystery how to compile for me. :3

May you attach something like project file vcxproj or sln?
Last edited by Frr on Thu Nov 16, 2017 4:31 pm, edited 1 time in total.
heinrich5991
Posts: 47
Joined: Sat Sep 05, 2015 7:18 pm

Re: How to download and compile DDNet on Windows

Post by heinrich5991 »

As deen said, can you try to give us more of the initial output? If there are filenames in it, maybe you could check whether they contain more logs. Try deleting the repository again and waiting until all things have settled after step 24 (in the log in the bottom of the screen).
Frr
Posts: 121
Joined: Sat Dec 12, 2015 9:57 am
Player profile: https://ddnet.tw/players/Frr-32--58-3/

Re: How to download and compile DDNet on Windows

Post by Frr »

Win10 64
Reinstalled from repository:

CMake Error at C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.9/Modules/CMakeTestCCompiler.cmake:51 (message):
The C compiler "C:/Program Files (x86)/Microsoft Visual
Studio/2017/Community/VC/Tools/MSVC/14.11.25503/bin/Hostx86/x86/cl.exe" is
not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/Users/Frr/CMakeBuilds/14360a3a-fb71-103c-a730-189ca0c76231/build/x86-Debug/CMakeFiles/CMakeTmp



Run Build
Command:"C:/PROGRA~2/MIB055~1/2017/COMMUN~1/Common7/IDE/COMMON~1/MICROS~1/CMake/Ninja/ninja.exe"
"cmTC_533bb"

ninja: error: build.ninja:30: loading 'rules.ninja': ═х єфрхЄё 
эрщЄш єърчрээ√щ Їрщы.




include rules.ninja


^ near here





CMake will not be able to correctly generate this project.
Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests