|
5 | 5 | 1. **CLion** installed and configured. |
6 | 6 | 2. **Microsoft Visual C++ 6.0 (VC6)** installed (assuming it’s installed in the |
7 | 7 | default directory). |
8 | | -3. **CMake** installed and configured. |
9 | | -4. **Source code** of the project cloned from the TheSuperHackers repository. |
| 8 | +3. **Source code** of the project cloned from the TheSuperHackers repository. |
10 | 9 |
|
11 | 10 | ## Step 1: Setting Up the Toolchain in CLion |
12 | 11 |
|
13 | | -1. Open **CLion** and go to **File** -> **Settings** -> **Build, Execution, |
| 12 | +1. Open the cloned folder in **CLion** and go to **File** -> **Settings** -> **Build, Execution, |
14 | 13 | Deployment** -> **Toolchains**. |
15 | 14 | 2. Add a new **Toolchain** by clicking the **+** button. |
16 | 15 | 3. Select **System** as the Type (not Visual Studio). |
17 | | -4. Next to the toolchain name, add the **environment** file by clicking the |
| 16 | +4. Rename the toolchain to **Visual Studio 6** |
| 17 | +5. Next to the toolchain name, add the **environment** file by clicking the |
18 | 18 | **+** button and pointing to the following file: |
19 | 19 |
|
20 | 20 | ```text |
21 | 21 | C:\Program Files (x86)\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT |
22 | 22 | ``` |
23 | 23 |
|
24 | | -5. Set the paths for the tools: |
| 24 | +6. Set the paths for the tools: |
25 | 25 | - **Build Tool**: Choose the `NMAKE.EXE` file from VC6. For example: |
26 | 26 |
|
27 | 27 | ```text |
|
39 | 39 |
|
40 | 40 | ## Step 2: Configuring the CMake Profile |
41 | 41 |
|
42 | | -1. Go to **File** -> **Settings** -> **Build, Execution, Deployment** -> **CMake**. |
43 | | -2. In this window, select the CMake profile you want to configure (if there |
44 | | - isn’t one, create a new one). |
45 | | -3. Choose the **Toolchain** you created in the previous step (VC6 Toolchain). |
46 | | -4. Choose the **Generator** as `NMake Makefiles`. |
47 | | -5. Under **CMake options**, add the following generate settings: |
| 42 | +1. In Cmake profiles, enable the profiles you want to use, like vc6, vc6dgb, vc6int, vc6prof. |
48 | 43 |
|
49 | | - ```text |
50 | | - -G "NMake Makefiles" |
51 | | - ``` |
| 44 | +## step 3: Configuring the installation path |
52 | 45 |
|
53 | | - Be careful not to set `Preset`, as it will override the generator settings. |
54 | | -6. Add the build directory path under **CMake Build Directory**: |
| 46 | +1. In the target application options, do the following: |
55 | 47 |
|
56 | | - ```text |
57 | | - C:\Users\User\Documents\CLion\CnC_Generals_Zero_Hour\build\vc6 |
58 | | - ``` |
| 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. |
59 | 54 |
|
60 | | -## Step 3: Compiling and Running the Project |
| 55 | +## Step 4: Compiling and Running the Project |
61 | 56 |
|
62 | | -1. Now, click the **Build** button in CLion. |
63 | | -2. CLion will start the build process using the VC6 (x86) toolchain. |
64 | | -3. Once the build is successfully completed, a **zerohour.exe** file will be generated. |
65 | | -4. You need to copy the **zerohour.exe** file to the appropriate game directory in order to run the game. |
| 57 | +1. Now, click the **Build** button in CLion, or click **Install** in build menu. |
| 58 | +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). |
66 | 60 |
|
67 | 61 | --- |
68 | 62 |
|
69 | 63 | ## Notes |
70 | 64 |
|
71 | | -- **Visual C++ 6.0 (VC6)** only supports C++98, so avoid using modern C++ features. |
72 | 65 | - Working with VC6 requires some adjustments, so it’s always a good idea to check |
73 | | - that the toolchain is working |
74 | | - properly. |
| 66 | + that the toolchain is working properly. |
75 | 67 | - You can add Release and Debug profiles in CLion to build the project in |
76 | 68 | different configurations. |
77 | | -- Admin rights might be required to run VC6 tools, so make sure to run CLion as an administrator. |
| 69 | +- Admin rights might be required to run VC6 tools, so make sure to run CLion as an administrator if needed. |
0 commit comments