How to compile and debug ddnet on Windows in Visual Studio
Posted: Tue Jan 19, 2016 7:51 am
How to compile and debug ddnet on Windows in Visual Studio
written by milk
There are already some teeworlds compiling tutorials for Windows (1, 2) but they are a bit outdated and not really friendly for newcomers with not quite good programming skills. I tried to make my own tutorial based on these but more extended and intuitive.
I hope this tutorial will help someone and save some time.
written by milk
There are already some teeworlds compiling tutorials for Windows (1, 2) but they are a bit outdated and not really friendly for newcomers with not quite good programming skills. I tried to make my own tutorial based on these but more extended and intuitive.
I hope this tutorial will help someone and save some time.
- Let's start.
You'll need Windows 7,8 or 10, 32/64 bit. Probably it should work on Windows XP SP3 too.
1. Install Visual Studio- 1.1 If you don't know which version is better to install, I recommend to use
Visual C++ 2010 Express
. You can also try one of these:
Visual Studio Express 2012
Visual Studio Express 2013
Visual Studio Express 2015 (for Desktop)
Visual Studio Community 2015
but they also install a lot of unnecessary stuff (about 7-10 GB), it's just a waste of disk space.
I will useVisual C++ 2010 Express
in this tutorial.
1.2 Download links to free english versions of Visual Studio:SpoilerShowMicrosoft Visual C++ 2010 Express
Web Installer:
http://download.microsoft.com/download/ ... vc_web.exe
OR offline installer (iso image):
https://go.microsoft.com/?linkid=9709969Microsoft Visual Studio Express 2012 for Windows Desktop
Web Installer or offline installer (iso image):
https://www.microsoft.com/en-us/downloa ... x?id=34673
Optional: Update 5 for Microsoft Visual Studio 2012
https://www.microsoft.com/en-us/downloa ... x?id=48708Microsoft Visual Studio Express 2013 for Windows Desktop with Update 5
Web Installer:
https://go.microsoft.com/fwlink/?LinkId=532495
OR offline installer (iso image):
https://go.microsoft.com/fwlink/?LinkId=532496Microsoft Visual Studio 2015 Express for Desktop
Web Installer:
http://go.microsoft.com/fwlink/?LinkID= ... lcid=0x409Microsoft Visual Studio Community 2015
Web Installer:
https://www.visualstudio.com/en-us/prod ... ty-vs.aspx
(Choose custom type of installation, unselect all options and then select only Common Tools for Visual C++ 2015)
Optional: Update 1 for Visual Studio 2015
Web Installer:
http://go.microsoft.com/fwlink/?LinkId=691129
- 2.1 Download archive with ddnet sources from https://github.com/ddnet/ddnet using "Download zip" button.
2.2 Extract it wherever you want (For example to "C:\ddnet\"). This is will be your project directory.SpoilerShow
- 3.1 Download and install Python 3.x for Windows from: https://www.python.org/downloads/
- 4.1 Download
bam
from https://github.com/matricks/bam using "Download zip" button.
4.2 Extract it wherever you want (For example to "C:\bam\").
4.3 Execute the filemake_win32_msvc.bat
, bam will compile itself.
4.4 Copy the compiled filebam.exe
to your project directory (For example to "C:\ddnet\").
- 5.1 Download
ddnet_visual_studio_project.zip
and extract it to your project directory (For example to "C:\ddnet\"). 5.2 Run the fileddnet.sln
and Visual Studio will open your project.
5.3 Press button "Show all files", right click on "src" folder and press "Include In Project".5.4 Now you can start to edit sources, compile and debug! There are 6 project configurations:SpoilerShowSpoilerShow- 5.4.1 Select
client_release
orserver_release
and pressDebug->Build Solution
in menu (or F7) to build client or server releases.
If everything is ok, compiled files will appear in your project directory.
5.4.2 Selectclient_debug
orserver_debug
and pressDebug->Start Debugging
in menu (or F5) to compile and start debugging client or server.SpoilerShow
server_sql_release
orserver_sql_debug
, you need to:- 5.5.1 Download
Boost C++ Libraries
from http://sourceforge.net/projects/boost/files/boost/
5.5.2 Extract archive toyour_project_directory\other\
(For example to "C:\ddnet\other\"). Rename extracted directory toboost
:5.5.3 DownloadSpoilerShowmsinttypes
from https://code.google.com/p/msinttypes/downloads/list
5.5.4 Extract archive toyour_project_directory\other\
(For example to "C:\ddnet\other\"). Rename extracted directory tomsinttypes
:5.5.5 Now you are able to compile and debug DDNet-Server_sql. But you will also need to install and setup a database server to make your DDNet-Server_sql working as intended:SpoilerShow
MariaDB
(better), https://downloads.mariadb.org/
or
MySQL Community Server
, https://dev.mysql.com/downloads/mysql/
- 5.4.1 Select
- 1.1 If you don't know which version is better to install, I recommend to use