Skip to content

Removed all mentions of the Internal CMake Build Profile and update CMake preset names #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 2 additions & 24 deletions SourceCode/Builds/build_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,7 @@ There are four main build configurations in the project, each designed for diffe

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

### 3. **Internal (O2, _INTERNAL)**

- **Purpose:** The internal configuration is used for internal development purposes, offering optimization and some
debugging features to help developers while maintaining performance.
- **Features:**
- Combines optimization (`/O2`) for performance with limited debugging options.
- Suitable for internal testing and development, where performance is important, but some debugging features are
still needed.

- **Compiler Flags:**
- `/O2`: Optimization for speed.
- `/D "_INTERNAL"`: Defines the internal build configuration.
- `/D "NDEBUG"`: Disables debugging in the final build.
- `/Zi`: Generates debugging information.

- **Use Case:** Used for internal builds when developers need optimized performance but still want some debugging tools
available.

### 4. **Profile (O2, IG_DEBUG_STACKTRACE, _RELEASE, _PROFILE)**
### 3. **Profile (O2, IG_DEBUG_STACKTRACE, _RELEASE, _PROFILE)**

- **Purpose:** The profile configuration is used for performance profiling and optimization. It is designed to help
developers analyze performance bottlenecks and gather performance data.
Expand Down Expand Up @@ -94,9 +76,7 @@ Below is a list of the key compiler flags used across different configurations:
- **`/D "_DEBUG"`**: Defines the build as a debug version, enabling debugging-specific features in the code.
- **`/D "_RELEASE"`**: Defines the build as a release version, disabling debugging features and optimizing for
performance.
- **`/D "_INTERNAL"`**: Marks the build as an internal version, which may include some debugging information while still
being optimized for performance.
- **`/D "NDEBUG"`**: Disables debugging code, typically used in release and internal builds.
- **`/D "NDEBUG"`**: Disables debugging code, typically used in release builds.

### Profiling Flags

Expand All @@ -121,7 +101,5 @@ Below is a list of the key compiler flags used across different configurations:
is optimized for performance with no debugging overhead.
- **Debug:** Use this configuration during development when you need to debug issues. It disables optimizations and
includes debugging information.
- **Internal:** Use this configuration for internal builds where you need some debugging features but still require
optimized performance.
- **Profile:** Use this configuration when analyzing the performance of the game. It helps identify bottlenecks and
areas that can be optimized further.
5 changes: 1 addition & 4 deletions SourceCode/Builds/build_guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ guides cover different environments, configurations, and setups for building the
## Build Configurations Overview

Before diving into the build guides, it's important to understand the different build configurations used in the
project. These configurations dictate how the project is built, whether for debugging, profiling, release, or internal
development purposes. Some common configurations include:
project. These configurations dictate how the project is built, whether for debugging, profiling or release.

- **Release:** Optimized for end-users, providing a smaller, faster executable with no debugging information.
- **Debug:** Includes debugging information, making it easier to trace and debug the code, but without optimization to
ensure ease of debugging.
- **Internal:** Includes debugging information and optimizations, used primarily by developers for testing and internal
purposes.
- **Profile:** Used for performance profiling, with optimizations enabled and additional debugging options to collect
profiling data.

Expand Down
1 change: 0 additions & 1 deletion SourceCode/Builds/build_with_clion_vc6_toolchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ compatibility with the original compiler from the game's development era. To com
1. In the CMake profiles, enable the profiles you want to use. The available workflow presets are:
- `vc6` - Release build
- `vc6-debug` - Debug build
- `vc6-internal` - Internal build
- `vc6-profile` - Profile build

For detailed information about each build configuration and their specific purposes, see the [Build Configurations Overview](https://github.com/TheSuperHackers/GeneralsGameCode/wiki/build_configuration).
Expand Down
13 changes: 5 additions & 8 deletions SourceCode/Builds/build_with_msvc22.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,9 @@ For build using solutions and more advanced build configurations, see below.
- Select the appropriate build configuration:
- `Build Windows 32bit Release` for a release build.
- `Build Windows 32bit Debug` for a debug build.
- `Build Windows 32bit Internal` for an internal build.
- `Build Windows 32bit Profile` for a profile build.
- `Build Windows 32bit VCPKG Release` for a release build with the VCPKG package manager.
- `Build Windows 32bit VCPKG Debug` for a debug build with the VCPKG package manager.
- `Build Windows 32bit VCPKG Internal` for an internal build with the VCPKG package manager.
- `Build Windows 32bit VCPKG Profile` for a profile build with the VCPKG package manager.

![Build options](https://github.com/TheSuperHackers/GeneralsWiki/raw/refs/heads/main/SourceCode/Builds/files/buildoptions.jpg)
Expand All @@ -63,7 +61,7 @@ page.
![image](https://github.com/user-attachments/assets/37d59b79-77fc-4797-bbab-be385dd654da)

- Build the project by clicking on the `Build` menu and selecting `Build`.
- The compiled executable will be placed in the build folder. Example: `build/win32dgb/GeneralsMD/Debug`
- The compiled executable will be placed in the build folder. Example: `build/win32-debug/GeneralsMD/Debug`
- Install the game executable in the game directory by clicking on the `Install` in `Build` menu. This will copy the
executable to the retail game directory.

Expand Down Expand Up @@ -107,17 +105,16 @@ to build the project from the command line.
- #### 2. **Development and Debug Builds**

- **Choose the build configuration:**
- `cmake --workflow --preset win32dgb` for Debug build.
- `cmake --workflow --preset win32int` for Internal build.
- `cmake --workflow --preset win32prof` for Profile build.
- `cmake --workflow --preset win32-debug` for Debug build.
- `cmake --workflow --preset win32-profile` for Profile build.

- **Install the game executable in the game directory (assuming the build was successful):**
- `cmake --install build/<preset name>`

- **To build a specific target:**
- Run `cmake --build build/<preset name> --target <target name>`
- Example: `cmake --build build/win32dgb --target z_generals`
- Or: `cmake --build build/win32int --target g_generals`
- Example: `cmake --build build/win32-debug --target z_generals`
- Or: `cmake --build build/win32-profile --target g_generals`

For more CMake options, see the [CMake Guide](cmake_guide).

Expand Down
1 change: 0 additions & 1 deletion SourceCode/Builds/build_with_msvc6.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ Run the following command based on the type of build you want to create:

- `cmake --workflow --preset vc6` for a release build.
- `cmake --workflow --preset vc6-debug` for a debug build.
- `cmake --workflow --preset vc6-internal` for an internal build.
- `cmake --workflow --preset vc6-profile` for a profile build.

You will find a bunch of files in `build\vc6\<game name>` and a file called `generalszh.exe` or `generalsv.exe`.
Expand Down
16 changes: 7 additions & 9 deletions SourceCode/Builds/cmake_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,14 @@ The **preset** defines the predefined build configuration. The available presets
### For Visual Studio 2022 or Ninja

- `win32`: Release build.
- `win32dgb`: Debug build.
- `win32int`: Internal build.
- `win32prof`: Profile build.
- `win32-debug`: Debug build.
- `win32-profile`: Profile build.

### For Visual Studio 6

- `vc6`: Release build.
- `vc6dgb`: Debug build.
- `vc6int`: Internal build.
- `vc6prof`: Profile build.
- `vc6-debug`: Debug build.
- `vc6-profile`: Profile build.

### Usage

Expand Down Expand Up @@ -196,13 +194,13 @@ To build the Zero Hour code along with its tools in debug mode, use the followin

```bash
# Step 1: Configure the build with a preset and additional options
cmake --preset win32dgb -DGENZH_BUILD_ZEROHOUR=ON -DGENZH_BUILD_ZEROHOUR_TOOLS=ON
cmake --preset win32-debug -DGENZH_BUILD_ZEROHOUR=ON -DGENZH_BUILD_ZEROHOUR_TOOLS=ON

# Step 2: Build the project
cmake --build build/win32dbg
cmake --build build/win32-debug

# Step 3: Install the project to the default installation path
cmake --install build/win32dbg
cmake --install build/win32-debug
```
<!-- markdownlint-disable-next-line -->
### **Build Only World Builder Tool:**
Expand Down