|
1 Compiling OpenTTD using Microsoft Visual C++ 6.0 |
|
2 |
|
3 |
|
4 Step 1: Ingredients |
|
5 |
|
6 Download the following files: |
|
7 |
|
8 * Openttd-useful.zip (http://sourceforge.net/project/showfiles.php?group_id=103924&package_id=114307&release_id=228633) |
|
9 * DirectX 8.1 SDK (http://neuron.tuke.sk/~mizanin/eng/Dx81sdk-include-lib.rar) (or alternatively the latest DirectX SDK from Microsoft) |
|
10 * The February 2003 Microsoft Platform SDK (http://www.microsoft.com/msdownload/platformsdk/sdkupdate/XPSP2FULLInstall.htm) (newer SDK's do not work with MSVC6) |
|
11 * afxres.h (http://www-d0.fnal.gov/d0dist/dist/packages/d0ve/devel/windows/AFXRES.H) (maybe you not need this) |
|
12 |
|
13 ...and of course the newest source from svn://svn.openttd.org/trunk |
|
14 |
|
15 You have to have a SVN-client to download the source: |
|
16 |
|
17 * Command line version (Subversion 1.2.3 Win32 binaries) (http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91) |
|
18 * GUI TortoiseSVN (http://tortoisesvn.tigris.org/download.html) |
|
19 |
|
20 Step 2: Includes and Libraries |
|
21 |
|
22 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) |
|
23 |
|
24 |
|
25 * zconf.h [useful.zip] |
|
26 * zlib.h [useful.zip] |
|
27 * png.h [useful.zip] |
|
28 * pngconf.h [useful.zip] |
|
29 * afxres.h |
|
30 |
|
31 in |
|
32 |
|
33 C:\Program Files\Microsoft Visual Studio\VC98\Include |
|
34 |
|
35 and |
|
36 |
|
37 * zlibstat.lib [useful.zip] |
|
38 * libpng.lib [useful.zip] |
|
39 |
|
40 in |
|
41 |
|
42 C:\Program Files\Microsoft Visual Studio\VC98\Lib |
|
43 |
|
44 |
|
45 Step 3: DirectX SDK |
|
46 |
|
47 (This should work with the latest DirectX SDK as well.) |
|
48 |
|
49 There are 2 folder in the compressed file: Include and Lib |
|
50 |
|
51 Copy all files from Include folder to |
|
52 |
|
53 C:\Program Files\Microsoft Visual Studio\VC98\Include |
|
54 |
|
55 and all files from Lib folder to |
|
56 |
|
57 C:\Program Files\Microsoft Visual Studio\VC98\Lib |
|
58 |
|
59 |
|
60 |
|
61 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: |
|
62 |
|
63 Tools -> Options -> Directories -> show directories for: |
|
64 |
|
65 a) include files (the include dir: C:\Program Files\Microsoft Visual Studio\VC98\DirectX 8.1 SDK\include ) |
|
66 |
|
67 b) library files (the lib dir, C:\Program Files\Microsoft Visual Studio\VC98\DirectX 8.1 SDK\lib ) |
|
68 |
|
69 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!! |
|
70 |
|
71 Step 4: TTD Graphics files |
|
72 |
|
73 Copy the following files from Transport Tycoon Deluxe to the data folder |
|
74 |
|
75 * sample.cat |
|
76 * trg1r.grf |
|
77 * trgcr.grf |
|
78 * trghr.grf |
|
79 * trgir.grf |
|
80 * trgtr.grf |
|
81 |
|
82 |
|
83 Step 5: Compiling |
|
84 |
|
85 Open trunk/openttd.dsw |
|
86 |
|
87 Build menu > Set active configuration > Select: "openttd - Win32 Release" |
|
88 |
|
89 Compile... |
|
90 |
|
91 |
|
92 Now it should work, it worked for me :) |
|
93 |
|
94 From r1319 you can compile branch/map in Debug mode (by Bociusz) |
|
95 |
|
96 For compiling branch/cargo-packets you have to add cargo.c and .h to this tree's openttd.dsp |
|
97 |
|
98 If it's not working, and you checked that you using the newest SVN (!) report to Bociusz on IRC (irc://irc.freenode.net/openttd) |
|
99 |
|
100 Go ahead and make that patch! Happy Hacking! :) |
|
101 |
|
102 Originally written by Dribbel |
|
103 |
|
104 Project file updating by Bociusz |