Skip to content

[ZH] Make Zero Hour Tools compile with VS2022 c++20 #509

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

Conversation

xezon
Copy link

@xezon xezon commented Mar 25, 2025

Merge with Rebase


This change makes Zero Hour Tools build with VS2022 and c++20. It still builds all targets with VS6 and is not expected to change behaviour.

Compile & Linker warnings are not addressed with this change.


(GENZH_BUILD_ZEROHOUR ✔️)
GENZH_BUILD_ZEROHOUR_TOOLS ✔️
(GENZH_BUILD_GENERALS ✔️)
GENZH_BUILD_GENERALS_TOOLS ❌

Zero Hour & Tools build on VS6 ✔️
Zero Hour & Tools build on VS2022 c++20 ✔️
(Generals build on VS6 ✔️)
(Generals build on VS2022 c++20 ✔️)


Commits are split into small chunks for ease of review.

@xezon xezon added Major Severity: Minor < Major < Critical < Blocker Build Anything related to building, compiling ZeroHour Relates to Zero Hour Tools Affects Tools only labels Mar 25, 2025
@xezon xezon requested review from OmniBlade and Mauller March 25, 2025 21:47
@tintinhamans tintinhamans mentioned this pull request Mar 25, 2025
10 tasks
@tintinhamans tintinhamans linked an issue Mar 26, 2025 that may be closed by this pull request
10 tasks
@tintinhamans tintinhamans removed a link to an issue Mar 26, 2025
10 tasks
Copy link

@Mauller Mauller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me overall, some of the things are inconsequential in the end as the tools they are in are likely to end up deprecated in the long run.

@xezon xezon force-pushed the xezon/vs2022-compile-zerohour-tools-2 branch from 15b4e26 to 66fa0a0 Compare March 26, 2025 20:21
Copy link

@OmniBlade OmniBlade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed a trick when I approved earlier, didn't test the new extras build. The following libraries need gz_config adding to their targets so they correctly use C++20:

CRCDiff
Launcher
mangler
matchbot
timingTest

@xezon xezon force-pushed the xezon/vs2022-compile-zerohour-tools-2 branch from 66fa0a0 to ca25f40 Compare March 27, 2025 18:25
@xezon
Copy link
Author

xezon commented Mar 27, 2025

CRCDiff
Launcher
mangler
matchbot
timingTest

Why just these 5? I have now added gz_config to the following targets:

z_compression
z_assetcull
z_autorun
z_babylon
z_buildversionupdate
z_compress
z_crcdiff
z_debugwindow
z_launcher
z_datgen
z_manglerlib
z_matchbot
z_particleeditor
z_texturecompress
z_timingtest
z_versionupdate
z_wolsetup

This appears to be complete. Is that ok?

Copy link

@OmniBlade OmniBlade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those were just the ones that needed to be C++17 or higher to build correctly based on something in one of compatibility wrappers you wrote, but all targets being bumped is also a perfectly good fix.

@xezon
Copy link
Author

xezon commented Mar 27, 2025

Pull number needs to be added to commits.

@xezon xezon force-pushed the xezon/vs2022-compile-zerohour-tools-2 branch from ca25f40 to 2f3e632 Compare March 27, 2025 23:37
@xezon xezon force-pushed the xezon/vs2022-compile-zerohour-tools-2 branch from 2f3e632 to 1751202 Compare March 27, 2025 23:46
@xezon xezon merged commit dc1c88a into TheSuperHackers:main Mar 27, 2025
9 checks passed
xezon added a commit that referenced this pull request Mar 27, 2025
@xezon xezon deleted the xezon/vs2022-compile-zerohour-tools-2 branch March 27, 2025 23:56
PiecePaperCode pushed a commit to PiecePaperCode/GeneralsGameCode that referenced this pull request Mar 28, 2025
PiecePaperCode pushed a commit to PiecePaperCode/GeneralsGameCode that referenced this pull request Mar 28, 2025
PiecePaperCode pushed a commit to PiecePaperCode/GeneralsGameCode that referenced this pull request Mar 28, 2025
PiecePaperCode pushed a commit to PiecePaperCode/GeneralsGameCode that referenced this pull request Mar 28, 2025
PiecePaperCode pushed a commit to PiecePaperCode/GeneralsGameCode that referenced this pull request Mar 28, 2025
PiecePaperCode pushed a commit to PiecePaperCode/GeneralsGameCode that referenced this pull request Mar 28, 2025
PiecePaperCode pushed a commit to PiecePaperCode/GeneralsGameCode that referenced this pull request Mar 28, 2025
PiecePaperCode pushed a commit to PiecePaperCode/GeneralsGameCode that referenced this pull request Mar 28, 2025
PiecePaperCode pushed a commit to PiecePaperCode/GeneralsGameCode that referenced this pull request Mar 28, 2025
PiecePaperCode pushed a commit to PiecePaperCode/GeneralsGameCode that referenced this pull request Mar 28, 2025
PiecePaperCode pushed a commit to PiecePaperCode/GeneralsGameCode that referenced this pull request Mar 28, 2025
PiecePaperCode pushed a commit to PiecePaperCode/GeneralsGameCode that referenced this pull request Mar 28, 2025
PiecePaperCode pushed a commit to PiecePaperCode/GeneralsGameCode that referenced this pull request Mar 28, 2025
@xezon xezon added this to the Code foundation build up milestone Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Anything related to building, compiling Major Severity: Minor < Major < Critical < Blocker Tools Affects Tools only ZeroHour Relates to Zero Hour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants