-
Notifications
You must be signed in to change notification settings - Fork 17
feat(content-pipeline): Add Generals Online Integration with Full Content Pipeline Support #177
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
Draft
undead2146
wants to merge
23
commits into
community-outpost:main
Choose a base branch
from
undead2146:generals-online
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…sion identification Implement comprehensive game client detection system with SHA-256 hash verification, support for GeneralsOnline community clients, and integrated manifest generation. Key Features: - Hash-based executable verification for reliable cross-platform detection - Support for GeneralsOnline 30Hz/60Hz community clients - Injectable GameClientHashRegistry replacing static hash storage - Publisher-aware manifest system with PublisherTypeConstants - Automatic version identification (Generals 1.08, Zero Hour 1.04/1.05) - Multi-platform support (Windows Steam/EA App, Linux Steam/Wine) Changes: - Add GameClientConstants.cs with executable names, DLLs, and config files - Add PublisherTypeConstants.cs for multi-publisher identifier system - Add GameClientInfo.cs struct for executable metadata - Add IGameClientHashRegistry.cs interface for injectable hash registry - Add GameClientHashRegistry.cs with hardcoded official game hashes - Add GameClientDetector.cs for installation scanning and hash verification - Update GameClient.cs with InstallationId property (renamed from BaseInstallationId) - Update GameInstallation.cs with enhanced client management - Update manifest system for game client manifest generation - Update ContentManifestBuilder.cs for publisher-aware building - Update ManifestGenerationService.cs with game client manifest creation - Add comprehensive unit tests for hash registry and detection - Update constants.md documentation Benefits: - Cryptographic verification eliminates false positives/negatives - Community client support (GeneralsOnline) alongside official releases - Dependency injection enables better testing and extensibility - Future-proof for new game versions via hash database updates - Cross-platform consistency across Windows and Linux installations Breaking Changes: - GameClient.BaseInstallationId → GameClient.InstallationId - IGameClientDetector method names prefixed with "GameClient" - Static GameClientHashes replaced with injectable IGameClientHashRegistry
- Add IContentDisplayFormatter interface for UI content formatting - Add IProfileContentLoader interface for loading profile content - Add ContentDisplayItem model for UI display - Add IniOptions model for game settings parsing - Add DependencyResolutionResult for dependency resolution operations
- Update ManifestConstants for mod content type - Update InstallationExtensions with ID preservation - Update IUserSettingsService interface - Update IGameProfile and IGameProfileManager interfaces - Update IProfileLauncherFacade interface - Update WorkspaceStrategy enum - Update GameInstallation model - Update GameProfile models (Create/Update requests) - Update VideoSettings model - Update Manifest models (ContentDependency, IdGenerator, etc.) - Update OperationResult model - Update WorkspaceConfiguration model
- Update Steam and Wine installation detectors for Linux - Add EA App installation detector for Windows - Update Windows Steam installation detector - Add Windows installation detector service - Update Windows services module for installation detection - Enhance GameInstallationService with detection capabilities
- Enhance ContentManifestBuilder with source path tracking - Update ManifestGenerationService with improved generation logic - Update ManifestProvider with better manifest handling
- Add WorkspaceStrategyBase for common strategy functionality - Update WorkspaceManager with new capabilities - Add WorkspaceReconciler for incremental updates
- Enhance FileOperationsService with advanced file operations - Support for workspace preparation and management
- Add GameProfileRepository for data persistence - Update GameProcessManager for process tracking
- Add ContentDisplayFormatter for UI content formatting - Update DependencyResolver for content dependencies
- Update GameProfileManager with profile operations - Support for creating, updating, and managing game profiles
- Update ProfileEditorFacade for editing operations - Support for profile content management and editing
- Add ProfileLauncherFacade for launching operations - Support for workspace preparation and launch validation
- Update ProfileContentLoader for content loading - Support for loading game installations and available content
- Update GameLauncher with enhanced launch capabilities - Update LaunchRegistry for tracking launched games
- Update CNCLabs, LocalFileSystem, and ModDB content providers - Update ContentStorageService for content management
- Add ContentDisplayItem ViewModel wrapper - Update GameProfileItemViewModel for profile display
- Update GameProfileLauncherViewModel for launch controls - Support for game launching and status tracking
- Update GameProfileSettingsViewModel for profile configuration - Support for content management and settings editing
- Update GameProfileCardView for profile display - Update GameProfileLauncherView for launch controls - Update GameProfileSettingsWindow for profile configuration - Add GameSettingsView for game settings editor
- Add/update tests for all game profile components - Include unit tests, integration tests, and view model tests - Test coverage for services, models, and UI components
- Update architecture.md with workspace reconciliation - Update constants.md with hash constants - Update manifest-id-system.md with improvements
d8d7050 to
37214eb
Compare
37214eb to
7b91397
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎯 Overview
This draft PR introduces comprehensive Generals Online integration into GenHub's content pipeline architecture, implementing a complete end-to-end flow from discovery through CAS storage. This PR is marked as DRAFT pending confirmation from the Generals Online development team regarding the final API endpoint specifications.
manifest.jsonorlatest.txt) from the Generals Online team.🏗️ Architecture Overview
Content Pipeline Integration
GenHub's content pipeline follows a three-tier architecture for content acquisition:
ContentOrchestratorcoordinates all operationsThe Generals Online integration implements this pattern through four specialized pipeline components:
Dual Variants
Generals Online provides two game client variants (30Hz and 60Hz). The implementation creates two separate manifests during content delivery.
🔑 Key Features
1. API Discovery with Fallback Strategy
The discoverer implements a multi-tier API discovery approach:
This ensures GenHub can operate in three scenarios:
2. Content-Addressable Storage Integration
All Generals Online files are stored in CAS with SHA-256 hashing:
3. Automatic Update Detection
GeneralsOnlineUpdateServiceruns as a background service:GeneralsOnlineConstants)IContentUpdateServicefor UI integration4. Dependency Management
Manifests declare required dependencies:
📦 Implementation Details
Core Components
Pipeline Components (
GenHub/Features/Content/Services/GeneralsOnline/)GeneralsOnlineDiscovererDiscoverAsync()with 3-tier fallbackGeneralsOnlineResolverResolveAsync()using manifest factoryGeneralsOnlineDelivererDeliverContentAsync()with dual manifest creationGeneralsOnlineProviderPrepareContentAsync()coordinating full pipelineGeneralsOnlineManifestFactoryCreateManifests(),UpdateManifestsWithExtractedFiles()GeneralsOnlineUpdateServiceCheckForUpdatesAsync()with 24hr pollingData Models (
GenHub.Core/Models/GeneralsOnline/)GeneralsOnlineReleaseGeneralsOnlineApiResponsemanifest.jsonConstants (
GenHub.Core/Constants/GeneralsOnlineConstants.cs)Centralized configuration including:
ManifestApiUrl,LatestVersionUrl,CdnBaseUrlWebsiteUrl,DownloadPageUrl,SupportUrlPublisherName,ContentName,Description,TagsUpdateCheckIntervalHours(default: 24)Variant30HzSuffix,Variant60HzSuffix🔄 Content Acquisition Flow
User Experience Flow
graph TB A[User clicks Install in Downloads Tab] --> B[Discovery Phase] B --> C{API Available?} C -->|Yes| D[Query manifest.json] C -->|Partial| E[Query latest.txt] C -->|No| F[Use Mock Data] D --> G[Resolution Phase] E --> G F --> G G --> H[Create Dual Manifests 30Hz/60Hz] H --> I[Delivery Phase] I --> J[Download ZIP Package] J --> K[Extract to Temporary Directory] K --> L[Compute SHA-256 Hashes] L --> M[Store Files in CAS] M --> N[Register Both Manifests in Pool] N --> O[User Selects Variant in Profile] O --> P[Workspace Links from CAS] P --> Q[Game Launch]Technical Pipeline Flow
Discovery:
GeneralsOnlineDiscoverer.DiscoverAsync()ContentSearchResultwithGeneralsOnlineReleasemetadataResolution:
GeneralsOnlineResolver.ResolveAsync()GeneralsOnlineManifestFactory.CreateManifests()Delivery:
GeneralsOnlineDeliverer.DeliverContentAsync()IDownloadServiceUpdateManifestsWithExtractedFiles()to compute hashesIContentManifestPool.AddManifestAsync()Profile Integration: User workflow
API Endpoint Specifications (PENDING REVIEW)
Current Implementation
The implementation supports two API endpoints:
Primary Endpoint:
manifest.jsonURL:
https://cdn.playgenerals.online/manifest.jsonExpected Response Format:
{ "version": "101525_QFE5", "download_url": "https://cdn.playgenerals.online/releases/GeneralsOnline_portable_101525_QFE5.zip", "size": 38000000, "release_notes": "QFE5 Release - Improved stability and networking performance", "sha256": "abcd1234..." }Secondary Endpoint:
latest.txtURL:
https://cdn.playgenerals.online/latest.txtExpected Response Format:
Questions for Generals Online
Download URL Pattern: Is the constructed URL pattern correct?
Version Format: Confirm version format is
MMDDYY_QFE#(e.g.,101525_QFE5)SHA-256 Hashes: Will manifest.json include SHA-256 hash of the ZIP file?
Update Frequency: Is 24-hour update check interval appropriate?
Additional Metadata: Any additional fields needed in
manifest.json?🔧 Infrastructure Changes
Dependency Injection Registration
File: ContentPipelineModule.cs
Added registrations for:
GeneralsOnlineProviderasIContentProviderGeneralsOnlineDiscovererasIContentDiscovererGeneralsOnlineResolverasIContentResolverGeneralsOnlineDelivererasIContentDelivererGeneralsOnlineUpdateServiceasIHostedServiceandIContentUpdateServiceCAS Integration Enhancements
Files Modified:
Key Enhancement: Storage service now recognizes
ContentSourceType.ContentAddressableand routes files to CAS instead of manifest-specific directories.Game Client Hash Registry
File: GameClientHashRegistry.cs
Added hash entries for Generals Online executables:
generalsonline_30hz.exe: 30Hz clientgeneralsonline_60hz.exe: 60Hz clientGeneralsOnlineLauncher.exe: Updater/launcherThis enables client version detection and integrity validation.
🎨 UI Integration
Downloads Tab Enhancement
File: DownloadsView.axaml
Added "Generals Online" installation button with:
ViewModel: DownloadsViewModel.cs
New features:
InstallGeneralsOnlineCommand: Triggers content pipelineCheckGeneralsOnlineVersionAsync(): Queries update serviceContentAcquisitionProgressProfile Editor Integration
File: ProfileContentLoader.cs
Enhanced to load CAS-stored game clients:
ContentManifestPoolforContentType.GameClient📝 Documentation Updates
Added Documentation
Updated Documentation
Draft Status: This PR is ready for architectural review but awaits final API endpoint confirmation from the Generals Online development team before merging.