2005-01-08 12:03:21 +00:00
Compiling OpenTTD using Microsoft Visual C++ 6.0
2005-01-02 21:52:21 +00:00
2005-12-18 20:48:22 +00:00
Step 1: Ingredients
2005-01-02 21:52:21 +00:00
2005-01-08 12:03:21 +00:00
Download the following files:
2005-01-02 21:52:21 +00:00
2005-12-18 20:48:22 +00:00
* Openttd-useful.zip (http://sourceforge.net/project/showfiles.php?group_id=103924&package_id=114307&release_id=228633)
* DirectX 8.1 SDK (http://neuron.tuke.sk/~mizanin/eng/Dx81sdk-include-lib.rar) (or alternatively the latest DirectX SDK from Microsoft)
* The February 2003 Microsoft Platform SDK (http://www.microsoft.com/msdownload/platformsdk/sdkupdate/XPSP2FULLInstall.htm) (newer SDK's do not work with MSVC6)
* afxres.h (http://www-d0.fnal.gov/d0dist/dist/packages/d0ve/devel/windows/AFXRES.H) (maybe you not need this)
2005-01-02 21:52:21 +00:00
2005-12-18 20:48:22 +00:00
...and of course the newest source from svn://svn.openttd.org/trunk
2005-01-08 12:03:21 +00:00
2005-12-18 20:48:22 +00:00
You have to have a SVN-client to download the source:
2005-01-08 12:03:21 +00:00
2005-12-18 20:48:22 +00:00
* Command line version (Subversion 1.2.3 Win32 binaries) (http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91)
* GUI TortoiseSVN (http://tortoisesvn.tigris.org/download.html)
2005-01-08 12:03:21 +00:00
2005-12-18 20:48:22 +00:00
Step 2: Includes and Libraries
2005-01-08 12:03:21 +00:00
2005-12-18 20:48:22 +00:00
Put the newly downloaded files in the VC lib and include directories (Where "C:\Program Files\Microsoft Visual Studio\VC98" is your local location of VC)
2005-01-08 12:03:21 +00:00
* zconf.h [useful.zip]
* zlib.h [useful.zip]
* png.h [useful.zip]
* pngconf.h [useful.zip]
2005-12-18 20:48:22 +00:00
* afxres.h
2005-01-02 21:52:21 +00:00
in
2005-12-18 20:48:22 +00:00
C:\Program Files\Microsoft Visual Studio\VC98\Include
2005-01-08 12:03:21 +00:00
and
* zlibstat.lib [useful.zip]
2005-12-18 20:48:22 +00:00
* libpng.lib [useful.zip]
2005-01-08 12:03:21 +00:00
2005-01-02 21:52:21 +00:00
in
2005-12-18 20:48:22 +00:00
C:\Program Files\Microsoft Visual Studio\VC98\Lib
2005-01-08 12:03:21 +00:00
2005-12-18 20:48:22 +00:00
Step 3: DirectX SDK
2005-01-02 21:52:21 +00:00
2005-12-18 20:48:22 +00:00
(This should work with the latest DirectX SDK as well.)
2005-01-02 21:52:21 +00:00
2005-01-08 12:03:21 +00:00
There are 2 folder in the compressed file: Include and Lib
2005-01-02 21:52:21 +00:00
2005-01-08 12:03:21 +00:00
Copy all files from Include folder to
2005-01-02 21:52:21 +00:00
2005-01-08 12:03:21 +00:00
C:\Program Files\Microsoft Visual Studio\VC98\Include
2005-01-02 21:52:21 +00:00
2005-01-08 12:03:21 +00:00
and all files from Lib folder to
2005-01-02 21:52:21 +00:00
2005-01-08 12:03:21 +00:00
C:\Program Files\Microsoft Visual Studio\VC98\Lib
2005-12-18 20:48:22 +00:00
You can also make custom directories, which is recommended so you don't overwrite VS6 files, for libraries (.lib) and includes/header files (.h) and add it to the VC paths via:
2005-01-08 12:03:21 +00:00
Tools -> Options -> Directories -> show directories for:
2005-12-18 20:48:22 +00:00
a) include files (the include dir: C:\Program Files\Microsoft Visual Studio\VC98\DirectX 8.1 SDK\include )
2005-01-08 12:03:21 +00:00
2005-12-18 20:48:22 +00:00
b) library files (the lib dir, C:\Program Files\Microsoft Visual Studio\VC98\DirectX 8.1 SDK\lib )
2005-01-08 12:03:21 +00:00
2005-12-18 20:48:22 +00:00
NOTE: make sure that the directory for the DirectX SDK is the first one in the list, above all others, otherwise compilation will most likely fail!!
2005-01-08 12:03:21 +00:00
2005-12-18 20:48:22 +00:00
Step 4: TTD Graphics files
2005-01-02 21:52:21 +00:00
Copy the following files from Transport Tycoon Deluxe to the data folder
2005-01-08 12:03:21 +00:00
* sample.cat
* trg1r.grf
* trgcr.grf
* trghr.grf
* trgir.grf
2005-12-18 20:48:22 +00:00
* trgtr.grf
2005-01-02 21:52:21 +00:00
2005-12-18 20:48:22 +00:00
Step 5: Compiling
2005-01-02 21:52:21 +00:00
2005-12-18 20:48:22 +00:00
Open trunk/openttd.dsw
2005-01-02 21:52:21 +00:00
2005-12-18 20:48:22 +00:00
Build menu > Set active configuration > Select: "openttd - Win32 Release"
2005-01-02 21:52:21 +00:00
2005-01-08 12:03:21 +00:00
Compile...
Now it should work, it worked for me :)
2005-01-02 21:52:21 +00:00
2005-01-08 12:03:21 +00:00
From r1319 you can compile branch/map in Debug mode (by Bociusz)
2005-01-02 21:52:21 +00:00
2005-12-18 20:48:22 +00:00
For compiling branch/cargo-packets you have to add cargo.c and .h to this tree's openttd.dsp
If it's not working, and you checked that you using the newest SVN (!) report to Bociusz on IRC (irc://irc.freenode.net/openttd)
2005-01-02 21:52:21 +00:00
2005-01-08 12:03:21 +00:00
Go ahead and make that patch! Happy Hacking! :)
2005-01-02 21:52:21 +00:00
2005-01-08 12:03:21 +00:00
Originally written by Dribbel
2005-01-02 21:52:21 +00:00
2005-12-18 20:48:22 +00:00
Project file updating by Bociusz