-
Notifications
You must be signed in to change notification settings - Fork 20
Feat/publisher studio #269
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
base: development
Are you sure you want to change the base?
Changes from all commits
e662cd1
a018d2e
7c42cbe
456cac3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| namespace GenHub.Core.Constants; | ||
|
|
||
| /// <summary> | ||
| /// Constants for Action Sets and Fixes. | ||
| /// </summary> | ||
| public static class ActionSetConstants | ||
| { | ||
| /// <summary> | ||
| /// The directory name for sub-markers. | ||
| /// </summary> | ||
| public const string SubMarkersDirectory = "sub_markers"; | ||
|
|
||
| /// <summary> | ||
| /// The minimum file size for VCRedist 2008 installer (bytes). | ||
| /// </summary> | ||
| public const long MinimumVCRedist2008FileSize = 1000 * 1024; | ||
|
|
||
| /// <summary> | ||
| /// File names used in action sets. | ||
| /// </summary> | ||
| public static class FileNames | ||
| { | ||
| /// <summary> | ||
| /// The filename for Generals.exe. | ||
| /// </summary> | ||
| public const string GeneralsExe = "generals.exe"; | ||
|
|
||
| /// <summary> | ||
| /// The filename for GeneralsZh.exe. | ||
| /// </summary> | ||
| public const string GeneralsZhExe = "generalszh.exe"; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| namespace GenHub.Core.Constants; | ||
|
|
||
| /// <summary> | ||
| /// Constants for external URLs. | ||
| /// </summary> | ||
| public static class ExternalUrls | ||
| { | ||
| /// <summary> | ||
| /// Download URL for Intel Graphics Drivers. | ||
| /// </summary> | ||
| public const string IntelDriverDownload = "https://www.intel.com/content/www/us/en/download-center/home.html"; | ||
|
|
||
| /// <summary> | ||
| /// Download URL for DirectX 8.1 / 9.0c runtime files used by GenPatcher. | ||
| /// Uses the stable Microsoft Download Center landing page. | ||
| /// </summary> | ||
| public const string DirectXRuntimeDownload = "https://www.microsoft.com/en-us/download/details.aspx?id=8109"; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,154 @@ | ||
| namespace GenHub.Core.Constants; | ||
|
|
||
| /// <summary> | ||
| /// Documentation strings for the Publisher Studio UI. | ||
| /// These provide clear explanations of the 3-tier URL architecture | ||
| /// and hosting workflow to publishers. | ||
| /// </summary> | ||
| #pragma warning disable SA1600 // Elements should be documented | ||
| #pragma warning disable SA1124 // Do not use regions | ||
| public static class PublisherDocumentation | ||
| { | ||
| #region Hosting Setup | ||
|
|
||
| /// <summary>Title for hosting setup section.</summary> | ||
| public const string HostingSetupTitle = "Hosting Setup"; | ||
|
|
||
| /// <summary>Description for hosting setup section.</summary> | ||
| public const string HostingSetupDescription = | ||
| "GenHub uses Google Drive to host your catalog and artifact files. " + | ||
| "When you connect your Google account, GenHub creates a folder called " + | ||
| "'GenHub_Publisher' in your Drive. All your published files go there.\n\n" + | ||
| "Your URLs remain stable across updates - when you publish changes, " + | ||
| "GenHub updates the existing files rather than creating new ones."; | ||
|
|
||
| /// <summary>Help text for hosting setup section.</summary> | ||
| public const string HostingSetupHelp = | ||
| "Click 'Connect Google Drive' to authorize GenHub to create and manage files " + | ||
| "in your Drive. GenHub only has access to files it creates - not your personal files."; | ||
|
|
||
| #endregion | ||
|
|
||
| #region Publish | ||
|
|
||
| /// <summary>Title for publish section.</summary> | ||
| public const string PublishTitle = "Publish"; | ||
|
|
||
| /// <summary>Description for publish section.</summary> | ||
| public const string PublishDescription = | ||
| "When you click Publish:\n" + | ||
| "• New artifacts (ZIPs) are uploaded - each version gets a unique URL\n" + | ||
| "• Catalogs are updated in-place - the URL never changes\n" + | ||
| "• Your definition is updated in-place - the URL never changes\n" + | ||
| "• Subscribers automatically see your changes when they refresh\n\n" + | ||
| "This means your subscription link is permanent. Share it once, " + | ||
| "and it works forever."; | ||
|
|
||
| /// <summary>Help text for first-time publishing.</summary> | ||
| public const string PublishFirstTimeHelp = | ||
| "First time publishing? GenHub will:\n" + | ||
| "1. Create your GenHub_Publisher folder on Drive\n" + | ||
| "2. Upload your publisher.json (definition)\n" + | ||
| "3. Upload your catalog files\n" + | ||
| "4. Upload any artifact files with local paths\n" + | ||
| "5. Generate your permanent subscription link"; | ||
|
|
||
| /// <summary>Help text for publishing updates.</summary> | ||
| public const string PublishUpdateHelp = | ||
| "Publishing an update? GenHub will:\n" + | ||
| "1. Upload any new artifacts (new versions)\n" + | ||
| "2. Update your existing catalog files (same URLs)\n" + | ||
| "3. Update your definition if needed (same URL)\n\n" + | ||
| "Subscribers will see your changes automatically."; | ||
|
|
||
| #endregion | ||
|
|
||
| #region Share | ||
|
|
||
| /// <summary>Title for share section.</summary> | ||
| public const string ShareTitle = "Share"; | ||
|
|
||
| /// <summary>Description for share section.</summary> | ||
| public const string ShareDescription = | ||
| "This subscription link is your permanent entry point. Share it on:\n" + | ||
| "• Your website or mod page\n" + | ||
| "• Discord servers\n" + | ||
| "• Forums and communities\n\n" + | ||
| "When users click this link (or paste it into GenHub), they'll " + | ||
| "subscribe to all your catalogs and receive updates automatically."; | ||
|
|
||
| /// <summary>Help text for the subscription link.</summary> | ||
| public const string SubscriptionLinkHelp = | ||
| "The subscription link format: genhub://subscribe?url=<your-definition-url>\n\n" + | ||
| "This URL points to your publisher.json file on Google Drive. " + | ||
| "Since GenHub updates the file in-place, the URL never changes."; | ||
|
|
||
| #endregion | ||
|
|
||
| #region Multi-Catalog | ||
|
|
||
| /// <summary>Title for multiple catalogs section.</summary> | ||
| public const string MultiCatalogTitle = "Multiple Catalogs"; | ||
|
|
||
| /// <summary>Description for multiple catalogs section.</summary> | ||
| public const string MultiCatalogDescription = | ||
| "You can organize your content into multiple catalogs. For example:\n" + | ||
| "• 'ZH Mods' - your Zero Hour modifications\n" + | ||
| "• 'Maps' - standalone map packs\n" + | ||
| "• 'Generals Content' - content for the base game\n\n" + | ||
| "Each catalog has its own URL but they're all linked through your " + | ||
| "publisher definition. Subscribers can choose which catalogs to follow."; | ||
|
|
||
| /// <summary>Help text for multiple catalogs.</summary> | ||
| public const string MultiCatalogHelp = | ||
| "To add a new catalog:\n" + | ||
| "1. Click '+ Add Catalog' in the toolbar\n" + | ||
| "2. Give it an ID (lowercase, no spaces) and name\n" + | ||
| "3. Add content items to the catalog\n" + | ||
| "4. Publish - the new catalog will be uploaded automatically"; | ||
|
|
||
| #endregion | ||
|
|
||
| #region Recovery | ||
|
|
||
| /// <summary>Title for recovery section.</summary> | ||
| public const string RecoveryTitle = "Recovery"; | ||
|
|
||
| /// <summary>Description for recovery section.</summary> | ||
| public const string RecoveryDescription = | ||
| "If you lose your local project files, GenHub can recover your " + | ||
| "hosting state from Google Drive. It looks for your 'GenHub_Publisher' " + | ||
| "folder and rebuilds the file mappings.\n\n" + | ||
| "This means you can publish from a new computer without losing your " + | ||
| "subscription links."; | ||
|
|
||
| /// <summary>Help text for recovery.</summary> | ||
| public const string RecoveryHelp = | ||
| "Recovery works by scanning your GenHub_Publisher folder for:\n" + | ||
| "• publisher.json (your definition)\n" + | ||
| "• catalog-*.json files (your catalogs)\n" + | ||
| "• Artifact files\n\n" + | ||
| "GenHub matches these to your project and restores the file IDs."; | ||
|
|
||
| #endregion | ||
|
|
||
| #region Three-Tier Architecture | ||
|
|
||
| /// <summary>Overview of the 3-tier architecture.</summary> | ||
| public const string ArchitectureOverview = | ||
| "GenHub uses a 3-tier URL architecture:\n\n" + | ||
| "Tier 1: Publisher Definition (publisher.json)\n" + | ||
| "• Your identity and catalog locations\n" + | ||
| "• This is what users subscribe to\n" + | ||
| "• URL never changes\n\n" + | ||
| "Tier 2: Catalogs (catalog-*.json)\n" + | ||
| "• Your content items and releases\n" + | ||
| "• Updated in-place when you add releases\n" + | ||
| "• URL never changes\n\n" + | ||
| "Tier 3: Artifacts (*.zip)\n" + | ||
| "• The actual downloadable files\n" + | ||
| "• Each version gets a new file (immutable)\n" + | ||
| "• Old versions remain accessible"; | ||
|
|
||
| #endregion | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,27 @@ | ||||||||||||
| namespace GenHub.Core.Constants; | ||||||||||||
|
|
||||||||||||
| /// <summary> | ||||||||||||
| /// Constants for Registry keys and values. | ||||||||||||
| /// </summary> | ||||||||||||
| public static class RegistryConstants | ||||||||||||
| { | ||||||||||||
| /// <summary> | ||||||||||||
| /// The Command & Conquer: The First Decade version value. | ||||||||||||
| /// </summary> | ||||||||||||
| public const string TfdVersionValue = "1.03"; | ||||||||||||
|
|
||||||||||||
| /// <summary> | ||||||||||||
| /// The registry key for Windows Media Feature Pack components. | ||||||||||||
| /// </summary> | ||||||||||||
| public const string WindowsMediaFeaturePackKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages"; | ||||||||||||
|
|
||||||||||||
| /// <summary> | ||||||||||||
| /// The registry key for Intel Graphics Driver (Class GUID). | ||||||||||||
| /// </summary> | ||||||||||||
| public const string IntelGfxDriverKey = @"SYSTEM\CurrentControlSet\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000"; | ||||||||||||
|
|
||||||||||||
|
Comment on lines
+19
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid hardcoding the Intel class subkey instance ( 🔧 Suggested adjustment- /// The registry key for Intel Graphics Driver (Class GUID).
- public const string IntelGfxDriverKey = @"SYSTEM\CurrentControlSet\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000";
+ /// The registry class GUID key for Intel Graphics Driver. Enumerate instance subkeys (e.g., 0000, 0001).
+ public const string IntelGfxDriverClassKey = @"SYSTEM\CurrentControlSet\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}";📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
| /// <summary> | ||||||||||||
| /// The registry key for Intel MEWiz. | ||||||||||||
| /// </summary> | ||||||||||||
| public const string IntelMEWizKey = @"SOFTWARE\Intel\MEWiz1.0"; | ||||||||||||
| } | ||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Inconsistent XML documentation on members.
HostingSetupTitleandHostingSetupDescriptionhave XML doc summaries, butHostingSetupHelpand all other constants do not. Since SA1600 is suppressed, consider either removing the existing summaries for consistency or adding summaries to all constants.Also applies to: 25-25
🤖 Prompt for AI Agents