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