Skip to content

unify(shell): Move Shell to Core - #3070

Open
Jaredl-Dev wants to merge 2 commits into
TheSuperHackers:mainfrom
Jaredl-Dev:unify/shell
Open

unify(shell): Move Shell to Core#3070
Jaredl-Dev wants to merge 2 commits into
TheSuperHackers:mainfrom
Jaredl-Dev:unify/shell

Conversation

@Jaredl-Dev

@Jaredl-Dev Jaredl-Dev commented Aug 7, 2026

Copy link
Copy Markdown

This merges the shared Shell implementation and moves it into Core:

  • Shell.h
  • Shell.cpp
  • ShellMenuScheme.h
  • ShellMenuScheme.cpp

Before this change, Generals and Zero Hour differed only by product-name comments and the RTS_PROFILE_LEGACY initialization profiling hook in Shell.cpp.

Generals gets

  • Stops the legacy init profiling range before opening the main menu, matching Zero Hour.

Dependency cleanup

Because profile builds of the shared Shell call Profile::StopRange("init"):

  • Both GameEngine builds inherit core_profile_legacy through corei_gameengine_private.
  • core_profile_legacy privately links core_debug.
  • Redundant direct profiler and debug links were removed from the Generals and Zero Hour executables and tools.

Verification

  • Verified all four Core files match the former Zero Hour sources.
  • Win32 Release build succeeds.
  • VC6 Release build succeeds.
  • Win32 Profile and VC6 Profile builds succeed at both commits.

Jaredl-Dev added a commit to Jaredl-Dev/GeneralsGameCode that referenced this pull request Aug 7, 2026
Jaredl-Dev added a commit to Jaredl-Dev/GeneralsGameCode that referenced this pull request Aug 7, 2026
Jaredl-Dev added a commit to Jaredl-Dev/GeneralsGameCode that referenced this pull request Aug 7, 2026
Jaredl-Dev added a commit to Jaredl-Dev/GeneralsGameCode that referenced this pull request Aug 7, 2026
@Jaredl-Dev

Copy link
Copy Markdown
Author

Generals now inherits Profile::StopRange("init"), but unlike Zero Hour, it never calls StartRange("init"). Should it be added to Generals’ WinMain.cpp?

@Jaredl-Dev

Copy link
Copy Markdown
Author

I've revised this PR and updated the body to reflect the changes. Please also review my question above.

)

target_link_libraries(core_profile_legacy PRIVATE
core_debug

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is that because of #include "../debug/debug.h" in internal.h ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It's the symbols: Debug::AddCommands, Debug::Command, DebugStackwalk::Signature::GetSymbol and a few more, all defined in core_debug.

Verified on vc6-profile: removing the line still compiles core_profile_legacy, but both executables fail with 7 LNK2001 errors. Zero Hour previously got core_debug from the executable's own link list, which this PR removes, and Generals never linked the profiler at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants