[Feedback needed] MSVC 2010 guide

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

[Feedback needed] MSVC 2010 guide

Post by Roujin »

Hello folks, I today took the guide on the wiki for compiling OpenTTD with Microsoft Visual Studio 2008 and updated it to the 2010 version.
The updated guide is currently found in my user space: http://wiki.openttd.org/User:Roujin/Mic ... 2B%2B_2010
I'll move it to its proper place later on when I've gotten some feedback and maybe added some screenshots.

If anyone here also uses MSVC2010 I'd appreciate some feedback here or in that page's discussion, if anything is unclear or just wrong.
Also I've got the Ultimate Edition of VS2010 here (Thanks MSDNAA :)) so if anyone has got the Express Edition handy, a confirmation that the instructions I'm giving also fit for that edition would be nice.


I've also stated in the guide that you do not need the old '07 or so DirectX SDK anymore in order to get music, could somebody confirm that as well? I mean, I did a compile without the library installed and with the WIN32_ENABLE_DIRECTMUSIC definition removed and it did play music ingame, but who knows.. just want to make sure 8)
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage

Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: [Feedback needed] MSVC 2010 guide

Post by Terkhen »

The only difference I can remember between MSVC 2008 and 2010 is setting up the include and lib directories. In your tutorial, this is solved by editing the OpenTTD project. IMO this is not the best solution, as it will only affect that project. If you clone your repository or compile OpenTTD from a different source, you will need to repeat that step.

To set these folders permanently, you need to open a project (any project will do) and select the property manager label in the lowermost part of the solution explorer. Once that you are there, you need to edit the VC++ Directories in Microsoft.Cpp.Win32.user and Microsoft.Cpp.x64.user. Once you do this you will not need to set them up again.

My MSVC 2010 is on spanish, so I don't know if these are the right names. Check the screenshot to see where they are placed:
pantallazo.png
pantallazo.png (28.31 KiB) Viewed 1772 times
EDIT: I also have a commercial edition of MSVC (thanks to Dreamspark) so I cannot help you with the express edition question.

Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 594
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: [Feedback needed] MSVC 2010 guide

Post by Michi_cc »

The library/include directories should be set differently. (I only have a german 2010 here, so I'm typing my own translations here, hopefully it isn't too far off.)

Switch the left pane from "project explorer" to "property manager" (tabs on the bottom). Expand openttd then Debug | Win32 and Debug | x64. Right-click on Microsoft.Cpp.[Win32|x64].user -> properties and then the add the directories like in the wiki description. This way the directories are valid for all project files and not just this specific project file.

And OpenTTD always had the Win32 music driver additionally to the DirectMusic one, but the DirectMusic one usually works better.

EDIT: Damn, too slow :)

-- Michael Lutz

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4554
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [Feedback needed] MSVC 2010 guide

Post by Zuu »

I think it would make much more sense to recommend people to setup the lib/include path for OpenTTD Useful globally than for each OpenTTD project. If you store the OpenTTD Useful package in a directory without the version in the name, you don't even have to alter the MSVC options when updating the OpenTTD Useful package (with the exception of whenever you need to keep an old version due to broken backward compatibly, but this has only happened once for me).

Though, I think this comment is not really specific towards the 2010 guide as I suppose also the older guides recommend setting up OpenTTD useful per OpenTTD project.

Edit: Note, I'm a 2008 user, so if the global lib/include options have been moved form the "MSVC Options" dialog to somewhere else, don't read "MSVC options" above too strict.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: [Feedback needed] MSVC 2010 guide

Post by pavel1269 »

I am 2010 user as well. The only difference I remember there was with those paths. I think, 2010 have no global alterable paths, so you have to apply them to solution. But changing this in solution wasn't easy and I do not remember exact steps now and I am unable to reproduce them at the moment. But, just to let you know.

Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: [Feedback needed] MSVC 2010 guide

Post by Roujin »

Thanks for your feedback so far, I'm going to amend the guide as soon as I find time for it :)
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage

User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [Feedback needed] MSVC 2010 guide

Post by adf88 »

My suggestion is to merge guides for all MSVC versions into one article. There are some differences in details but the general concept is the same. There is no need for separation.
:] don't worry, be happy and checkout my patches

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 19 guests