Skip to content

Commit e693a01

Browse files
authored
Updated the guide to fix spelling and grammar errors, (#53)
added a warning, updated outdated build preset names, and added a description, improved header, and extra information in a few places.
1 parent 0e82724 commit e693a01

File tree

2 files changed

+52
-34
lines changed

2 files changed

+52
-34
lines changed
Lines changed: 52 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,87 @@
1-
# Building in CLion with a VC6 \(x86\) Toolchain
1+
# Compile Command & Conquer Generals And Zero Hour with VC6 in CLion
2+
3+
This guide shows how to configure CLion to work with the Visual Studio 6.0 toolchain, maintaining
4+
compatibility with the original compiler from the game's development era. To compile the source code for
5+
**Command & Conquer: Generals** and **Zero Hour** using the CLion IDE, follow the steps outlined below.
26

37
## Prerequisites
48

5-
1. **CLion** installed and configured.
6-
2. **Microsoft Visual C++ 6.0 (VC6)** installed (assuming it’s installed in the
7-
default directory).
8-
3. **Source code** of the project cloned from the TheSuperHackers repository.
9+
- [Visual Studio 6.0 Portable](https://github.com/itsmattkc/MSVC600)
10+
- [CLion](https://www.jetbrains.com/clion/)
11+
- [Source Code](https://github.com/TheSuperHackers/GeneralsGameCode) of the project cloned from the TheSuperHackers repository
12+
13+
> For simplicity, this guide assumes the user will be using the
14+
> default install folder for Visual Studio 6.0 Portable: `C:\Program Files (x86)\Microsoft Visual Studio\`
915
1016
## Step 1: Setting Up the Toolchain in CLion
1117

12-
1. Open the cloned folder in **CLion** and go to **File** -> **Settings** -> **Build, Execution,
13-
Deployment** -> **Toolchains**.
18+
1. Open the cloned folder in **CLion** and go to **File** **Settings** **Build, Execution,
19+
Deployment** **Toolchains**.
1420
2. Add a new **Toolchain** by clicking the **+** button.
15-
3. Select **System** as the Type (not Visual Studio).
16-
4. Rename the toolchain to **Visual Studio 6**
21+
3. Select **System** as the type (not Visual Studio).
22+
4. Rename the toolchain to **Visual Studio 6**.
1723
5. Next to the toolchain name, add the **environment** file by clicking the
1824
**+** button and pointing to the following file:
1925

2026
```text
2127
C:\Program Files (x86)\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT
2228
```
2329

30+
> **Warning**: Make sure to change the file extension from `.BAT` to `.bat` (lowercase) in the path to the
31+
> environment file in the CLion toolchains window, otherwise CLion may have issues detecting the environment
32+
> for some reason.
33+
2434
6. Set the paths for the tools:
25-
- **Build Tool**: Choose the `NMAKE.EXE` file from VC6. For example:
35+
- **Build Tool**: Choose the `NMAKE.EXE` file from VC6. For example:
2636

27-
```text
28-
C:/Program Files (x86)/Microsoft Visual Studio/VC98/Bin/NMAKE.EXE
29-
```
37+
```text
38+
C:\Program Files (x86)\Microsoft Visual Studio\VC98\Bin\NMAKE.EXE
39+
```
3040
31-
- **C Compiler**: The `cl.exe` should be detected automatically. If not, set
32-
it manually to:
41+
- **C Compiler**: The `cl.exe` should be detected automatically. If not, set
42+
it manually to:
3343
34-
```text
35-
C:/Program Files (x86)/Microsoft Visual Studio/VC98/Bin/cl.exe
36-
```
44+
```text
45+
C:\Program Files (x86)\Microsoft Visual Studio\VC98\Bin\cl.exe
46+
```
3747
38-
- **C++ Compiler**: The `cl.exe` will also be detected automatically.
48+
- **C++ Compiler**: The `cl.exe` will also be detected automatically.
3949
40-
## Step 2: Configuring the CMake Profile
50+
![CLion VC6 Toolchain Configuration](https://github.com/TheSuperHackers/GeneralsWiki/raw/refs/heads/main/SourceCode/Builds/files/clionvc6toolchain.png)
4151
42-
1. In Cmake profiles, enable the profiles you want to use, like vc6, vc6dgb, vc6int, vc6prof.
52+
## Step 2: Configuring the CMake Profiles
4353
44-
## step 3: Configuring the installation path
54+
1. In the CMake profiles, enable the profiles you want to use. The available workflow presets are:
55+
- `vc6` - Release build
56+
- `vc6-debug` - Debug build
57+
- `vc6-internal` - Internal build
58+
- `vc6-profile` - Profile build
59+
60+
For detailed information about each build configuration and their specific purposes, see the [Build Configurations Overview](https://github.com/TheSuperHackers/GeneralsGameCode/wiki/build_configuration).
61+
62+
## Step 3: Configuring the Installation Path
4563
4664
1. In the target application options, do the following:
4765
48-
- Set Program arguments with your favorite arguments,like `-win, -quickstart, -nologo`.
49-
- Set Working directory to the game directory.
50-
- Check the run as administrator option.
51-
- In 'Before launch' section, add a new 'install' step.
52-
- To avoid duplication build, remove the 'Build' step.
53-
- Save the configuration, and you are ready to build and run the project.
66+
- Set **Program arguments** with your preferred command line arguments, such as `-win`, `-quickstart`, etc.
67+
- Set **Working directory** to the game directory.
68+
- Check the **Run as administrator** option.
69+
- In the **Before launch** section, add a new **install** step.
70+
- To avoid duplicate builds, remove the **Build** step.
71+
- Save the configuration, and you are ready to build and run the project.
5472
5573
## Step 4: Compiling and Running the Project
5674
57-
1. Now, click the **Build** button in CLion, or click **Install** in build menu.
75+
1. Now, click the **Build** button in CLion, or click **Install** in the build menu.
5876
2. CLion will start the build/install process using the VC6 (x86) toolchain.
59-
3. Once the build is successfully completed, a executable file will be generated (and installed in the game directory).
60-
61-
---
77+
3. Once the build is successfully completed, an executable file will be generated and installed in the
78+
game directory.
6279
6380
## Notes
6481
65-
- Working with VC6 requires some adjustments, so it’s always a good idea to check
82+
- Working with VC6 requires some adjustments, so it’s a good idea to verify
6683
that the toolchain is working properly.
6784
- You can add Release and Debug profiles in CLion to build the project in
6885
different configurations.
69-
- Admin rights might be required to run VC6 tools, so make sure to run CLion as an administrator if needed.
86+
- Administrator rights may be required to run VC6 tools, so run CLion as an administrator if
87+
needed.
332 KB
Loading

0 commit comments

Comments
 (0)