You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: SourceCode/Builds/build_with_msvc6.md
+62-49Lines changed: 62 additions & 49 deletions
Original file line number
Diff line number
Diff line change
@@ -1,81 +1,92 @@
1
-
# Compile Command & Conquer Zero Hour with VC6
1
+
# Compile Command & Conquer Generals And Zero Hour with VC6
2
2
3
-
To compile the source code for **C&C Generals** and **Zero Hour**, follow the steps
4
-
outlined below. This process is still in the early stages of development, and ongoing
5
-
efforts may lead to additional tools being compiled from the source code. The focus
6
-
here is solely on compiling the main executable, which can then be placed into the
7
-
game directory and used to start the game with the newly compiled binary.
8
-
9
-
This process utilizes the original compiler from the game's development era to ensure
10
-
compatibility. The available source code specifically compiles **zerohour.exe**.
3
+
This guide shows how to compile the source code for **Command & Conquer: Generals** and **Zero Hour**. To compile
4
+
the source code, follow the steps outlined below. This process is still in the early stages of development, and
5
+
ongoing efforts may lead to additional tools being compiled from the source code. The focus here is solely on
6
+
compiling the main executable, which can then be placed into the game directory and used to start the game with
7
+
the newly compiled binary. This process utilizes the original compiler from the game's development era to ensure
8
+
compatibility.
11
9
12
10
## Intended Audience
13
11
14
-
This guide is intended for software developers, starting from a beginner level. You
15
-
should be able to write programs and execute them. Familiarity with command-line
16
-
interfaces and configuring environment variables when necessary is required.
12
+
This guide is intended for software developers, starting from a beginner level. You should be able to
13
+
write programs and execute them. Familiarity with command-line interfaces and configuring environment
14
+
variables when necessary is required.
17
15
18
-
Even if you do not know C++, you should still be able to compile the source code.
19
-
However, a basic understanding of how C++ is compiled is necessary. This includes
20
-
knowing what the **compiler** and **linker** do, as well as being able to
21
-
interpret error messages and troubleshoot them effectively.
16
+
Even if you do not know C++, you should still be able to compile the source code. However, a basic
17
+
understanding of how C++ is compiled is necessary. This includes knowing what the **compiler** and
18
+
**linker** do, as well as being able to interpret error messages and troubleshoot them effectively.
22
19
23
20
## Prerequisites
24
21
25
-
Download the following binary and software and have them ready in a project folder.
22
+
Download the following binaries and software and have them ready in a project folder.
23
+
24
+
-[Visual Studio 6.0 Portable](https://github.com/itsmattkc/MSVC600)
25
+
-[CMake 3.31.6](https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6-windows-x86_64.msi) or [newer](https://cmake.org/download/#latest)
26
+
-[Git](https://git-scm.com/downloads)
26
27
27
-
- Visual Studio 6.0 Portable [Link](https://github.com/itsmattkc/MSVC600)
set INCLUDE=C:\<VS6_INSTALL_PATH>\VC98\ATL\Include;^
95
106
C:\<VS6_INSTALL_PATH>\VC98\Include;^
@@ -104,27 +115,29 @@ set MSVCDir=C:\<VS6_INSTALL_PATH>\VC98
104
115
105
116
### Build the project
106
117
107
-
Run the following command by the type of build you want to create.
118
+
Run the following command based on the type of build you want to create:
108
119
109
120
-`cmake --workflow --preset vc6` for a release build.
110
-
-`cmake --workflow --preset vc6dgb` for a debug build.
111
-
-`cmake --workflow --preset vc6int` for an internal build.
112
-
-`cmake --workflow --preset vc6prof` for a profile build.
121
+
-`cmake --workflow --preset vc6-debug` for a debug build.
122
+
-`cmake --workflow --preset vc6-internal` for an internal build.
123
+
-`cmake --workflow --preset vc6-profile` for a profile build.
113
124
114
125
You will find a bunch of files in `build\vc6\<game name>` and a file called `generalszh.exe` or `generalsv.exe`.
115
126
127
+
For detailed information about each build configuration and their specific purposes, see the [Build Configurations Overview](https://github.com/TheSuperHackers/GeneralsGameCode/wiki/build_configuration).
128
+
116
129
### Install the game executable
117
130
118
-
Run `cmake --install build\<vc6 build type>`, this will copy the executable to the retail game directory, or you can
119
-
copy it manually.
131
+
Run ```cmake --install build\<vc6 build type>```, this will copy the executable to the retail game directory,
132
+
or you can copy it manually.
120
133
121
134
## Troubleshooting
122
135
123
136
### Error: "too long"
124
137
125
-
- The compiler failed because the total path length for **lib** and **include** exceeded the limit for **VS6**.
126
-
- Your only option is to move your project and dependencies **closer to the root of your drive** or rename
127
-
folders in your project to shorter names.
138
+
- The compiler failed because the total path length for **lib** and **include** exceeded the limit for **VS6**.
139
+
- Your only option is to move your project and dependencies **closer to the root of your drive** or
0 commit comments