HOWTO: Compile OpenTTD *without* DirectX SDK
Moderator: OpenTTD Developers
HOWTO: Compile OpenTTD *without* DirectX SDK
Hello,
It's possible to compile OpenTTD without the DirectX SDK installed. The DirectX SDK is only used for game music, so you won't have that after compiling.
Step 1:
Install & configure Visual Studio 2008 express as usual (http://wiki.openttd.org/Microsoft_Visua ... s_Editions).
Skip everything related to the Direct X SDK!
Step 2:
Instruct the preprocessor to not include the code for Win32 music:
Remove WIN32_ENABLE_DIRECTMUSIC_SUPPORT from the preprocessor settings under project properties:
Step 3:
Remove the dxguid.lib from the additional input dependencies for the linker:
Step 4:
Compile as normal in Visual Studio.
Step 5:
Put the original gamefiles (http://wiki.openttd.org/Installation#Files_from_TTD) in bin\data e.g. c:\games\ottdsrc\0.7.5\bin\data.
Step 6:
Run/Debug the game!
EDIT: Fix typo (dxguid.lib)
It's possible to compile OpenTTD without the DirectX SDK installed. The DirectX SDK is only used for game music, so you won't have that after compiling.
Step 1:
Install & configure Visual Studio 2008 express as usual (http://wiki.openttd.org/Microsoft_Visua ... s_Editions).
Skip everything related to the Direct X SDK!
Step 2:
Instruct the preprocessor to not include the code for Win32 music:
Remove WIN32_ENABLE_DIRECTMUSIC_SUPPORT from the preprocessor settings under project properties:
Step 3:
Remove the dxguid.lib from the additional input dependencies for the linker:
Step 4:
Compile as normal in Visual Studio.
Step 5:
Put the original gamefiles (http://wiki.openttd.org/Installation#Files_from_TTD) in bin\data e.g. c:\games\ottdsrc\0.7.5\bin\data.
Step 6:
Run/Debug the game!
EDIT: Fix typo (dxguid.lib)
Last edited by Valentijn on 24 Jan 2010 16:23, edited 1 time in total.
Re: HOWTO: Compile OpenTTD *without* DirectX SDK
Instead of step 5 you can also put the needed files in My Documents/OpenTTD/data/, that way they're shared by all your openttd installations and you don't have to copy them to every new installation.
Re: HOWTO: Compile OpenTTD *without* DirectX SDK
Perhaps you could add those pictures/instructions to this wiki page: http://wiki.openttd.org/MSVC#Microsoft. ... irectX_SDK
Re: HOWTO: Compile OpenTTD *without* DirectX SDK
thanks, but look closely under the Direct X there is a 'Alternative' section.
where presented mostly the same steps (only there its 'dxguid.lib' and not 'dxguid.dll')
and those pictures are a great help for those who never seen it before
its will be nice if you can update\expand that wiki section, if necessary.
where presented mostly the same steps (only there its 'dxguid.lib' and not 'dxguid.dll')
and those pictures are a great help for those who never seen it before
its will be nice if you can update\expand that wiki section, if necessary.
Re: HOWTO: Compile OpenTTD *without* DirectX SDK
is direct SDX actually nessessary anymore due to the Music Sets being available, or am i just being stupid 

AroAI - A really feeble attempt at an AI
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Re: HOWTO: Compile OpenTTD *without* DirectX SDK
You could look at it that way, but the MRP isn't complete yet anyway.
Re: HOWTO: Compile OpenTTD *without* DirectX SDK
Sorry, but didn't the music replacement guys decide they would go for the same format as the TTD (for Windows) music? Wouldn't that imply that the same mechanism for playing them would be used?
Re: HOWTO: Compile OpenTTD *without* DirectX SDK
doesn't SDL offert music support and sound too ?
ottd on linux can play music and sound... without directx, no?
I use SDL_mixer on one (little) projet, that allow playing all kind of music format (mp3,mid...) and sound (wav)
is SDL_mixer too limited for ottd or maybe ottd will use something similar in the future ? or not ? (it's just a question for myself, not a suggestion or whatever, I know devs may have many other things to deals with yet)
ottd on linux can play music and sound... without directx, no?
I use SDL_mixer on one (little) projet, that allow playing all kind of music format (mp3,mid...) and sound (wav)
is SDL_mixer too limited for ottd or maybe ottd will use something similar in the future ? or not ? (it's just a question for myself, not a suggestion or whatever, I know devs may have many other things to deals with yet)
Re: HOWTO: Compile OpenTTD *without* DirectX SDK
SDL_mixer requires Timidity to play MIDI, OpenTTD's extmidi uses Timidity to play MIDI directly, but can also use aplaymidi and other MIDI playing applications. As such SDL_mixer is totally unneeded for OpenTTD.
DirectX is a Windows native API to play MIDI, why wouldn't we use it? Especially because installing Timidity and SDL on Windows might be cumbersome and you almost certainly have DirectX installed.
DirectX is a Windows native API to play MIDI, why wouldn't we use it? Especially because installing Timidity and SDL on Windows might be cumbersome and you almost certainly have DirectX installed.
Re: HOWTO: Compile OpenTTD *without* DirectX SDK
Thanks, didn't see that. I corrected the typo as well.neob wrote:thanks, but look closely under the Direct X there is a 'Alternative' section.
where presented mostly the same steps (only there its 'dxguid.lib' and not 'dxguid.dll')
Re: HOWTO: Compile OpenTTD *without* DirectX SDK
Done.petert wrote:Perhaps you could add those pictures/instructions to this wiki page: http://wiki.openttd.org/MSVC#Microsoft. ... irectX_SDK
Re: HOWTO: Compile OpenTTD *without* DirectX SDK
Thanks, those look great!
Who is online
Users browsing this forum: No registered users and 20 guests