Skip to content

Commit 34cd2bd

Browse files
CopilotJusterZhu
andauthored
Add ConfiginfoBuilder for simplified cross-platform configuration with zero-configuration pattern and comprehensive project metadata extraction (#157)
* Initial plan * Add ConfiginfoBuilder class with comprehensive tests Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Add comprehensive usage documentation for ConfiginfoBuilder Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Extract default black formats as public constant per code review Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Add example code demonstrating ConfiginfoBuilder usage Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Add comprehensive README for ConfiginfoBuilder feature Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Use host app's base directory for InstallPath default Changed default InstallPath from %APPDATA%/~/.config to AppDomain.CurrentDomain.BaseDirectory. This: - Extracts path from host program's runtime location - Requires no admin privileges (uses app's own directory) - Aligns with existing codebase pattern (Thread.GetDomain().BaseDirectory) - More universal and highly available across deployments Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Add ConfiginfoBuilder link to GeneralUpdate.ClientCore project The ConfiginfoBuilder is primarily used in client-side update scenarios, so it should be available in GeneralUpdate.ClientCore in addition to GeneralUpdate.Core. Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Add Velopack-inspired factory method and improve documentation - Added ConfiginfoBuilder.Create() factory method for more fluent API - Updated documentation to mention Velopack zero-configuration inspiration - Added tests for factory method (34/34 tests passing) - Enhanced XML documentation with references to zero-configuration patterns Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Add macOS platform support to ConfiginfoBuilder - Added InitializeMacOSDefaults() method for macOS-specific configuration - macOS uses Unix-like defaults (no .exe extension, chmod script) - Updated platform detection to check for OSPlatform.OSX - Added macOS test case (35/35 ConfiginfoBuilder tests passing) - Updated documentation to include macOS platform details - All tests passing: 60/60 CoreTest, 35/35 ConfiginfoBuilder Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Add automatic application name extraction from csproj files - Implemented TryExtractApplicationNameFromProject() to read app name from .csproj - Searches up to 3 parent directories for project file - Extracts <AssemblyName> property or falls back to csproj filename - Applies platform-specific extensions (.exe on Windows, none on Linux/macOS) - Added test for project file extraction functionality (36/36 tests passing) - Updated documentation to explain auto-discovery feature - All tests passing: 61/61 CoreTest, 36/36 ConfiginfoBuilder Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> * Add comprehensive project metadata extraction (version, company/authors) - Enhanced TryExtractProjectMetadata() to extract multiple fields from .csproj - Extracts <Version> field and maps to ClientVersion/UpgradeClientVersion - Extracts <Company> or <Authors> fields and maps to ProductId - Refactored to use ProjectMetadata class for cleaner code organization - Added ExtractXmlElement() helper for consistent XML parsing - Updated all platform initialization methods to use metadata - Added test for project metadata extraction (37/37 tests passing) - Updated documentation with comprehensive metadata extraction table - All tests passing: 62/62 CoreTest, 37/37 ConfiginfoBuilder Addresses @JusterZhu's specification for extracting: 1. App Name from <AssemblyName> ✓ 2. Version Number from <Version> ✓ 3. Publisher from <Company>/<Authors> ✓ Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
1 parent 2db9739 commit 34cd2bd

7 files changed

Lines changed: 1979 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)