You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generals Online requires data patch BIG files (such as 500_900_CommunityPatch_CoreINI.big, or patch archives distributed for the client / launcher updates like patch3.zip) to reside in the user's Documents data directory: %USERPROFILE%\Documents\Command and Conquer Generals Zero Hour Data\GeneralsOnlineGameData\
To support this:
User Data Deployment: GenHub must deploy and link files with ContentInstallTarget.UserDataDirectory preserving the GeneralsOnlineGameData/... subdirectory hierarchy.
Conflict & Backup Management: Overwriting existing user data files or updating/replacing executables (e.g. original GeneralsOnlineZH_60.exe or custom user data) requires automated backup to %APPDATA%\UserData\backups so uninstallation or profile switching restores previous states cleanly without data loss.
Hotswapping & Runtime Safety (Allow live content hotswapping on running game profiles for non-binary content types #370 Alignment): While Map content in User Data can be hot-swapped dynamically during an active game session, .big archives in GeneralsOnlineGameData are opened and locked by the engine on boot. Modifying or replacing data patches while the game process is running risks file lock collisions and engine crashes.
Proposed Approach
1. User Data Directory Materialisation
Ensure UserDataTrackerService.ResolveUserDataTargetPath correctly maps files targeted to ContentInstallTarget.UserDataDirectory preserving relative subdirectories (such as GeneralsOnlineGameData\500_900_CommunityPatch_CoreINI.big).
Support hard-linking from CAS (with fallback to copy) for .big files in user data.
2. Backup & Lifecycle Tracking
Leverage UserDataTrackerService backup mechanism (BackupExistingFileAsync) before overwriting any existing files in Documents\Command and Conquer Generals Zero Hour Data\GeneralsOnlineGameData\.
Ensure UninstallUserDataAsync and SwitchProfileUserDataAsync cleanly remove deployed patch files and restore original backed-up files.
If launcher/patch deployment involves replacing client executables (e.g. GeneralsOnlineZH_60.exe), ensure original executables are backed up and restorable.
Clarify ContentHotswapClassification: ContentType.Patch (even when deployed to UserDataDirectory) is classified as Locked during active profile sessions (ILaunchRegistry.IsRunning == true).
In GameProfileSettingsViewModel, disable toggling of Data Patch items when in Hotswap Mode.
Acceptance Criteria
Data patch files targeting ContentInstallTarget.UserDataDirectory are materialized to %USERPROFILE%\Documents\Command and Conquer Generals Zero Hour Data\GeneralsOnlineGameData\.
Pre-existing user data files in GeneralsOnlineGameData are safely backed up before overwrite and restored upon uninstallation.
Profile switching cleanly deactivates/unlinks old profile data patches and activates new profile data patches.
Data Patch (ContentType.Patch) remains locked and non-modifiable in the profile editor while the target game profile is running.
Unit tests cover path resolution for UserDataDirectory, backup creation and restoration on uninstall, and hotswap locking behavior.
Problem
Generals Online requires data patch BIG files (such as
500_900_CommunityPatch_CoreINI.big, or patch archives distributed for the client / launcher updates likepatch3.zip) to reside in the user's Documents data directory:%USERPROFILE%\Documents\Command and Conquer Generals Zero Hour Data\GeneralsOnlineGameData\To support this:
ContentInstallTarget.UserDataDirectorypreserving theGeneralsOnlineGameData/...subdirectory hierarchy.GeneralsOnlineZH_60.exeor custom user data) requires automated backup to%APPDATA%\UserData\backupsso uninstallation or profile switching restores previous states cleanly without data loss..bigarchives inGeneralsOnlineGameDataare opened and locked by the engine on boot. Modifying or replacing data patches while the game process is running risks file lock collisions and engine crashes.Proposed Approach
1. User Data Directory Materialisation
UserDataTrackerService.ResolveUserDataTargetPathcorrectly maps files targeted toContentInstallTarget.UserDataDirectorypreserving relative subdirectories (such asGeneralsOnlineGameData\500_900_CommunityPatch_CoreINI.big)..bigfiles in user data.2. Backup & Lifecycle Tracking
UserDataTrackerServicebackup mechanism (BackupExistingFileAsync) before overwriting any existing files inDocuments\Command and Conquer Generals Zero Hour Data\GeneralsOnlineGameData\.UninstallUserDataAsyncandSwitchProfileUserDataAsynccleanly remove deployed patch files and restore original backed-up files.GeneralsOnlineZH_60.exe), ensure original executables are backed up and restorable.3. Runtime Guard & Hotswap Classification (#370 Compatibility)
ContentHotswapClassification:ContentType.Patch(even when deployed toUserDataDirectory) is classified as Locked during active profile sessions (ILaunchRegistry.IsRunning == true).GameProfileSettingsViewModel, disable toggling of Data Patch items when in Hotswap Mode.Acceptance Criteria
ContentInstallTarget.UserDataDirectoryare materialized to%USERPROFILE%\Documents\Command and Conquer Generals Zero Hour Data\GeneralsOnlineGameData\.GeneralsOnlineGameDataare safely backed up before overwrite and restored upon uninstallation.ContentType.Patch) remains locked and non-modifiable in the profile editor while the target game profile is running.UserDataDirectory, backup creation and restoration on uninstall, and hotswap locking behavior.Related