first commit

This commit is contained in:
Beyhan Oğur
2026-09-03 04:45:36 +03:00
commit d5f52cc3d3
1038 changed files with 169579 additions and 0 deletions
@@ -0,0 +1,8 @@
schema_version: 1
module_path: updater
title: ClassicAssist Updater (WPF Standalone)
scope:
- ClassicAssist.Updater/
source_files: []
depends_on: []
related_to: []
@@ -0,0 +1 @@
Single-project WinExe targeting net48 with WPF. Entry point is `App.xaml.cs` which bootstraps Exceptionless telemetry, parses CLI args via CommandLineParser into a static `Options` object, auto-detects the current version from `ClassicAssist.dll`, and resolves defaults (`Path`, `CurrentVersion`). The UI layer is a thin `MainWindow` bound to `MainViewModel`; all business logic lives in `MainViewModel`: it runs a background `Task` that calls `CheckForUpdate`, which uses Octokit's `GitHubClient` to list releases from `Settings.Default.RepositoryOwner/RepositoryName`, compares tag versions against `CurrentVersion` (or honors `--force`), kills an optional parent process (`--pid`), downloads the first `.zip` asset via `HttpClient`, verifies size, extracts to `%TEMP%\CAUpdate-{version}` using `System.IO.Compression.ZipFile`, then either recursively copies files into `--path` or relaunches itself with `--stage Install --updatepath ...` to perform a two-phase install when the package contains another updater. `Misc/` holds reusable WPF behaviors (`AutoScrollBehaviour`, `CloseBehaviour`) and an `InverseBooleanConverter`; `Properties/` stores multi-culture resources and user settings; `Annotations.cs` provides `[NotifyPropertyChangedInvocator]`. Dependency direction: App → Options + MainWindow → MainViewModel → Octokit/Exceptionless/CommandLineParser/System.Net.Http/System.IO.Compression; no cross-project references inside this scope.
@@ -0,0 +1,4 @@
- User-facing strings are pulled from `Properties.Resources.*` through generated `Resources.Designer.cs` rather than being hard-coded, enabling per-culture `.resx` files.
- UI state updates are marshaled onto the dispatcher via `_dispatcher.Invoke(() => ...)` before touching `ObservableCollection<string> Items` from background tasks.
- ViewModel properties expose change notification through a shared generic `SetProperty<T>(ref T obj, T value, [CallerMemberName])` helper paired with `OnPropertyChanged`.
- CLI options are declared as POCO properties decorated with `[Option(...)]` attributes consumed by `Parser.Default.ParseArguments<Options>()` at startup.
@@ -0,0 +1 @@
Standalone WPF updater that checks GitHub releases for ClassicAssist, downloads the latest .zip asset, extracts it, and installs files into the target directory.
@@ -0,0 +1 @@
.NET Framework 4.8 WPF; Octokit 0.48 for GitHub Releases API, CommandLineParser 2.6 for CLI flags, Exceptionless 4.3 for crash/event telemetry, Newtonsoft.Json 12, System.IO.Compression.ZipFile, System.Windows.Interactivity.WPF.
@@ -0,0 +1 @@
Build configurations include `Develop` and `Linux` alongside Debug/Release; version is auto-incremented from days since 2020-07-04 via MSBuild `$([System.DateTime]::op_Subtraction(...))` expression producing `0.3.<days>.0`. The updater can be re-invoked by itself with `--stage Install --updatepath <temp-dir>` to complete installation after the first pass.