Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sat May 25, 2013 1:10 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Wed Apr 27, 2011 6:45 pm 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
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


Top
 Profile  
 
PostPosted: Wed Apr 27, 2011 7:00 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Sep 11, 2008 7:32 am
Posts: 1028
Location: Spain
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:

Attachment:
pantallazo.png
pantallazo.png [ 28.31 KiB | Viewed 845 times ]


EDIT: I also have a commercial edition of MSVC (thanks to Dreamspark) so I cannot help you with the express edition question.

_________________
Spanish translation of OpenTTD
Extended heightmaps

Have fun, don't quarrel too much and add as many advanced settings as you can.


Top
 Profile  
 
PostPosted: Wed Apr 27, 2011 7:02 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Mon Jun 14, 2004 11:27 pm
Posts: 566
Location: Hannover, Germany
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


Top
 Profile  
 
PostPosted: Wed Apr 27, 2011 9:58 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 3988
Location: /home/sweden
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)


Top
 Profile  
 
PostPosted: Wed Apr 27, 2011 10:09 pm 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Dec 03, 2006 1:22 pm
Posts: 433
Location: Czech Republic
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.

_________________
Sorry for my very bad English.

My patches: Speed limits for RVs, Day length (new concept) (old), Better statue placement, Conditional loading
Patch I like: Close airport


Top
 Profile  
 
PostPosted: Wed Apr 27, 2011 11:47 pm 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
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


Top
 Profile  
 
PostPosted: Fri Apr 29, 2011 6:34 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Mon Jan 14, 2008 3:51 pm
Posts: 259
Location: PL
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: Psistorm and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000-2013 phpBB Group

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2013.
Hosted by Zernebok Hosting.