Building RttR with Visual Studio 2010

Asked by FloSoft

To build Return To The Roots with Visual Studio 2010, you have to get the source code first.

Therefore, you have to install "bzr"
Then, open a command prompt, change to a directory you want (cd path\to\dir) and execute "bzr branch lp:s25rttr"
It takes a while to download the source code.
If its completed successfully, you have to extract "s25rttr\contrib\full-contrib-msvc2010.rar".

Now open "s25rttr\win32\s25client.sln" with Visual Studio 2010
After that, use "View" "Other Windows" "Property Manager" to add the property-manager to your vs2010 view - in it, open one loaded project of your choice, and double click on "Microsoft.Cpp.Win32.user"

It should start on the entry "VC Directories"
Now add following paths:
ExecutableDirs: "path/to/s25rttr/contrib/full-contrib-msvc2010/bin"
IncludeDirs: "path/to/s25rttr/contrib/full-contrib-msvc2010/include"
LibraryDirs: "path/to/s25rttr/contrib/full-contrib-msvc2010/lib"

and press OK
If you press "Build" "Build Solution" now, it should create the complete project.

To debug within visual studio 2010,
you should either put

#define GAMEDIR "path/to/s2"

into your build_paths.h or copy "DATA" and "GFX" from your settlers 2 installation to the same directory, where "build_paths.h" is.

For both variants, you have to put "$(SolutionDir)\..\.." into "Working Directory" in "Project Properties / Debugging"

Question information

Language:
English Edit question
Status:
Solved
For:
Return To The Roots Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
FloSoft (flosoft) said :
#1

(F.A.Q)

Revision history for this message
FloSoft (flosoft) said :
#2

FloSoft suggests this article as an answer to your question:
FAQ #1315: “Building RttR with Visual Studio 2010”.

Revision history for this message
Trebxson (trebxson) said :
#3

> in it, open one loaded project of your choice, and double click on "Microsoft.Cpp.Win32.user"
Microsoft Visual C++ 2010 select first Extras > Einstellungen > Erweiterte Einstellungen (maybe anyone can help with english titled menu?).

Revision history for this message
Trebxson (trebxson) said :
#4

I had to change "Startprojekt" from libsiedler2 to s25client (thanks to Spike).
> > Das Programm "F:\Projekte\s25rttr\win32\vs2010\Debug\libsiedler2.lib" kann nicht gestartet werden. ... Die angegebene Datei hat eine unbekanntes oder nicht unterstütztes Binärformat.

> For both variants, you have to put "$(SolutionDir)\..\.." into "Working Directory" in "Project Properties / Debugging"
> > driver not found
For me $(ProjectDir)\..\..\.. works.

Revision history for this message
Trebxson (trebxson) said :
#5