Skip to content

Linux#29

Closed
FitzDegenhub wants to merge 6 commits into
developmentfrom
claude/linux-support-plan-InVJA
Closed

Linux#29
FitzDegenhub wants to merge 6 commits into
developmentfrom
claude/linux-support-plan-InVJA

Conversation

@FitzDegenhub

Copy link
Copy Markdown
Owner

Summary

  • Comprehensive research plan for adding Linux support to UltimateCameraMod
  • Evaluated 12 different approaches: Avalonia UI, Wine/Proton, .NET MAUI, Uno Platform, Blazor Server, Photino+Blazor, Tauri, GTK#, Eto.Forms, CLI/TUI, Blazor WASM, ImGui.NET
  • Recommends Avalonia UI — the same framework Nexus Mods chose for their next-gen cross-platform mod tool
  • Core engine (XML modification, ChaCha20 crypto, LZ4 compression, preset system) is already pure cross-platform C# — ~60% of the codebase needs zero changes
  • Main work: replace WPF with Avalonia XAML (~85-90% syntax compatible), add Linux game detector for Steam Proton/Heroic/Lutris paths, delete ~350 lines of Windows-only taskbar interop

Key Findings

  • Wine/Proton: Game detection hard-fails (Linux Steam doesn't write to Wine registry). WPF rendering is fragile under Wine. Not viable as primary strategy.
  • Avalonia UI: Best fit — single codebase, native desktop feel, full feature parity, proven in modding ecosystem, Steam Deck ready.
  • Web-based (Blazor/Photino/Tauri): Either feels like a browser tab, has risky project health (Photino), or requires learning JavaScript (Tauri).
  • .NET MAUI: No official Linux support. Eliminated.

Phased Plan

  1. Extract core library into cross-platform net6.0 project
  2. Implement Linux game detection (Steam Proton, Heroic, Lutris, Flatpak Steam)
  3. Avalonia UI migration (translate WPF XAML → Avalonia AXAML)
  4. CI pipeline + AppImage packaging for Linux distribution
  5. Testing (Steam Deck is priority platform)

Test plan

  • Review LINUX_SUPPORT_PLAN.md for completeness and accuracy
  • Validate that the recommended approach (Avalonia) fits the project's goals
  • Confirm phased implementation order makes sense
  • Decide whether to ship a CLI quick-win before the full GUI migration

https://claude.ai/code/session_01Nct9AosRzHzJ4DSFBPYKtK

claude added 6 commits April 7, 2026 22:06
Analyzes the full codebase for platform dependencies and outlines
a phased migration strategy using Avalonia UI to replace WPF,
with Linux-specific game detection for Steam Proton/Lutris/Heroic.

https://claude.ai/code/session_01Nct9AosRzHzJ4DSFBPYKtK
…detection

Phase 0 - Core Library (UltimateCameraMod.Core):
- Extract all platform-independent code into net6.0 class library
- Models: AdvancedRow, CameraParamDocs, CameraRules, PresetCodec
- Services: CameraMod, HudMod, JsonModExporter, GameInstallBaselineTracker
- Paz: ArchiveWriter, AssetCodec, CompressionUtils, NameHasher, PamtReader,
  PazEntry, StreamTransform (ChaCha20 + LZ4, pure managed C#)
- New IGameDetector interface for platform abstraction
- WindowsGameDetector (Registry-based, preserves original logic)

Phase 1 - Linux Game Detection:
- LinuxGameDetector searches Steam native, Steam Flatpak, Heroic Games
  Launcher, Bottles, and common Linux paths
- Parses libraryfolders.vdf, Heroic JSON configs, Bottles prefixes
- Brute-force scanning of /mnt, /media, /run/media mount points

Phase 2 - Avalonia UI (initial scaffolding):
- Project targeting net6.0 with Avalonia 11.2.3
- App.axaml with full dark theme (gold accent #c8a24e)
- All button, slider, textbox, combobox, checkbox styles ported
- Dialog windows: Export, Import, ImportPreset, AdvancedImport, Input
- Program.cs entry point, GlobalUsings, AssemblyInfo

Phase 3 - CI Pipeline:
- GitHub Actions workflow building Windows (WPF), Windows (Avalonia),
  and Linux (Avalonia) targets with artifact upload

https://claude.ai/code/session_01Nct9AosRzHzJ4DSFBPYKtK
- ExportJsonDialog: multi-format export with save file picker
- ImportMetadataDialog: metadata entry form for preset imports
- NewPresetDialog: preset name entry dialog
- CommunityBrowserDialog: community preset catalog browser
- Updated App.axaml.cs with platform-aware game detection

https://claude.ai/code/session_01Nct9AosRzHzJ4DSFBPYKtK
- CameraPreview.cs: side-profile camera visualization (Avalonia Canvas port)
- FovPreview.cs: top-down FoV cone visualization (Avalonia Canvas port)
- TutorialOverlay.cs: first-run tutorial spotlight overlay
- CommunityBrowserDialog.axaml.cs: community preset catalog browser code-behind

https://claude.ai/code/session_01Nct9AosRzHzJ4DSFBPYKtK
- Convert MainWindow.xaml (983 lines) to Avalonia MainWindow.axaml
  - WPF namespace → Avalonia namespace
  - Visibility → IsVisible, StaticResource → DynamicResource
  - MouseDown → PointerPressed, ToolTip → ToolTip.Tip
  - Remove WPF-only GroupStyle/DataTrigger/Storyboard templates
  - Remove DataGrid virtualization panel properties
  - Remove SelectionUnit, EnableRowVirtualization WPF-only props
- Port all 9 MainWindow partial code-behind files (~7,700 lines):
  - System.Windows → Avalonia namespaces
  - Dispatcher.BeginInvoke → Dispatcher.UIThread.InvokeAsync
  - Microsoft.Win32 dialogs → TODO markers for StorageProvider
  - Visibility enum → IsVisible bool
  - Remove P/Invoke declarations (user32, kernel32, shell32)
  - Remove taskbar integration code (Avalonia handles natively)
  - Replace static GameDetector → GameDetectorFactory.Create()
- Add GameDetectorFactory for platform-aware game detection

https://claude.ai/code/session_01Nct9AosRzHzJ4DSFBPYKtK
Added comparison table of all evaluated approaches (Wine/Proton,
Blazor, Photino, MAUI, Uno, Tauri, GTK#, Eto, ImGui, CLI) and
why Avalonia was chosen. Added implementation status note.

https://claude.ai/code/session_01Nct9AosRzHzJ4DSFBPYKtK
@FitzDegenhub FitzDegenhub deleted the claude/linux-support-plan-InVJA branch April 8, 2026 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants