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_clion_vc6_toolchain.md
+24-13Lines changed: 24 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,8 @@ compatibility with the original compiler from the game's development era. To com
11
11
> for setup details.
12
12
-[CLion](https://www.jetbrains.com/clion/)
13
13
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\`
16
16
17
17
## Step 1: Clone and Open the Project
18
18
@@ -64,29 +64,42 @@ compatibility with the original compiler from the game's development era. To com
64
64
65
65
## Step 3: Configuring the CMake Profiles
66
66
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
71
74
72
75
For detailed information about each build configuration and their specific purposes, see the [Build Configurations Overview](https://github.com/TheSuperHackers/GeneralsGameCode/wiki/build_configuration).
73
76
74
77
## Step 4: Configuring the Installation Path
75
78
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.
77
83
78
84
- 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
+
79
94
- Set **Working directory** to the game directory.
80
95
- Check the **Run as administrator** option.
81
-
- In the **Before launch** section, add a new **install** step.
82
96
- To avoid duplicate builds, remove the **Build** step.
97
+
- In the **Before launch** section, add a new **install** step.
83
98
- Save the configuration, and you are ready to build and run the project.
84
99
85
100
## Step 5: Compiling and Running the Project
86
101
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
90
103
game directory.
91
104
92
105
## Running Debug Builds
@@ -103,7 +116,5 @@ compatibility with the original compiler from the game's development era. To com
103
116
104
117
- Working with VC6 requires some adjustments, so it’s a good idea to verify
105
118
that the toolchain is working properly.
106
-
- You can add Release and Debug profiles in CLion to build the project in
107
-
different configurations.
108
119
- Administrator rights may be required to run VC6 tools, so run CLion as an administrator if
0 commit comments