Skip to content

Commit cbc3d70

Browse files
authored
Updated build_with_msvc6 and build_with_clion_vc6_toolchain guides. Added a notice about debug builds. Streamlined parts of build_with_msvc6 and added Ninja as a requirement. (#59)
Co-authored-by: Jaredl-Code <217964373+Jaredl-LV@users.noreply.github.com>
1 parent e0e7b75 commit cbc3d70

File tree

6 files changed

+119
-28
lines changed

6 files changed

+119
-28
lines changed

SourceCode/Builds/build_configuration.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ There are four main build configurations in the project, each designed for diffe
4141

4242
- **Use Case:** Used during development for debugging and resolving issues in the code.
4343

44+
> **⚠️ Debug Build Requirements:** To run a debug build of the game, you need to have
45+
> the following two files in the game directory alongside the built executable:
46+
>
47+
> - [`MSVCRTD.DLL`](https://github.com/TheSuperHackers/GeneralsWiki/raw/refs/heads/main/SourceCode/Builds/files/MSVCRTD.DLL)
48+
> Microsoft Visual C++ Runtime Library (Debug)
49+
> - [`MSVCIRTD.DLL`](https://github.com/TheSuperHackers/GeneralsWiki/raw/refs/heads/main/SourceCode/Builds/files/MSVCIRTD.DLL)
50+
> Microsoft Visual C++ Internationalization Runtime Library (Debug)
51+
4452
### 3. **Profile (O2, IG_DEBUG_STACKTRACE, _RELEASE, _PROFILE)**
4553

4654
- **Purpose:** The profile configuration is used for performance profiling and optimization. It is designed to help

SourceCode/Builds/build_guides.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ Each configuration is designed for a different purpose, whether you're building
1919
releasing the final product. You can find more details about the build configurations in
2020
the [Build Configurations](build_configuration) page.
2121

22+
> **⚠️ Debug Build Requirements:** To run a debug build of the game, you need to have
23+
> the following two files in the game directory alongside the built executable:
24+
>
25+
> - [`MSVCRTD.DLL`](https://github.com/TheSuperHackers/GeneralsWiki/raw/refs/heads/main/SourceCode/Builds/files/MSVCRTD.DLL)
26+
> Microsoft Visual C++ Runtime Library (Debug)
27+
> - [`MSVCIRTD.DLL`](https://github.com/TheSuperHackers/GeneralsWiki/raw/refs/heads/main/SourceCode/Builds/files/MSVCIRTD.DLL)
28+
> Microsoft Visual C++ Internationalization Runtime Library (Debug)
29+
2230
## Architectures and Toolchains
2331

2432
The project supports multiple architectures and toolchains, which is why there are various build guides tailored to

SourceCode/Builds/build_with_clion_vc6_toolchain.md

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,28 @@ compatibility with the original compiler from the game's development era. To com
77
## Prerequisites
88

99
- [Visual Studio 6.0 Portable](https://github.com/itsmattkc/MSVC600)
10+
> See the [Visual Studio 6.0 Portable installation instructions](build_with_msvc6.md#visual-studio-60-portable)
11+
> for setup details.
1012
- [CLion](https://www.jetbrains.com/clion/)
11-
- [Source Code](https://github.com/TheSuperHackers/GeneralsGameCode) of the project cloned from the TheSuperHackers repository
1213

1314
> For simplicity, this guide assumes the user will be using the
1415
> default install folder for Visual Studio 6.0 Portable: `C:\Program Files (x86)\Microsoft Visual Studio\`
1516
16-
## Step 1: Setting Up the Toolchain in CLion
17+
## Step 1: Clone and Open the Project
1718

18-
1. Open the cloned folder in **CLion** and go to **File****Settings****Build, Execution,
19+
1. Clone the source code from TheSuperHackers:
20+
21+
```shell
22+
git clone https://github.com/TheSuperHackers/GeneralsGameCode.git
23+
```
24+
25+
> Alternatively, you can clone the repository directly from within CLion.
26+
27+
2. Open the cloned folder in **CLion**.
28+
29+
## Step 2: Setting Up the Toolchain in CLion
30+
31+
1. In CLion, go to **File****Settings****Build, Execution,
1932
Deployment****Toolchains**.
2033
2. Add a new **Toolchain** by clicking the **+** button.
2134
3. Select **System** as the type (not Visual Studio).
@@ -49,7 +62,7 @@ compatibility with the original compiler from the game's development era. To com
4962
5063
![CLion VC6 Toolchain Configuration](https://github.com/TheSuperHackers/GeneralsWiki/raw/refs/heads/main/SourceCode/Builds/files/clionvc6toolchain.png)
5164
52-
## Step 2: Configuring the CMake Profiles
65+
## Step 3: Configuring the CMake Profiles
5366
5467
1. In the CMake profiles, enable the profiles you want to use. The available workflow presets are:
5568
- `vc6` - Release build
@@ -58,7 +71,7 @@ compatibility with the original compiler from the game's development era. To com
5871
5972
For detailed information about each build configuration and their specific purposes, see the [Build Configurations Overview](https://github.com/TheSuperHackers/GeneralsGameCode/wiki/build_configuration).
6073
61-
## Step 3: Configuring the Installation Path
74+
## Step 4: Configuring the Installation Path
6275
6376
1. In the target application options, do the following:
6477
@@ -69,13 +82,23 @@ compatibility with the original compiler from the game's development era. To com
6982
- To avoid duplicate builds, remove the **Build** step.
7083
- Save the configuration, and you are ready to build and run the project.
7184
72-
## Step 4: Compiling and Running the Project
85+
## Step 5: Compiling and Running the Project
7386
7487
1. Now, click the **Build** button in CLion, or click **Install** in the build menu.
7588
2. CLion will start the build/install process using the VC6 (x86) toolchain.
7689
3. Once the build is successfully completed, an executable file will be generated and installed in the
7790
game directory.
7891
92+
## Running Debug Builds
93+
94+
> **⚠️ Debug Build Requirements:** To run a debug build of the game, you need to have
95+
> the following two files in the game directory alongside the built executable:
96+
>
97+
> - [`MSVCRTD.DLL`](https://github.com/TheSuperHackers/GeneralsWiki/raw/refs/heads/main/SourceCode/Builds/files/MSVCRTD.DLL)
98+
> Microsoft Visual C++ Runtime Library (Debug)
99+
> - [`MSVCIRTD.DLL`](https://github.com/TheSuperHackers/GeneralsWiki/raw/refs/heads/main/SourceCode/Builds/files/MSVCIRTD.DLL)
100+
> Microsoft Visual C++ Internationalization Runtime Library (Debug)
101+
79102
## Notes
80103
81104
- Working with VC6 requires some adjustments, so it’s a good idea to verify

SourceCode/Builds/build_with_msvc6.md

Lines changed: 74 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,37 +17,60 @@ Even if you do not know C++, you should still be able to compile the source code
1717
understanding of how C++ is compiled is necessary. This includes knowing what the **compiler** and
1818
**linker** do, as well as being able to interpret error messages and troubleshoot them effectively.
1919

20-
## Prerequisites
20+
## Prerequisites and setting up the build environment
2121

22-
Download the following binaries and software and have them ready in a project folder.
22+
Download and install the following tools and software needed for compilation.
2323

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)
27-
28-
> For simplicity, this guide will use the installers for Git and CMake and assumes the user will use the
24+
> **ℹ️ Setup Note:** For simplicity, this guide will use the installers for Git and CMake and assumes the user will use the
2925
default install folder for Visual Studio 6.0 Portable.
3026

31-
## Installing your build environment
27+
### Visual Studio 6.0 Portable
28+
29+
**Download:** [Visual Studio 6.0 Portable](https://github.com/itsmattkc/MSVC600)
3230

33-
Installation of tools and software that are needed for compilation.
31+
The original compiler used for game development.
3432

35-
### Install Visual Studio 6
33+
**Installation:**
3634

37-
- Download the portable Visual Studio 6 as a ZIP file from GitHub.
38-
- Extract the common and VC98 folders from the downloaded archive to the default install folder.
35+
- Download the portable Visual Studio 6 as a ZIP file from GitHub
36+
- Extract the `common` and `VC98` folders from the downloaded archive to the default install folder
3937
- Default installation folder: `C:\Program Files (x86)\Microsoft Visual Studio\`
4038

4139
> Alternatively, you can use the VC6 setup from Archive.org.
4240
43-
### Install CMake
41+
### Git
42+
43+
**Download:** [Git](https://git-scm.com/downloads)
44+
45+
Required for cloning the source code repository.
46+
47+
**Installation:**
48+
49+
- Run the Git installer
50+
51+
### CMake *(added to system path)*
52+
53+
**Download:** [CMake 3.31.6](https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6-windows-x86_64.msi)
54+
or [newer](https://cmake.org/download/#latest)
4455

45-
- Run the installer for CMake.
46-
- Enable the option to add CMake to the system path during the setup wizard.
56+
> **Note:** Not required if using IDEs like CLion or Visual Studio 2022, as these include built-in CMake support.
4757
48-
### Install Git
58+
**Installation:**
4959

50-
- Run the Git installer.
60+
- Run the installer for CMake
61+
- Enable the option to add CMake to the system path during the setup wizard
62+
63+
### Ninja *(added to system path)*
64+
65+
**Download:** [Ninja](https://ninja-build.org/)
66+
67+
> **Note:** Not required if using IDEs like CLion or Visual Studio 2022, as these include a bundled ninja binary.
68+
69+
**Installation:**
70+
71+
- Download the Ninja binary from the [Ninja releases page](https://ninja-build.org/)
72+
- Extract the `ninja.exe` file to a folder of your choice
73+
- Add the folder containing `ninja.exe` to your system's PATH environment variable
5174

5275
## Clone
5376

@@ -117,18 +140,47 @@ set MSVCDir=C:\<VS6_INSTALL_PATH>\VC98
117140

118141
Run the following command based on the type of build you want to create:
119142

120-
- `cmake --workflow --preset vc6` for a release build.
121-
- `cmake --workflow --preset vc6-debug` for a debug build.
122-
- `cmake --workflow --preset vc6-profile` for a profile build.
143+
- For a release build:
144+
145+
``` shell
146+
cmake --workflow --preset vc6
147+
```
148+
149+
- For a debug build:
150+
151+
``` shell
152+
cmake --workflow --preset vc6-debug
153+
```
154+
155+
- For a profile build:
156+
157+
``` shell
158+
cmake --workflow --preset vc6-profile
159+
```
123160

124161
You will find a bunch of files in `build\vc6\<game name>` and a file called `generalszh.exe` or `generalsv.exe`.
125162

126163
For detailed information about each build configuration and their specific purposes, see the [Build Configurations Overview](https://github.com/TheSuperHackers/GeneralsGameCode/wiki/build_configuration).
127164

128165
### Install the game executable
129166

130-
Run ```cmake --install build\<vc6 build type>```, this will copy the executable to the retail game directory,
131-
or you can copy it manually.
167+
Run the following command to copy the executable to the retail game directory:
168+
169+
``` shell
170+
cmake --install build\<vc6 build type>
171+
```
172+
173+
Alternatively, you can copy it manually.
174+
175+
### Running Debug Builds
176+
177+
> **⚠️ Debug Build Requirements:** To run a debug build of the game, you need to copy
178+
> the following two files into the game directory alongside the built executable:
179+
>
180+
> - [`MSVCRTD.DLL`](https://github.com/TheSuperHackers/GeneralsWiki/raw/refs/heads/main/SourceCode/Builds/files/MSVCRTD.DLL)
181+
> Microsoft Visual C++ Runtime Library (Debug)
182+
> - [`MSVCIRTD.DLL`](https://github.com/TheSuperHackers/GeneralsWiki/raw/refs/heads/main/SourceCode/Builds/files/MSVCIRTD.DLL)
183+
> Microsoft Visual C++ Internationalization Runtime Library (Debug)
132184
133185
## Troubleshooting
134186

SourceCode/Builds/files/MSVCIRTD.DLL

92.1 KB
Binary file not shown.

SourceCode/Builds/files/MSVCRTD.DLL

424 KB
Binary file not shown.

0 commit comments

Comments
 (0)