Skip to content

GeneralsOnlineManifestFactory: create distinct ContentManifest for GeneralsOnlineGameData data patch #371

Description

@undead2146

Problem

The Generals Online portable distribution (e.g., GeneralsOnline_portable_081326 from https://cdn.playgenerals.online/manifest.json) includes a GeneralsOnlineGameData directory containing game data patch files (such as 500_900_CommunityPatch_CoreINI.big and related balance/patch archives).

Currently, GeneralsOnlineManifestFactory only creates two manifests:

  1. 60Hz Game Client (ContentType.GameClient, variant suffix 60hz)
  2. QuickMatch MapPack (ContentType.MapPack, variant suffix quickmatch-maps)

During extraction, UpdateManifestsWithExtractedFiles assigns all non-map files to the GameClient manifest with InstallTarget = ContentInstallTarget.Workspace. This creates two major issues:

  1. Incorrect Install Target: The Generals Online engine does not read data patch BIG files from the workspace root; it expects them in the user's Zero Hour Documents directory (%USERPROFILE%\Documents\Command and Conquer Generals Zero Hour Data\GeneralsOnlineGameData\).
  2. Monolithic Coupling: Bundling the data patch into the GameClient manifest prevents independent versioning, tracking, user data lifecycle management, and clean dependency resolution.

Proposed Approach

1. Update GeneralsOnlineManifestFactory to produce 3 manifests

  • Update CreateManifests and CreateVariantManifestsFromOriginal to create a dedicated GeneralsOnline Data Patch manifest (ContentType.Patch, variant suffix e.g. datapatch or communitypatch-coreini).
  • In UpdateManifestsWithExtractedFiles:
    • Partition files in GeneralsOnlineGameData/ (e.g., *.big, *.ini, *.bmp) into the Data Patch manifest.
    • Set InstallTarget = ContentInstallTarget.UserDataDirectory (or relative path preserved under GeneralsOnlineGameData/) for files in this manifest.
    • Exclude GeneralsOnlineGameData/ files from the GameClient workspace manifest.

2. Update GeneralsOnlineDependencyBuilder

  • Add CreateDataPatchDependency / include the Data Patch manifest as an auto-installed requirement in GetDependenciesFor60Hz (alongside Zero Hour 1.04 installation and the QuickMatch MapPack).
  • Ensure GetDependencies(ContentManifest) properly resolves dependencies for ContentType.Patch.

3. Update Constants & Identification

  • Add DataPatchSuffix, DataPatchDisplayName, DataPatchDescription, and GeneralsOnlineGameDataSubdirectory = "GeneralsOnlineGameData" to GeneralsOnlineConstants.
  • Update GeneralsOnlineManifestFactory.CanHandle to support ContentType.Patch for publisher generalsonline.

Acceptance Criteria

  • GeneralsOnlineManifestFactory.CreateManifests produces three distinct manifests from portable releases: 60Hz Game Client (GameClient), QuickMatch MapPack (MapPack), and Data Patch (Patch).
  • Files located in GeneralsOnlineGameData/ (e.g., 500_900_CommunityPatch_CoreINI.big) are assigned exclusively to the Data Patch manifest with InstallTarget = ContentInstallTarget.UserDataDirectory.
  • GameClient manifest contains only executable, runtime DLLs, EAC files, and plugins targeting ContentInstallTarget.Workspace.
  • GeneralsOnlineDependencyBuilder.GetDependenciesFor60Hz includes the Data Patch dependency as AutoInstall.
  • Unit tests verify manifest generation, file partitioning, and dependency structure for all three GeneralsOnline manifests.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions