Skip to content

Commit a813d6a

Browse files
author
Jared Lung
authored
Refined CLion VC6 toolchain guide: clarify CMake profile setup and run/debug configurations (#61)
1 parent 70f6a3d commit a813d6a

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed

SourceCode/Builds/build_with_clion_vc6_toolchain.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ compatibility with the original compiler from the game's development era. To com
1111
> for setup details.
1212
- [CLion](https://www.jetbrains.com/clion/)
1313

14-
> For simplicity, this guide assumes the user will be using the
15-
> default install folder for Visual Studio 6.0 Portable: `C:\Program Files (x86)\Microsoft Visual Studio\`
14+
> This guide assumes the user uses the default installation
15+
> folder for Visual Studio 6.0 Portable: `C:\Program Files (x86)\Microsoft Visual Studio\`
1616
1717
## Step 1: Clone and Open the Project
1818

@@ -64,29 +64,42 @@ compatibility with the original compiler from the game's development era. To com
6464
6565
## Step 3: Configuring the CMake Profiles
6666
67-
1. In the CMake profiles, enable the profiles you want to use. The available workflow presets are:
68-
- `vc6` - Release build
69-
- `vc6-debug` - Debug build
70-
- `vc6-profile` - Profile build
67+
1. To configure the CMake profiles, proceed with the following steps:
68+
- Go to **File** → **Settings** → **Build, Execution, Deployment** → **CMake**.
69+
(should open automatically after opening the folder containing the cloned source code)
70+
- Disable the default `Debug` profile.
71+
- Enable `vc6` - Release build
72+
- Enable `vc6-debug` - Debug build
73+
- Enable `vc6-profile` - Profile build
7174
7275
For detailed information about each build configuration and their specific purposes, see the [Build Configurations Overview](https://github.com/TheSuperHackers/GeneralsGameCode/wiki/build_configuration).
7376
7477
## Step 4: Configuring the Installation Path
7578
76-
1. In the target application options, do the following:
79+
1. In the **Run/Debug Configurations** dropdown, select the target game: `z_generals` (Zero Hour) or `g_generals` (Generals).
80+
2. Open the same dropdown, then for the target game you just selected, click the 3 dots on the right, then **Edit...**
81+
82+
> **Note:** This step must be repeated for both `z_generals` and `g_generals` targets.
7783
7884
- Set **Program arguments** with your preferred command line arguments, such as `-win`, `-quickstart`, etc.
85+
- Set **Executable** to the path of your game install plus the built executable name, for example:
86+
87+
```text
88+
C:\Program Files (x86)\Command & Conquer Generals Zero Hour\generalszh.exe (for Zero Hour) or
89+
C:\Program Files (x86)\Command & Conquer Generals Zero Hour\generalsv.exe (for Generals)
90+
```
91+
92+
This ensures that the game starts correctly after clicking the run button in CLion.
93+
7994
- Set **Working directory** to the game directory.
8095
- Check the **Run as administrator** option.
81-
- In the **Before launch** section, add a new **install** step.
8296
- To avoid duplicate builds, remove the **Build** step.
97+
- In the **Before launch** section, add a new **install** step.
8398
- Save the configuration, and you are ready to build and run the project.
8499
85100
## Step 5: Compiling and Running the Project
86101
87-
1. Now, click the **Build** button in CLion, or click **Install** in the build menu.
88-
2. CLion will start the build/install process using the VC6 (x86) toolchain.
89-
3. Once the build is successfully completed, an executable file will be generated and installed in the
102+
Click **Run** on the toolbar, or build the project and run the executable from the
90103
game directory.
91104
92105
## Running Debug Builds
@@ -103,7 +116,5 @@ compatibility with the original compiler from the game's development era. To com
103116
104117
- Working with VC6 requires some adjustments, so it’s a good idea to verify
105118
that the toolchain is working properly.
106-
- You can add Release and Debug profiles in CLion to build the project in
107-
different configurations.
108119
- Administrator rights may be required to run VC6 tools, so run CLion as an administrator if
109120
needed.

0 commit comments

Comments
 (0)