Compare commits

..

394 commits

Author SHA1 Message Date
Pat Hartl
f08fd24a14 Release notes for 2.1.9
All checks were successful
Publish Documentation Updates / dispatch (push) Successful in 9s
2026-07-27 20:09:00 -05:00
Pat Hartl
da94ff8438 Fix detection of primary display's resolution on some Linux multi-display configurations
Some checks failed
LANCommander Release / prep (push) Failing after 49s
LANCommander Release / build_server_linux_arm64 (push) Has been skipped
LANCommander Release / build_server_linux_x64 (push) Has been skipped
LANCommander Release / build_server_osx_arm64 (push) Has been skipped
LANCommander Release / build_server_osx_x64 (push) Has been skipped
LANCommander Release / build_server_win_arm64 (push) Has been skipped
LANCommander Release / build_server_win_x64 (push) Has been skipped
LANCommander Release / build_launcher_linux_arm64 (push) Has been skipped
LANCommander Release / build_launcher_linux_x64 (push) Has been skipped
LANCommander Release / build_launcher_osx_arm64 (push) Has been skipped
LANCommander Release / build_launcher_osx_x64 (push) Has been skipped
LANCommander Release / build_launcher_win_arm64 (push) Has been skipped
LANCommander Release / build_launcher_win_x64 (push) Has been skipped
LANCommander Release / build_packager (push) Has been skipped
LANCommander Release / build_release (push) Has been skipped
2026-07-27 00:26:12 -05:00
Pat Hartl
41bcfa908d Unify path resolution server-wide 2026-07-24 18:00:32 -05:00
Pat Hartl
2ca1db535c Fix app path resolution for server, add better tests 2026-07-24 17:35:58 -05:00
Pat Hartl
3eae04abdd Better handle bypass execution policy for scripts 2026-07-24 00:57:29 -05:00
Pat Hartl
2b10b55b38 Create abstraction around elevated process launching for better testing 2026-07-23 21:31:47 -05:00
Pat Hartl
eb5abc2c01 Expose internal bits of SDK to test project 2026-07-21 18:14:22 -05:00
Pat Hartl
9e7dc978df Increase performance of depot queries 2026-07-21 18:01:44 -05:00
Pat Hartl
4acf5936c5 Add shorter timeout for server notifications 2026-07-21 18:01:34 -05:00
Pat Hartl
a5b36e1e66 Fix SDK tests 2026-07-21 17:45:34 -05:00
Pat Hartl
e23a5c3eca Add tests for installing to an existing game install 2026-07-21 17:45:17 -05:00
Pat Hartl
a5ab9aba58 Update SharpCompress 2026-07-21 17:22:06 -05:00
Pat Hartl
28d640c888 Fix installation of wine32 and winetricks 2026-07-17 21:30:05 -05:00
Pat Hartl
d37bc13255 v2.1.8 release notes
Some checks failed
LANCommander Release / prep (push) Failing after 17s
LANCommander Release / build_launcher_linux_x64 (push) Has been skipped
LANCommander Release / build_launcher_osx_arm64 (push) Has been skipped
LANCommander Release / build_launcher_osx_x64 (push) Has been skipped
LANCommander Release / build_launcher_win_arm64 (push) Has been skipped
LANCommander Release / build_launcher_win_x64 (push) Has been skipped
LANCommander Release / build_packager (push) Has been skipped
LANCommander Release / build_release (push) Has been skipped
LANCommander Release / build_server_linux_arm64 (push) Has been skipped
LANCommander Release / build_server_linux_x64 (push) Has been skipped
LANCommander Release / build_server_osx_arm64 (push) Has been skipped
LANCommander Release / build_server_osx_x64 (push) Has been skipped
LANCommander Release / build_server_win_arm64 (push) Has been skipped
LANCommander Release / build_server_win_x64 (push) Has been skipped
LANCommander Release / build_launcher_linux_arm64 (push) Has been skipped
2026-07-08 18:59:36 -05:00
Pat Hartl
f31925e399 Add runtime platform flag to actions, scripts, and save paths 2026-07-08 02:15:54 -05:00
Pat Hartl
36bc769211 Move offline mode button to the titlebar 2026-07-07 01:53:38 -05:00
Pat Hartl
ec8af3f268 Log any version mismatch 2026-07-07 01:53:22 -05:00
Pat Hartl
f538ae4c81 Handle version mismatching 2026-07-07 01:50:25 -05:00
Pat Hartl
6c6a0245c6 Load images from local when in offline mode 2026-07-07 01:49:46 -05:00
Pat Hartl
04dff90a63 Convert description editor to markdown editor 2026-07-06 04:24:42 -05:00
Pat Hartl
331ebf6155 Improvements to Page functionality
Fixes various issues with page functionality, adds better menus for adding/deleting pages, changes slugs to PascalCase.
2026-07-06 02:11:36 -05:00
Pat Hartl
833535c1d9 Persist datatable sort 2026-07-05 16:25:48 -05:00
Pat Hartl
09a78d9da1 Fix enumeration of script snippets 2026-07-05 16:24:58 -05:00
Pat Hartl
99569f65c0 Fix PowerShell module loading in launcher
When running Windows, set execution policy to bypass. Load modules and trap exceptions that might be thrown. This outputs a warning message per PS module instead of full script execution failing.
2026-07-05 14:43:02 -05:00
Pat Hartl
08f5b5f76d Release notes for v2.1.7
Some checks failed
LANCommander Release / prep (push) Failing after 17s
LANCommander Release / build_launcher_linux_x64 (push) Has been skipped
LANCommander Release / build_launcher_osx_arm64 (push) Has been skipped
LANCommander Release / build_launcher_osx_x64 (push) Has been skipped
LANCommander Release / build_launcher_win_arm64 (push) Has been skipped
LANCommander Release / build_launcher_win_x64 (push) Has been skipped
LANCommander Release / build_packager (push) Has been skipped
LANCommander Release / build_release (push) Has been skipped
LANCommander Release / build_server_linux_arm64 (push) Has been skipped
LANCommander Release / build_server_linux_x64 (push) Has been skipped
LANCommander Release / build_server_osx_arm64 (push) Has been skipped
LANCommander Release / build_server_osx_x64 (push) Has been skipped
LANCommander Release / build_server_win_arm64 (push) Has been skipped
LANCommander Release / build_server_win_x64 (push) Has been skipped
LANCommander Release / build_launcher_linux_arm64 (push) Has been skipped
2026-07-05 02:03:11 -05:00
Pat Hartl
16495770ba Load target view's data before transitioning 2026-07-05 01:29:56 -05:00
Pat Hartl
545b5b1f43 Default to klling process if there's no spawned window 2026-07-04 15:07:13 -05:00
Pat Hartl
c292979010 Fix persisted data table page sizes 2026-07-04 14:51:11 -05:00
Pat Hartl
6e954ff5b8 Log exceptions from save upload failures 2026-07-04 14:27:00 -05:00
Pat Hartl
6bcbc0e9e5 Ensure game is updated when save path is added/updated/deleted 2026-07-04 14:26:25 -05:00
Pat Hartl
38db011de8 Show library before it's fully imported
Loads the user's library from the /Library/Games endpoint and displays it immediately. This route returns a full data set for the user's games. Images are rendered directly from the server. The import still runs in the background, preserving any offline functionality.
2026-07-04 03:33:13 -05:00
Pat Hartl
c26d9cfabb Add endpoint to list full game info for user library 2026-07-04 02:35:09 -05:00
Pat Hartl
b034736822 Avoid downloading depot images to disk, improve UI jank
Fixes #427
2026-07-04 00:14:33 -05:00
Pat Hartl
862f266275 Reorder components of game installations
Game installs now install items in the following order:
1. Base Game
2. Addons
3. Tools
4. Redistributables

Ref #414
2026-07-02 20:42:21 -05:00
Pat Hartl
e287d3ce8a Refresh game action bar after tool install
Ref #414
2026-07-02 20:34:22 -05:00
Pat Hartl
8d96acc98d Ensure tools are uninstalled before game is uninstalled
Ref #414
2026-07-02 20:21:08 -05:00
Pat Hartl
c07161a1a3 Ensure game cache is expired 2026-07-02 20:01:04 -05:00
Pat Hartl
6ccf53de21 Fix importing legacy LCX files with no save paths defined
Fixes #426
2026-07-02 18:14:46 -05:00
Pat Hartl
ee5c9017d5 Get list of installed addons for modify menu 2026-07-01 20:41:08 -05:00
Pat Hartl
04a715e9cb Fix install of games/addons that have no dependent games 2026-07-01 19:37:04 -05:00
Pat Hartl
7595f4d71c Fix inheritance
Some checks failed
LANCommander Release / prep (push) Failing after 14s
LANCommander Release / build_server_linux_x64 (push) Has been skipped
LANCommander Release / build_server_osx_arm64 (push) Has been skipped
LANCommander Release / build_server_osx_x64 (push) Has been skipped
LANCommander Release / build_server_win_arm64 (push) Has been skipped
LANCommander Release / build_server_win_x64 (push) Has been skipped
LANCommander Release / build_launcher_linux_arm64 (push) Has been skipped
LANCommander Release / build_launcher_linux_x64 (push) Has been skipped
LANCommander Release / build_launcher_osx_arm64 (push) Has been skipped
LANCommander Release / build_launcher_osx_x64 (push) Has been skipped
LANCommander Release / build_launcher_win_arm64 (push) Has been skipped
LANCommander Release / build_launcher_win_x64 (push) Has been skipped
LANCommander Release / build_packager (push) Has been skipped
LANCommander Release / build_release (push) Has been skipped
LANCommander Release / build_server_linux_arm64 (push) Has been skipped
2026-06-28 23:22:57 -05:00
Pat Hartl
5c1e011f0a Add release notes for v2.1.6 2026-06-28 23:17:08 -05:00
Pat Hartl
f87756243e Add support for defining PowerShell modules
Adds a new section "Scripting" in the server UI where PowerShell modules can be defined. These can be used for defining a library of functions that can be used in any script. These modules are automatically synced to the launcher and imported upon script execution.
2026-06-28 23:02:35 -05:00
Pat Hartl
5a80d1e605 Refactor connection string input into full database connection component
Fixes #256
2026-06-28 18:23:58 -05:00
Pat Hartl
69f8447cae Fix tests, add tests for user limits 2026-06-28 14:09:34 -05:00
Pat Hartl
fa1559c367 Add limit options for saves, user storage, and download speed
Implements #85, #84, #100
2026-06-28 14:09:02 -05:00
Pat Hartl
8fdb6f74cb Fix display of UTC times 2026-06-28 11:47:57 -05:00
Pat Hartl
68dece3f1b Preserve existing values in metadata lookup
Fixes #420
2026-06-27 23:19:50 -05:00
Pat Hartl
2f0e0daa3c Add "Select All" and "Load More" buttons to media grabber
Fixes #417
2026-06-27 23:13:11 -05:00
Pat Hartl
a6bf885340 Add dialog for creating users as admin
Fixes #419
2026-06-27 19:06:21 -05:00
Pat Hartl
171e7dcaf0 Invalidate profile cache when logging out
Fixes #422
2026-06-27 18:44:24 -05:00
Pat Hartl
e485ad1865 Fix reconciliation of library games based on user libraries enabled/disabled
Ref #423
2026-06-27 18:38:42 -05:00
Pat Hartl
4d32f958cc Additional gating of UI for user libraries
Ref #423
2026-06-27 18:18:55 -05:00
Pat Hartl
2910bc9476 If user libraries are disabled, hide Library from web UI
Ref #423
2026-06-27 18:14:22 -05:00
Pat Hartl
ecdfc6b4e4 Hide library/depot switcher if user libraries are disabled 2026-06-27 18:12:38 -05:00
Pat Hartl
8760b2d961 Default action ServerHost value to LANCommander server address 2026-06-27 17:59:17 -05:00
Pat Hartl
f53d5bfc4c Add "Always Install" option to tools
Ref #414
2026-06-27 12:11:17 -05:00
Pat Hartl
b21efc63d0 Track tools per game
Ref #414
2026-06-27 11:51:55 -05:00
Pat Hartl
fb0df46572 Uninstall tools when uninstalling game
Ref #414
2026-06-27 11:33:39 -05:00
Pat Hartl
f412f308a2 Fix creation of entities with many-to-many relationships
Ref #414
2026-06-27 11:28:39 -05:00
Pat Hartl
a778a56b18 2.1.5 release notes 2026-06-25 22:43:11 -05:00
Pat Hartl
d3a363bae5 Hide tools that have no archive from install overlay
Some checks failed
LANCommander Release / prep (push) Failing after 11s
LANCommander Release / build_server_win_x64 (push) Has been skipped
LANCommander Release / build_launcher_linux_arm64 (push) Has been skipped
LANCommander Release / build_launcher_linux_x64 (push) Has been skipped
LANCommander Release / build_launcher_osx_arm64 (push) Has been skipped
LANCommander Release / build_launcher_osx_x64 (push) Has been skipped
LANCommander Release / build_launcher_win_arm64 (push) Has been skipped
LANCommander Release / build_launcher_win_x64 (push) Has been skipped
LANCommander Release / build_packager (push) Has been skipped
LANCommander Release / build_release (push) Has been skipped
LANCommander Release / build_server_linux_arm64 (push) Has been skipped
LANCommander Release / build_server_linux_x64 (push) Has been skipped
LANCommander Release / build_server_osx_arm64 (push) Has been skipped
LANCommander Release / build_server_osx_x64 (push) Has been skipped
LANCommander Release / build_server_win_arm64 (push) Has been skipped
2026-06-25 22:26:59 -05:00
Pat Hartl
656fbfbcbb Fix game tools API request response 2026-06-25 22:04:57 -05:00
Pat Hartl
956c2c3b8a Fix exception thrown when uninstalling game 2026-06-25 22:04:37 -05:00
Pat Hartl
bd81e97037 Fix clickability of game in compact library list 2026-06-25 21:41:05 -05:00
Pat Hartl
84c0c5eff6 Fix updating of roles 2026-06-25 19:55:21 -05:00
Pat Hartl
0973c00f1e Fix removing games from library, consolidate flyout menu 2026-06-25 19:46:30 -05:00
Pat Hartl
33e6d0f4a3 Add missing endpoint for getting tools per game
Ref #414
2026-06-25 02:05:15 -05:00
Pat Hartl
a9f74ef78f Expose "Exit" button under profile dropdown
Fixes #416
2026-06-25 01:55:26 -05:00
Pat Hartl
2a64a621fc Tests for first time setup creation of administrator account 2026-06-25 01:51:42 -05:00
Pat Hartl
97dbcdc73a Ensure normalized username and email are populated
Fixes #415
2026-06-25 01:23:59 -05:00
Pat Hartl
e64439df66
Merge pull request #396 from aaronpowell/spike/ui-automated-tests
Spike: Playwright UI automated tests for server application
2026-06-25 00:20:31 -05:00
Pat Hartl
12d63c02a2 Stabilize Playwright smoke layer for CI
The remaining Playwright failures were all in interactions that depend on
the Blazor Server circuit being responsive in CI:

- Settings page access now navigates to /Settings/General directly instead
  of expanding the flaky nested Settings SubMenu flyout.
- Drop SettingsMenu_ShowsAllExpectedSubItems; the submenu-expansion is the
  unreliable interaction the bUnit migration exists to replace, and the
  Settings pages are now covered by bUnit component tests.
- Remove the GameImport UI tests (and unused GamesPage/OpenRCT2.lcx). The
  ChunkUploader modal never renders under the in-process test host, so they
  failed in every CI run; the Games list render is already covered by
  AdminNavigationTests.GamesPage_ShowsEmptyTable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-24 23:14:42 -05:00
Pat Hartl
004a254c37 Migrate flaky Playwright admin UI tests to bUnit
Replace the SignalR-circuit-race-prone Playwright component tests for
GameEdit, Settings, metadata, profile, roles and users with in-process
bUnit component tests. Keep a thin Playwright smoke layer for the true
E2E paths (login, admin navigation/routing, first-time setup, game
import) that bUnit cannot cover.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-24 20:45:21 -05:00
Pat Hartl
af63a20bd2 Add GameDetailView visual baselines from Linux CI render
Now that both GameDetailView layout tests render (INavigationService +
MultiplyConverter fixes), capture their deterministic CI screenshots as
baselines. Completes the launcher visual baseline regeneration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-24 18:48:19 -05:00
Pat Hartl
e76440c53e Fix GameDetailView visual tests failing to render
GameDetailViewModel resolves INavigationService from DI, and
GameDetailView.axaml references the MultiplyConverter declared in the
real App.axaml. Neither was present in the test harness, so both
GameDetailView layout tests threw before producing a screenshot.
Register the real NavigationService and mirror the MultiplyConverter
into TestApp so the views render. Baselines still need a fresh CI
capture since these tests never previously rendered.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-24 18:35:51 -05:00
Pat Hartl
99131c4b86 Regenerate launcher visual baselines from Linux CI render
Replaces 9 stale/corrupt baselines with fresh deterministic captures
from the CI Linux renderer. The three background views now render with
the random background disabled (ViewBackground seam); the remaining six
update corrupt mid-transition captures (e.g. overlapping Run/Stop text)
and cross-platform font differences.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-24 18:16:31 -05:00
Pat Hartl
860db8ff8f Make launcher view backgrounds deterministic in visual tests
LoginView, SplashView and ServerSelectionView each picked a random
full-screen background on load, so the visual-regression baselines could
never match — every run compared against a different photo and reported a
spurious 82-94% regression. Centralize the selection in ViewBackground and
let tests disable it, so captured screenshots and baselines are stable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-24 02:03:09 -05:00
Pat Hartl
6a2b5177b0 Use SQLite instead of EF InMemory for UI tests
The DataTable component issues relational queries (AsSplitQuery, Include,
and a translated punctuation-stripping search expression) that the EF
InMemory provider cannot translate. On CI this surfaced as a native stack
overflow in CountAsync that crashed the in-process server and cascaded
into widespread timeouts. A file-based SQLite database supports these
queries and concurrent connections, stabilizing the test run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-24 00:39:44 -05:00
Pat Hartl
97c899f6f2 Generate PowerShell completions in ui_tests CI job
The Monaco editor's PowerShellCompletions.g.ts is gitignored and required
by the frontend webpack build. The in-build MSBuild target uses Windows
path separators that don't resolve on the Linux runner, so the ui_tests
job must generate the file explicitly first — mirroring the server build
jobs which already do this.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-23 22:26:42 -05:00
Pat Hartl
f2a864b540 Update UI tests for post-merge changes from main
- Target net10.0 to match the now-net10 server project (and fix the
  Playwright browser-install path in the PR workflow accordingly).
- Dismiss the persistent "Import Ready" notification (added with main's
  background UploadTracker) before clicking Import; its Duration=0 toast
  overlays and intercepts the modal's Import button.
- Update General settings assertions: "Database Provider" moved to the new
  dedicated /Settings/Database page, so assert on "Use SSL" instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-23 22:11:05 -05:00
Pat Hartl
20a2e0a1af Merge remote-tracking branch 'origin/main' into pr-396
# Conflicts:
#	.github/workflows/LANCommander.PR.yml
#	LANCommander.slnx
2026-06-23 21:13:19 -05:00
Pat Hartl
65c00fe9e1 Fix game import test: set file on InputFile directly
Replace the FileChooser approach with SetInputFilesAsync targeting the
ChunkUploader's hidden InputFile (matched by id prefix), which correctly
drives Blazor's OnChange and enables the Upload button. Also wait on the
actual Upload button's enabled state instead of the first primary button
(which matched the always-enabled "Browse" button and passed spuriously).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-23 21:03:16 -05:00
Pat Hartl
9b5195f1d6 Use web-first Playwright assertions in UI tests
Replace non-waiting Assert.True(await locator.IsVisibleAsync()) checks with
auto-retrying Assertions.Expect(locator).ToBeVisibleAsync()/ToBeHiddenAsync()
to remove flakiness against Blazor's async rendering. Table-row/field page
objects (Metadata/Roles/Users/Profile) now expose ILocator helpers instead of
Task<bool>, so deletion checks wait for the element to disappear.

Also: rename ScreenshotHelper.CaptureIfFailedAsync to CaptureAsync (xUnit v2
cannot expose the test outcome to DisposeAsync, so it always captures the final
page state), drop the unused TestConstants.ServerPort/BaseUrl now that ports
bind dynamically, and fix IClassFixture doc comments to ICollectionFixture.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-23 17:51:34 -05:00
Pat Hartl
46801dd468 Hide auth fields / buttons based on server auth settings
Some checks failed
LANCommander Release / prep (push) Failing after 12s
LANCommander Release / build_launcher_linux_x64 (push) Has been skipped
LANCommander Release / build_launcher_osx_arm64 (push) Has been skipped
LANCommander Release / build_launcher_osx_x64 (push) Has been skipped
LANCommander Release / build_launcher_win_arm64 (push) Has been skipped
LANCommander Release / build_launcher_win_x64 (push) Has been skipped
LANCommander Release / build_packager (push) Has been skipped
LANCommander Release / build_release (push) Has been skipped
LANCommander Release / build_server_linux_arm64 (push) Has been skipped
LANCommander Release / build_server_linux_x64 (push) Has been skipped
LANCommander Release / build_server_osx_arm64 (push) Has been skipped
LANCommander Release / build_server_osx_x64 (push) Has been skipped
LANCommander Release / build_server_win_arm64 (push) Has been skipped
LANCommander Release / build_server_win_x64 (push) Has been skipped
LANCommander Release / build_launcher_linux_arm64 (push) Has been skipped
2026-06-22 21:46:49 -05:00
Pat Hartl
b6e674e2eb Fix saving of authentication settings 2026-06-22 21:08:59 -05:00
Pat Hartl
42ca077416 Add auto redirect to provider to launcher 2026-06-22 21:08:48 -05:00
Pat Hartl
f5c5bbee70 v2.1.4 release notes 2026-06-22 19:45:57 -05:00
Pat Hartl
24eaa79885 Add tool to repack non-streamable ZIP archives
Adds a tool that checks archives to see if they use data descriptors instead of local entry headers for tracking entry size. It will also repack these archives if required.
2026-06-22 19:18:11 -05:00
Pat Hartl
062e59268b Archive documentation
Describes how archives should be created and common pitfalls that archiving tools can make.
2026-06-22 18:07:37 -05:00
Pat Hartl
a78978b10c Fix mapping for save endpoints 2026-06-22 17:09:50 -05:00
Pat Hartl
516465ad1a Add WebP support for media 2026-06-22 17:05:47 -05:00
Pat Hartl
9bc44500fc Update "Last Played" text every minute, localize 2026-06-21 23:33:52 -05:00
Pat Hartl
2e8e4ae3ae Allow selected local files for archive upload to be moved instead of copied
Fixes #413
2026-06-21 23:00:56 -05:00
Pat Hartl
6b2610a200 Rework Tool installation / action resolution
Amends the tool installation to use game install directory and correctly populate actions. Tools previously used an undocumented/unpopulated/inaccessible global install directory. This has been changed to use the game's install directory. Uninstall scripts are also now executed for tools when the game is uninstalled.

Fixes #414
2026-06-21 21:16:45 -05:00
Pat Hartl
23a0a14e57 Auth provider documentation 2026-06-21 02:04:53 -05:00
Pat Hartl
f1fa66b632 Improve advanced auth provider editing, add role claim mapping
- Added auto discovery of scopes and claim mappings to auth provider editor
- Added the ability to map claims to roles
- Auto-provision users logged in over external auth

Ref #411
2026-06-21 02:03:51 -05:00
Pat Hartl
0f03461f53 Add setting to auto redirect to external provider
When enabled, AutoRedirectToProvider will switch authentication challenges to redirect to the external auth provider instead of displaying the password login form. If more than one external provider is configured, a minimal external auth provider login page will be shown.

Ref #410
2026-06-21 01:59:15 -05:00
Pat Hartl
ca7601e218 Mutate user from UserManager queries
Fixes #412
2026-06-20 23:23:38 -05:00
Pat Hartl
000b12ca1c Fix error in launcher when tool actions are not defined 2026-06-20 04:26:04 -05:00
Pat Hartl
b27b1f0ad4 Only display notification when entire install chain is complete 2026-06-20 04:25:01 -05:00
Pat Hartl
54fd3ac0b7 Adjust styling for buttons, dropdowns 2026-06-20 04:24:20 -05:00
Pat Hartl
6e7bcccf45 Add more logging to archive extraction, allow customization of retry attempts on install 2026-06-20 03:33:29 -05:00
Pat Hartl
04a710e101 Add message indicating server needs to be restarted after applying changes to authentication providers 2026-06-19 22:41:37 -05:00
Pat Hartl
72bac8240a Run game started/game stopped server scripts as fire and forget 2026-06-19 22:41:15 -05:00
Pat Hartl
fa63e8e95a Add uninstall script to Redistributables 2026-06-19 20:37:13 -05:00
Pat Hartl
a8709cd05b Fix server game actions loading from server 2026-06-19 20:17:47 -05:00
Pat Hartl
0ed8a80fbb Only allow one instance of the launcher to run at a time
Restores launcher from the system tray on subsequent runs
2026-06-19 19:37:31 -05:00
Pat Hartl
fe8ef32058 Update SharpCompress to 0.49.1 2026-06-19 19:29:47 -05:00
Pat Hartl
5e59e1ca17 Filter non-standalone addons from library compact list 2026-06-18 01:24:15 -05:00
Pat Hartl
1cb30dda24 Fix icons, bundle appimage in normal workflows 2026-06-17 09:36:23 -05:00
Pat Hartl
d676e2e25c Don't swallow errors for HQ authentication 2026-06-17 02:49:16 -05:00
Pat Hartl
fa81d4da6e Generate .app for macOS 2026-06-17 02:45:29 -05:00
Pat Hartl
180fabac97 Generate Linux appimage 2026-06-17 02:45:20 -05:00
Pat Hartl
e231828dd8 Fix list of play sessions under game
Some checks failed
LANCommander Release / prep (push) Failing after 17s
LANCommander Release / build_server_linux_arm64 (push) Has been skipped
LANCommander Release / build_server_linux_x64 (push) Has been skipped
LANCommander Release / build_server_osx_arm64 (push) Has been skipped
LANCommander Release / build_server_osx_x64 (push) Has been skipped
LANCommander Release / build_server_win_arm64 (push) Has been skipped
LANCommander Release / build_server_win_x64 (push) Has been skipped
LANCommander Release / build_launcher_linux_arm64 (push) Has been skipped
LANCommander Release / build_launcher_linux_x64 (push) Has been skipped
LANCommander Release / build_launcher_osx_arm64 (push) Has been skipped
LANCommander Release / build_launcher_osx_x64 (push) Has been skipped
LANCommander Release / build_launcher_win_arm64 (push) Has been skipped
LANCommander Release / build_launcher_win_x64 (push) Has been skipped
LANCommander Release / build_packager (push) Has been skipped
LANCommander Release / build_release (push) Has been skipped
2026-06-16 01:07:22 -05:00
Pat Hartl
6b4ba041e9 v2.1.3 release notes 2026-06-16 01:07:08 -05:00
Pat Hartl
f17932da5c Include game and user, protect against null game 2026-06-15 23:19:05 -05:00
Pat Hartl
c1aca1572e Add server-side tool to optimize images 2026-06-15 21:45:14 -05:00
Pat Hartl
1ec905420f Add tool to delete long play sessions 2026-06-15 21:04:02 -05:00
Pat Hartl
f17afdd54b Populate working directory from PCGamingWiki save paths 2026-06-15 20:52:54 -05:00
Pat Hartl
68edf9b9f4 Download self-container build of yt-dlp 2026-06-15 20:44:38 -05:00
Pat Hartl
5a29943d44 Fix updating for relationships with stale/untracked entities 2026-06-15 20:25:09 -05:00
Pat Hartl
86e1d6075a Adjust styling in game description 2026-06-15 20:19:03 -05:00
Pat Hartl
99cf4cdc51 Launcher game details performance optimizations
- Changed scroll transition on video/screenshot carousel to use RenderTransform instead of margin to cut down on layout passes for each frame. This should result in a significant drop in CPU usage when scrolling.
- Pause playback of videos when scrolled out of view or window is no longer active.
- Removed additional InlineVideoPlayer controls from being created for each item in the media carousel, and instead only created for videos. This should result in a significant drop in RAM allocation when scrolling.
- Rework caching mechanism for covers to have an upper limit of allocated RAM.
- Only decode screenshots / covers at Hi DPI size in which they are displayed at. This should ensure crisp display while only allocating the amount of RAM needed for display.
2026-06-15 19:37:46 -05:00
Pat Hartl
1ceb569a20 Fix extra gap on compact list scrollbar 2026-06-14 23:50:31 -05:00
Pat Hartl
814d0b3395 Add "Allow Registration" setting to server
Fixes #408
2026-06-14 21:46:29 -05:00
Pat Hartl
9d98e8059a Close to system tray 2026-06-14 21:24:07 -05:00
Pat Hartl
07255ab552 Update Notify.NET, fix progress in taskbar 2026-06-14 19:40:47 -05:00
Pat Hartl
d9501aea4e Localize remaining time and install progress status 2026-06-14 18:20:13 -05:00
Pat Hartl
f7a036453f Remove dead code, fix loading of videos/screenshots blocking UI 2026-06-14 01:58:52 -05:00
Pat Hartl
8cac65232a Fix missing "Starting" text in play button when game is starting 2026-06-14 01:01:04 -05:00
Pat Hartl
ecaecd21bb Send keepalive while game is running
Sends a keepalive/heartbeat signal across RPC while a game is running. Server-side this enables the ability to manage play session state with realtime information instead of hoping that the client will stop the play session. Keepalives are tracked in server cache allowing for future potential horizontally-scaled server instances.
2026-06-14 00:53:45 -05:00
Pat Hartl
ceb0eeb36b Move server lifecycle management to ServerManager. Add autostop delay to servers. 2026-06-14 00:53:38 -05:00
Pat Hartl
c4fa0c7335 Handle Process killing via extension method w/ libc import on Linux 2026-06-14 00:53:31 -05:00
Pat Hartl
268d66eed5
Merge pull request #407 from LANCommander/refactor/database-service-scope
Refactor/database service scope
2026-06-13 01:46:29 -05:00
Pat Hartl
da87e786ff Regenerate PostgreSQL migrations 2026-06-13 01:36:03 -05:00
Pat Hartl
5ffabe8064 Merge branch 'main' into refactor/database-service-scope 2026-06-12 23:51:05 -05:00
Pat Hartl
056eda9fb2 Fix missing SteamGridDB API key throwing exception when adding game 2026-06-12 23:50:24 -05:00
Pat Hartl
ad8f4ddfbf Fix error thrown on first time setup when no storage locations exist 2026-06-12 23:49:04 -05:00
Pat Hartl
790311ac8d Various fixes for MySQL/MariaDB
- Regenerate migrations
- Fix identity database context lifetimes
- Fix rendering of edit components
- Move database settings to separate section
2026-06-12 23:48:11 -05:00
Pat Hartl
e9854cc722 Update 2.1.0 release notes with 2.1.2 details 2026-06-11 18:38:48 -05:00
Pat Hartl
3da723ec2f Add contributor headings 2026-06-11 18:38:35 -05:00
Pat Hartl
3944339daf 2.1.2 release notes, contributor grid component
Some checks failed
LANCommander Release / prep (push) Failing after 22s
LANCommander Release / build_release (push) Has been skipped
LANCommander Release / build_server_linux_arm64 (push) Has been skipped
LANCommander Release / build_server_linux_x64 (push) Has been skipped
LANCommander Release / build_server_osx_arm64 (push) Has been skipped
LANCommander Release / build_server_osx_x64 (push) Has been skipped
LANCommander Release / build_server_win_arm64 (push) Has been skipped
LANCommander Release / build_server_win_x64 (push) Has been skipped
LANCommander Release / build_launcher_linux_arm64 (push) Has been skipped
LANCommander Release / build_launcher_linux_x64 (push) Has been skipped
LANCommander Release / build_launcher_osx_arm64 (push) Has been skipped
LANCommander Release / build_launcher_osx_x64 (push) Has been skipped
LANCommander Release / build_launcher_win_arm64 (push) Has been skipped
LANCommander Release / build_launcher_win_x64 (push) Has been skipped
LANCommander Release / build_packager (push) Has been skipped
2026-06-11 18:14:43 -05:00
Pat Hartl
6722740b51 Merge branch 'main' of https://github.com/LANCommander/LANCommander 2026-06-11 17:54:24 -05:00
Pat Hartl
c4a4b98e95 Add fallback for ProcessTerminationMethod for Windows, use absolute pathing for kill in Linux/macOS 2026-06-11 17:54:19 -05:00
Pat Hartl
c3e4f47827
Merge pull request #406 from Mavyre/patch-1
Corrected Local server engine tracking
2026-06-11 17:11:25 -05:00
Mavyre
55ebc1ac74
Corrected Local server engine tracking 2026-06-11 23:04:52 +02:00
Pat Hartl
5733651e42 Make entire row in compact list clickable 2026-06-11 00:12:09 -05:00
Pat Hartl
2c2d16146f Persist items per page
Fixes #296
2026-06-10 23:42:16 -05:00
Pat Hartl
92d10dce3c Fix padding in metadata lookup dialog 2026-06-10 23:06:55 -05:00
Pat Hartl
4fd268d9c3 Check redistributables for updates 2026-06-10 21:51:12 -05:00
Pat Hartl
ac498d45ba Fix grabbing of token for HQ 2026-06-10 21:15:02 -05:00
Pat Hartl
c605c5e8d6 Refresh manifest and scripts on disk if no update exists 2026-06-10 20:39:50 -05:00
Pat Hartl
76cb9f9246 Also handle .ini files 2026-06-10 20:21:18 -05:00
Pat Hartl
ca713f6d3f Rework .reg importing in script editor
Script editor now supports drag and drop for .ps1, .reg, and other text files. .ps1 files will be handled by replacing the contents of the text editor. .reg files will be converted to PowerShell commands and inserted into the script editor. Any other text file will be inserted as an escaped string.
2026-06-10 20:19:06 -05:00
Pat Hartl
37caa8ab9b Put 2.1.1 patch notes into 2.1.0 2026-06-08 20:40:11 -05:00
Pat Hartl
fe0ce66ccb v2.1.1 update release notes 2026-06-08 20:00:55 -05:00
Pat Hartl
76d5375e35 Fix display of empty library view
Some checks failed
LANCommander Release / prep (push) Failing after 1m10s
LANCommander Release / build_server_win_x64 (push) Has been skipped
LANCommander Release / build_launcher_linux_arm64 (push) Has been skipped
LANCommander Release / build_launcher_linux_x64 (push) Has been skipped
LANCommander Release / build_launcher_osx_arm64 (push) Has been skipped
LANCommander Release / build_launcher_osx_x64 (push) Has been skipped
LANCommander Release / build_launcher_win_arm64 (push) Has been skipped
LANCommander Release / build_launcher_win_x64 (push) Has been skipped
LANCommander Release / build_packager (push) Has been skipped
LANCommander Release / build_release (push) Has been skipped
LANCommander Release / build_server_linux_arm64 (push) Has been skipped
LANCommander Release / build_server_linux_x64 (push) Has been skipped
LANCommander Release / build_server_osx_arm64 (push) Has been skipped
LANCommander Release / build_server_osx_x64 (push) Has been skipped
LANCommander Release / build_server_win_arm64 (push) Has been skipped
2026-06-08 19:53:18 -05:00
Pat Hartl
7e35dac126 Add registration form to launcher 2026-06-08 19:49:38 -05:00
Pat Hartl
c6382d8dd0 Dim title for non-installed games 2026-06-08 19:36:37 -05:00
Pat Hartl
f7972d6a48 Fix "Update" button, update process 2026-06-08 19:29:09 -05:00
Pat Hartl
62c03621a3 Rework update functionality as an additional download workflow 2026-06-08 19:00:56 -05:00
Pat Hartl
7d367b6453 Add message when there's no items in games list view or depot 2026-06-07 12:08:44 -05:00
Pat Hartl
74263fa12d Download media if it doesn't exist locally, add fallback if LibVLC doesn't load 2026-06-07 11:46:25 -05:00
Pat Hartl
ea37124f68 Fix bundling of libvlc on macOS/Windows 2026-06-07 11:45:02 -05:00
Pat Hartl
0ee143cc73 Only scroll focus when using keyboard/gamepad navigation
Some checks failed
LANCommander Release / prep (push) Failing after 29s
LANCommander Release / build_server_osx_arm64 (push) Has been skipped
LANCommander Release / build_server_osx_x64 (push) Has been skipped
LANCommander Release / build_server_win_arm64 (push) Has been skipped
LANCommander Release / build_server_win_x64 (push) Has been skipped
LANCommander Release / build_launcher_linux_arm64 (push) Has been skipped
LANCommander Release / build_launcher_linux_x64 (push) Has been skipped
LANCommander Release / build_launcher_osx_arm64 (push) Has been skipped
LANCommander Release / build_launcher_osx_x64 (push) Has been skipped
LANCommander Release / build_launcher_win_arm64 (push) Has been skipped
LANCommander Release / build_launcher_win_x64 (push) Has been skipped
LANCommander Release / build_packager (push) Has been skipped
LANCommander Release / build_release (push) Has been skipped
LANCommander Release / build_server_linux_arm64 (push) Has been skipped
LANCommander Release / build_server_linux_x64 (push) Has been skipped
2026-06-06 07:00:07 -05:00
Pat Hartl
cb6bbcab00 Only focus when gamepad has been activated 2026-06-06 06:59:19 -05:00
Pat Hartl
e74ef66bcd Fix innosetup download exe 2026-06-06 06:51:11 -05:00
Pat Hartl
7a4553c407 Only run SDK workflow on publish 2026-06-06 06:50:57 -05:00
Pat Hartl
d1b558621f Update repository documentation 2026-06-06 06:35:49 -05:00
Pat Hartl
19ac365d72 Fix WinGet workflow 2026-06-06 06:29:28 -05:00
Pat Hartl
72365cdc0f Fix SDK packaging 2026-06-06 05:58:24 -05:00
Pat Hartl
2497489041 Remove launcher "Avalonia Preview" text 2026-06-06 05:50:53 -05:00
Pat Hartl
b183e4b18c Remove old launcher, rename Avalonia launcher
Also adds ARM builds for Linux + Windows launcher
2026-06-06 05:49:24 -05:00
Pat Hartl
044981b999 Carousel for packager 2026-06-06 04:05:48 -05:00
Pat Hartl
dc14bf10cb Fix use of Text component 2026-06-06 03:30:49 -05:00
Pat Hartl
0503f4e3a5 v2.1.0 release notes 2026-06-06 03:24:16 -05:00
Pat Hartl
0b260f65ff Fix display of redist picker 2026-06-06 03:19:12 -05:00
Pat Hartl
9c4854b6ad Expand file picker fields 2026-06-06 02:58:43 -05:00
Pat Hartl
5e37efb3cf Fix uploader 2026-06-06 02:34:28 -05:00
Pat Hartl
6f71d4c2e0 Fix packager LCX upload 2026-06-04 22:03:18 -05:00
Pat Hartl
302cfba815 Fix HQ link not persisting across restarts and refresh after HQ account link 2026-06-04 20:42:51 -05:00
Pat Hartl
e685b4c045 Use default storage location if none specified 2026-06-04 01:37:00 -05:00
Pat Hartl
6fa2b3b56c Use correct route for uploading 2026-06-04 01:29:44 -05:00
Pat Hartl
113d8bd080 Add platforms to metadata search results 2026-06-04 01:29:31 -05:00
Pat Hartl
819cb28d17 Packager app improvements, metadata endpoints
- Add ability to connect to server
- Add uploading of finished package to server
- Add metadata lookup when connected to server
- Fix layout when specifying action
- Hide finish button at generate step
2026-06-03 19:43:45 -05:00
Pat Hartl
90d04d1e5e Fix silent errors thrown on upload, fix SDK chunk uploading 2026-06-03 19:28:27 -05:00
Pat Hartl
77bc776c37 Add provider dropdown to media grabber dialog 2026-06-01 02:16:06 -05:00
Pat Hartl
45aaa0ea8d Simplify game addition w/ metadata lookup
Adding a game now immediately provides a dialog to lookup a game through metadata providers. Selecting a result will create the game with the populated metadata. An additional option of automatically downloading art (icon, cover, background, logo) is also provided, though may be inaccurate and completely up to the results of the provider.
2026-06-01 02:15:53 -05:00
Pat Hartl
fe39e5bc45 Allow user to alter files before selecting for packaging 2026-05-31 22:41:40 -05:00
Pat Hartl
34bc139ff9 Make sure Generate LCX button is always visible 2026-05-31 22:41:13 -05:00
Pat Hartl
bb48805d5e Fix detected directory not being populated 2026-05-31 22:40:40 -05:00
Pat Hartl
70a74599c4 Rename Install-LatestArchive to Expand-LatestArchive. Add to redist + tools 2026-05-31 22:29:00 -05:00
Pat Hartl
4c89aa60fe Add cmdlet for extracting the latest archive for a game 2026-05-31 22:19:03 -05:00
Pat Hartl
3237fcdabd Cmdlet documentation 2026-05-31 22:18:12 -05:00
Pat Hartl
670975b647 Use version to bust browser cache for static assets 2026-05-31 16:26:32 -05:00
Pat Hartl
aef2cebc00 Avoid publishing :latest docker tag for prerelease 2026-05-31 16:19:49 -05:00
Pat Hartl
2a66ae0fc7 v2.1.0-rc5 release notes 2026-05-30 13:36:45 -05:00
Pat Hartl
a7a7f021e2 Fix docs list for packager 2026-05-30 13:17:11 -05:00
Pat Hartl
8917a2d79f Add package application for auto-building LCX files
Some checks failed
LANCommander SDK Release / prep (push) Failing after 59s
LANCommander SDK Release / publish (push) Has been skipped
LANCommander Release / prep (push) Failing after 1m12s
LANCommander Release / build_server_linux_arm64 (push) Has been skipped
LANCommander Release / build_server_linux_x64 (push) Has been skipped
LANCommander Release / build_server_osx_arm64 (push) Has been skipped
LANCommander Release / build_server_osx_x64 (push) Has been skipped
LANCommander Release / build_server_win_arm64 (push) Has been skipped
LANCommander Release / build_server_win_x64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_linux_x64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_osx_arm64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_osx_x64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_win_x64 (push) Has been skipped
LANCommander Release / build_packager (push) Has been skipped
LANCommander Release / build_release (push) Has been skipped
2026-05-30 13:10:01 -05:00
Pat Hartl
1191226dc0 Hide standalone expansions/mods from nested games 2026-05-29 02:37:08 -05:00
Pat Hartl
af3ee00a87 Fix missing nested game data
Fixes #284
2026-05-29 02:36:47 -05:00
Pat Hartl
bcdbfdbce3 Add HQ login process to first time setup 2026-05-29 02:19:05 -05:00
Pat Hartl
f88ef42c42 Normalize save paths to use / before regex matching
Fixes #266
2026-05-28 22:46:24 -05:00
Pat Hartl
4948dbc0d5 Add background uploading
Fixes #298
2026-05-28 22:26:24 -05:00
Pat Hartl
19a63491fc Add button to download current log 2026-05-28 20:44:35 -05:00
Pat Hartl
2faa334461 Fix log viewer under settings / logs
Fixes #393
2026-05-28 20:31:02 -05:00
Pat Hartl
df97b4f5f9 Fix user approval menu item
Fixes #405
2026-05-28 20:11:26 -05:00
Pat Hartl
eed09becf7 Fix archive processing for "Use Local File" 2026-05-28 19:54:58 -05:00
Pat Hartl
02750d6d62 Improve file manager UX
- Faster enumeration of large directories
- Add toggleable columns
- Add Created and Type columns
- Fix breadcrumbs
- Properly build left view tree with support for cross-platform roots and special folders
2026-05-28 19:54:33 -05:00
Pat Hartl
638942ff89 Fix "Use Local File" disabled button 2026-05-28 19:52:23 -05:00
Pat Hartl
f54eb5bcdd v2.1.0-rc4 Release Notes 2026-05-28 02:02:55 -05:00
Pat Hartl
ab22e0aeb0 Fix scrollbar being overlapped by titlebar
Some checks failed
LANCommander SDK Release / prep (push) Failing after 15s
LANCommander Release / prep (push) Failing after 1m3s
LANCommander SDK Release / publish (push) Has been skipped
LANCommander Release / build_server_linux_arm64 (push) Has been skipped
LANCommander Release / build_server_linux_x64 (push) Has been skipped
LANCommander Release / build_server_osx_arm64 (push) Has been skipped
LANCommander Release / build_server_osx_x64 (push) Has been skipped
LANCommander Release / build_server_win_arm64 (push) Has been skipped
LANCommander Release / build_server_win_x64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_linux_x64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_osx_arm64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_osx_x64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_win_x64 (push) Has been skipped
LANCommander Release / build_release (push) Has been skipped
2026-05-28 00:14:22 -05:00
Pat Hartl
a577d6f898 Update HQ package, fixes HQ lookups 2026-05-28 00:10:03 -05:00
Pat Hartl
5b93161910 Add big screen mode 2026-05-28 00:09:53 -05:00
Pat Hartl
4fde39a729 Publish prerelease SDK to NuGet. Switch to multi-target 2026-05-27 23:14:03 -05:00
Pat Hartl
52dd3f23ba Add "Package" button to archive page w/ dialog 2026-05-27 20:42:23 -05:00
Pat Hartl
81639e9fc2 Update PowerShell snippets 2026-05-26 20:37:29 -05:00
Pat Hartl
a67b1953f0 Register cmdlets via source generated extension 2026-05-26 20:36:25 -05:00
Pat Hartl
68b112d6ce Implement RunWrapper script execution for redistributables
RunWrapper scripts were defined as a script type but never executed. This adds full execution support during game launch, with proper game running state tracking and cancellation/stop support including child process cleanup.
2026-05-26 20:11:53 -05:00
Pat Hartl
5b3278685e Gamepad navigation tweaking for game details 2026-05-26 01:11:00 -05:00
Pat Hartl
6704b63cb6 Gamepad navigation tweaking for library list view 2026-05-26 00:49:30 -05:00
Pat Hartl
4ffa52cc2a Fix media download on import 2026-05-26 00:14:48 -05:00
Pat Hartl
3736a6174c Somewhat working gamepad controls 2026-05-26 00:14:13 -05:00
Pat Hartl
54dc7fd20c Fix icon downloading 2026-05-25 16:30:09 -05:00
Pat Hartl
c27496ec2f Add run wrapper script to list of available Redistributable scripts 2026-05-25 15:32:14 -05:00
Pat Hartl
c1c398ad2c Update notes
Some checks failed
LANCommander Release / prep (push) Failing after 1m3s
LANCommander Release / build_server_linux_arm64 (push) Has been skipped
LANCommander Release / build_server_linux_x64 (push) Has been skipped
LANCommander Release / build_server_osx_arm64 (push) Has been skipped
LANCommander Release / build_server_osx_x64 (push) Has been skipped
LANCommander Release / build_server_win_arm64 (push) Has been skipped
LANCommander Release / build_server_win_x64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_linux_x64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_osx_arm64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_osx_x64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_win_x64 (push) Has been skipped
LANCommander Release / build_release (push) Has been skipped
2026-05-25 04:38:58 -05:00
Pat Hartl
9d5d11f2c1 Fix Settings/Media 2026-05-25 04:35:46 -05:00
Pat Hartl
9849bf23f7 Fix check for newer saves on server 2026-05-25 04:16:51 -05:00
Pat Hartl
527d3abaf2 Add more save handling logging 2026-05-25 04:16:19 -05:00
Pat Hartl
be4626b779 Increase quality of rendered covers 2026-05-25 03:02:11 -05:00
Pat Hartl
a599e62ade Sync play sessions on import 2026-05-25 02:47:08 -05:00
Pat Hartl
2b3bd643f6 Action bar tweaks
- Hide "Download Size" stat when game is installed
- Correctly load play sessions to fix "Play Time" and "Last Played" stats
2026-05-25 02:32:49 -05:00
Pat Hartl
596bed55ae v2.1.0-rc3 release notes 2026-05-25 02:05:53 -05:00
Pat Hartl
56bc38b235 Fix shadow overlay on covers in carousels 2026-05-25 01:55:47 -05:00
Pat Hartl
667a89634e Fix bottom of covers in carousel being cut off on hover 2026-05-25 01:42:49 -05:00
Pat Hartl
aac2d46932 Fix display of playing/stop on play button when game is running 2026-05-25 01:38:50 -05:00
Pat Hartl
07521ec8f4 Add server discovery to Avalonia launcher 2026-05-25 01:34:40 -05:00
Pat Hartl
12f04167af Merge branch 'main' of https://github.com/LANCommander/LANCommander 2026-05-25 01:08:00 -05:00
Pat Hartl
1897fc50b9
Merge pull request #403 from akifreak/fix-beacon-discovery
Fix beacon discovery
2026-05-24 22:24:16 -05:00
Pat Hartl
65f13f9fcb Preserve Linux root when expanding path variables
Fixes #404
2026-05-24 18:55:57 -05:00
Pat Hartl
4965d2019b Fix redistributable/tool importing 2026-05-24 18:51:58 -05:00
Pat Hartl
1b473343a0 Rework list view in launcher
Redesigns the list view to look more like the classic library view from the previous launcher, with added carousels for Recently Played and Collections.
2026-05-24 16:36:32 -05:00
Pat Hartl
41c9e5a0b9 Launcher optimizations 2026-05-24 15:05:29 -05:00
Pat Hartl
783816e7da Fix launcher CI asset naming
Some checks failed
LANCommander Release / prep (push) Failing after 56s
LANCommander Release / build_server_win_x64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_linux_x64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_osx_arm64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_osx_x64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_win_x64 (push) Has been skipped
LANCommander Release / build_release (push) Has been skipped
LANCommander Release / build_server_linux_arm64 (push) Has been skipped
LANCommander Release / build_server_linux_x64 (push) Has been skipped
LANCommander Release / build_server_osx_arm64 (push) Has been skipped
LANCommander Release / build_server_osx_x64 (push) Has been skipped
LANCommander Release / build_server_win_arm64 (push) Has been skipped
2026-05-24 01:55:25 -05:00
Pat Hartl
e7415e8817 Rename assets 2026-05-24 01:05:19 -05:00
Pat Hartl
60b1bd4fbd v2.1.0-rc2 release notes 2026-05-24 01:00:47 -05:00
Pat Hartl
8a618706bd Add variable picker dialog 2026-05-24 00:42:10 -05:00
Pat Hartl
4d795eb449 Remove CLI project
Functionality is built into the Avalonia launcher
2026-05-24 00:10:23 -05:00
Pat Hartl
2bb95e8a12 Formatting 2026-05-24 00:09:13 -05:00
Pat Hartl
d8452efb5a Track redist files
Tracks files created in the game's install directory when the install script is run. This results in the ability to delete redist files when the game is uninstalled.
2026-05-23 22:59:56 -05:00
Pat Hartl
6e2e0542d6 Add full set of command line verbs 2026-05-23 22:58:10 -05:00
Pat Hartl
d2b6d65c93 Always run redist install if no detect script exists 2026-05-23 22:17:32 -05:00
Pat Hartl
a368b7f646 Filter out package scripts from responses 2026-05-23 22:13:58 -05:00
Pat Hartl
0ef795ac3d Fix write all scripts 2026-05-23 22:13:23 -05:00
Pat Hartl
dd4aa6b163 Fix unicode support for win9x 2026-05-23 21:07:28 -05:00
Pat Hartl
528356e9e4 Fix legacy launcher CI pathing 2026-05-23 20:47:12 -05:00
Pat Hartl
725ce079fd Update legacy launcher workflow 2026-05-23 20:43:26 -05:00
Pat Hartl
a5e68a99c3 Remove legacy crash test build 2026-05-23 20:42:52 -05:00
Pat Hartl
eb61c9c95d Merge branch 'feature/legacy-launcher' 2026-05-23 20:33:20 -05:00
Pat Hartl
856d7206ab Missing files for legacy launcher
Some checks failed
LANCommander.Launcher.Legacy / Build (Win9x / MinGW-w64 i686) (push) Has been cancelled
2026-05-23 20:33:04 -05:00
Pat Hartl
c3a9829b85 Visual changes
- Added backgrounds to login screen
- Fixed word wrapping app-wide
- Restyled back button in game details
- Combine Library/Depot button in footer
2026-05-23 20:32:21 -05:00
Pat Hartl
767ca4416d Add app icon. Fix plaer alias button 2026-05-23 20:09:31 -05:00
Pat Hartl
554f2e64a6 Only show standalone mods/expansions and main games in game lists 2026-05-23 19:49:49 -05:00
Pat Hartl
37a6f906f4 Fix rendering issues with window resizing 2026-05-23 19:44:08 -05:00
Pat Hartl
303c6079ac Window resizing 2026-05-23 19:32:12 -05:00
Pat Hartl
6d2c3ccc15 Merge branch 'feature/legacy-launcher' 2026-05-23 16:58:54 -05:00
Pat Hartl
d766f38813 Fix includes 2026-05-23 16:58:45 -05:00
Pat Hartl
443ed1a0c9 Feature parity / Win9x fixes
- Moved launcher data under Data directory
- Fixed initialization under Win9x
- Draw our own cursor
- Add logging throughout application
- Added settings screen
- Added miniz and sqlite vendor libs (with minor modifications to support 9x)
- Fix game extraction
- Cache media files under Data/Media directory
- Fix keyboard input
- Add scrollbars
- Add install options modal
- Add support for multiple install directories
2026-05-23 16:57:11 -05:00
Pat Hartl
74bb5ad1ec Added contributors section 2026-05-21 21:38:53 -05:00
Pat Hartl
6b9ec870a2 Download queue, SQLite, Settings.yml
- Added download queue
- Reimplemented settings using Settings.yml matching the schema of other launchers
- Added SQLite support and storing game information in database
- Improved image caching
- Add uninstall
2026-05-21 21:38:13 -05:00
Pat Hartl
8f41eb9536 Reworked legacy launcher with common library 2026-05-20 21:21:26 -05:00
Pat Hartl
18fc3c291b Updates to release notes 2026-05-19 18:17:29 -05:00
Pat Hartl
df2cf665a4 Updated documentation for v2.1.0-rc1 2026-05-19 01:42:28 -05:00
Pat Hartl
0d1ee04533 Debounce image loading/unloading, decode images at rendered dimension, cache some image loading
Some checks failed
LANCommander Release / build_launcher_avalonia_linux_x64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_osx_arm64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_osx_x64 (push) Has been skipped
LANCommander Release / build_launcher_avalonia_win_x64 (push) Has been skipped
LANCommander Release / build_release (push) Has been skipped
LANCommander Release / prep (push) Failing after 22s
LANCommander Release / build_server_linux_arm64 (push) Has been skipped
LANCommander Release / build_server_linux_x64 (push) Has been skipped
LANCommander Release / build_server_osx_arm64 (push) Has been skipped
LANCommander Release / build_server_osx_x64 (push) Has been skipped
LANCommander Release / build_server_win_arm64 (push) Has been skipped
LANCommander Release / build_server_win_x64 (push) Has been skipped
2026-05-18 20:07:54 -05:00
Pat Hartl
909d4878d4 Load library in background 2026-05-18 20:06:51 -05:00
Pat Hartl
50987309e2 Fix package icon reference 2026-05-18 18:46:21 -05:00
Pat Hartl
814c39860e Remove file committed with invalid backslash path 2026-05-18 18:13:55 -05:00
Pat Hartl
b52f83df1e Add repeatable options with list type 2026-05-18 22:04:03 +00:00
Pat Hartl
2c58c12ec6 Fix closing of upload dialog when file selected 2026-05-18 22:02:14 +00:00
Pat Hartl
4e17700e51 Alert when error starting install 2026-05-18 01:14:05 -05:00
Pat Hartl
fe90c007c9 Fix infinite loop in mapping for API 2026-05-17 21:45:29 -05:00
Pat Hartl
6575b2eb20 Fix games with tools not working in depot 2026-05-17 20:39:15 -05:00
Pat Hartl
8772b3a000 Add Discord rich presence 2026-05-17 20:38:50 -05:00
Pat Hartl
0200a6df5c Add package as a valid script type for redistributables 2026-05-17 13:53:59 -05:00
Pat Hartl
c5d6d88c0b Disable NetBeauty on ARM64 2026-05-17 13:08:01 -05:00
Pat Hartl
37dec439ae Remove Photino launcher from CI 2026-05-17 12:56:43 -05:00
akifreak
f6fe755277 Refresh server list UI and clean up event subscription
Call StateHasChanged when a new server is discovered so the list
updates immediately. Unsubscribe from BeaconClient.OnBeaconResponse
in Dispose to prevent callbacks firing after the component is torn down.
2026-05-17 09:53:44 +02:00
akifreak
d6ea7936b1 Forward probe beacon responses to BeaconClient event 2026-05-17 09:53:44 +02:00
akifreak
ae144043f3 Harden DiscoveryProbe receive callback error handling
Split the single try/catch into three isolated blocks so that:
- ObjectDisposedException on EndReceiveFrom stops the loop cleanly
- Other socket errors still re-arm the socket to keep listening
- Non-JSON packets (e.g. loopback of our own probe) are silently
  dropped without killing the receive loop
2026-05-17 09:53:44 +02:00
akifreak
8569b56ffe Use socket directly for broadcast send in DiscoveryProbe
Switch SendAsync from UdpClient.SendAsync to Socket.SendTo, and enable
the broadcast socket option before binding. The UdpClient path was not
reliably sending to broadcast addresses on all platforms.
2026-05-17 09:46:29 +02:00
Pat Hartl
97fdb68899 Add display names to option choices 2026-05-17 01:21:05 -05:00
Pat Hartl
c7f0423a8c Run ARM64 builds on ARM64 runners 2026-05-17 00:24:20 -05:00
Pat Hartl
fa5cc99511 Merge branch 'feature/redistributable-options' 2026-05-17 00:03:10 -05:00
Pat Hartl
38bd25513e Add Redistributable options to script editor 2026-05-16 19:57:59 -05:00
Pat Hartl
e84c8a9c7a Ensure that redistributable options persist in export/import 2026-05-16 19:38:43 -05:00
Pat Hartl
4fce064dd4 Update option documentation, add run wrapper script docs 2026-05-16 19:29:24 -05:00
Pat Hartl
15bc84016a Add UI for editing option schema
- Moves Redistributables for games to separate panel
- Add option override for games
- Add Monaco completions for option schema editing
- Add UI for editing options for a redistributable
- Add config importing to translate from INI, JSON, XML, etc to redist option schema
2026-05-16 19:28:04 -05:00
Pat Hartl
e5a8d39bf3 Replace INI parsing 2026-05-16 18:14:41 -05:00
Pat Hartl
c53a99b0ac Fix generated migrations 2026-05-16 17:16:16 -05:00
Pat Hartl
f3cdc4b5ab Better feature layout for HQ 2026-05-16 17:15:54 -05:00
Pat Hartl
9f37dc7b56 Adjust external ID layout 2026-05-16 17:15:40 -05:00
Pat Hartl
639aa2cede RunWrapper script type option 2026-05-15 00:23:57 -05:00
Pat Hartl
ecdc5f9ce3 Add options to redistributables
Options are defined schema that the redistributable will allow a game to customize / override. This will be useful for install scripts on a redistributable. It opens up the opportunity to define a redistributable for something such as dgVoodoo and override options on a per-game basis without having to edit the config manually in the game's scripts.
2026-05-15 00:14:46 -05:00
github-actions[bot]
c23c89187d Refresh launcher visual baselines from CI run 25893538204 2026-05-15 00:33:01 +00:00
Pat Hartl
1f60ccdeca Test workflows 2026-05-14 19:27:23 -05:00
Pat Hartl
8aa119e53a Tests for Avalonia launcher 2026-05-14 19:26:04 -05:00
Pat Hartl
fa294bec4d Merge remote-tracking branch 'origin/main' 2026-05-14 17:23:20 -05:00
Pat Hartl
be19fcf1bc WIP 2.1.0-rc1 release notes 2026-05-14 17:20:43 -05:00
Pat Hartl
e56371cd7c Add support for external IDs beyond IGDB 2026-05-14 00:30:45 -05:00
Pat Hartl
5ad55faa5a Add support for tools 2026-05-14 00:29:48 -05:00
Pat Hartl
52679c538a Inital Win9x launcher commit 2026-05-13 02:00:14 +00:00
Pat Hartl
90220b69ac Fix Avalonia token redemption for SSO 2026-05-12 19:57:43 -05:00
Pat Hartl
ace6783de8 Code formatting 2026-05-12 17:47:03 -05:00
Pat Hartl
2a98a85de0 Fix OIDC auth handling, add external provider support to Avalonia launcher 2026-05-12 17:21:53 -05:00
Pat Hartl
ccf4c5f57e Allow logging in via token redemption 2026-05-11 22:29:41 -05:00
Pat Hartl
19459f767b Include all cmdlets in completion 2026-05-11 04:06:51 -05:00
Pat Hartl
62b8bf332f Use correct storage location for packaging 2026-05-11 04:06:32 -05:00
Pat Hartl
59e64bb672 Fix link 2026-05-11 04:06:16 -05:00
Pat Hartl
32e0bfd3b6 Fix state changes when linking to HQ 2026-05-10 21:38:55 -05:00
Pat Hartl
36444d39e9 Add completions for built-in PowerShell cmdlets 2026-05-10 20:56:17 -05:00
Pat Hartl
b5e93cbb88 Fix completion rendering 2026-05-10 19:53:41 -05:00
Pat Hartl
885032547b Improve script editor with context-aware completions, validation, and UX
- Filter variable completions and hover by script type so only relevant variables appear (e.g. $AllocatedKey only in KeyChange scripts)
- Add inline validation warnings for package scripts missing New-Package and for variables used outside their valid script type
- Extend debug console to support tools and redistributables, add stop button and elapsed time display
- Disable minimap, enable bracket pair colorization and word wrap
- Add snippet insertion via Monaco snippet controller with selection replacement support
- Add script templates that auto-populate on new script creation
- Add Variables dropdown in editor toolbar based on current script type
- Change Add Script button to type-selection dropdown, auto-populate script name from type, remove Type field from editor dialog
- Move Requires Admin checkbox to toolbar row, move toolbar and editor outside Form to prevent dropdown clicks from closing the modal
- Set MaskClosable=false on script editor modals so Monaco autocomplete clicks don't dismiss the dialog
2026-05-10 19:33:48 -05:00
Pat Hartl
302667e544 Remove hard-coded variable snippets 2026-05-10 19:22:26 -05:00
Pat Hartl
a256ea6406 Log script errors, avoid silent failures in package scripts 2026-05-10 12:14:32 -05:00
Pat Hartl
b3813d7c3c Add cmdlet for specifying new package details 2026-05-10 12:13:43 -05:00
Pat Hartl
4729304ee4 Cache media entries, add skeletons for carousels 2026-05-10 01:44:23 -05:00
Pat Hartl
fcfdd2cfd8 Dispose previous search debounce cancellation token 2026-05-09 19:42:59 -05:00
Pat Hartl
e5815a7eb8 Implement IDisposable for chat 2026-05-09 19:42:41 -05:00
Pat Hartl
16cf4dbcce Share HTTP client across server pings 2026-05-09 19:42:09 -05:00
Pat Hartl
823b543519 Dispose cancellation token after game stopped 2026-05-09 19:41:52 -05:00
Pat Hartl
7116b2e523 Dispose HTTP client on provider dispose 2026-05-09 19:41:24 -05:00
Pat Hartl
d873526833 Dispose RpcClient 2026-05-09 19:40:58 -05:00
Pat Hartl
520cf66038 Share HTTP client across sessions 2026-05-09 19:40:49 -05:00
Pat Hartl
a92104703b Clean up video players when end reached 2026-05-09 19:40:18 -05:00
Pat Hartl
0d8e20e9c1 Generate PowerShell completions in CI before package 2026-05-08 09:41:08 -05:00
Pat Hartl
8bf9895b51 Load screenshots / videos separately in the carousel 2026-05-08 02:28:24 -05:00
Pat Hartl
402af57f79 Enhance PowerShell completions with generated type definitions 2026-05-08 02:13:36 -05:00
Pat Hartl
59795ff222 Add code completion for built-in cmdlets and variables 2026-05-08 02:02:33 -05:00
Pat Hartl
c1f0f4c7db Cleanup import files after completion 2026-05-07 23:40:17 -05:00
Pat Hartl
0e978dabc3 Fix orphaned files tool 2026-05-07 23:39:58 -05:00
Pat Hartl
2ca08fdec5 Fix archives not downloading for redists 2026-05-07 23:39:46 -05:00
Pat Hartl
92f863246d Don't delete redist files 2026-05-07 23:39:28 -05:00
Pat Hartl
70557e4a9b Fix script working directory for games 2026-05-07 23:12:15 -05:00
Pat Hartl
879885c640 Add alert message if action failed to start 2026-05-07 23:12:00 -05:00
Pat Hartl
04fbc12615 Fix SteamCMD login when SteamGuard is enabled 2026-05-07 21:01:01 -05:00
Pat Hartl
e5b2a7173c Fix Steam API model parsing 2026-05-07 17:54:45 -05:00
Pat Hartl
640f5f00b8 Fix SteamDeckCompatibility deserialization 2026-05-07 02:23:56 -05:00
Pat Hartl
8d25b20c62 Add LANCommander HQ metadata/media provider 2026-05-07 01:11:41 -05:00
Pat Hartl
ba95896716 Support grabbing animated images from SteamGridDb 2026-05-01 02:20:24 -05:00
Pat Hartl
63ac3d1361 Automatically convert APNG to video 2026-05-01 01:14:13 -05:00
Pat Hartl
7e72df0651 Fix media grabbing 2026-05-01 01:10:58 -05:00
Pat Hartl
1efbde33d7 Allow multiple uploading for screenshots/videos. Add support for animated covers. 2026-04-30 23:47:15 -05:00
Pat Hartl
5b434daf8a Render description as markdown 2026-04-30 02:53:19 -05:00
Pat Hartl
82a41ed031 Add lightbox control for screenshots, videos, and manuals 2026-04-30 02:39:12 -05:00
Pat Hartl
f0b85de93f Add multiple select support for media grabber 2026-04-30 02:16:17 -05:00
Pat Hartl
8563f0b291 Merge remote-tracking branch 'origin/main' 2026-04-28 01:50:11 -05:00
Pat Hartl
232f86ba85 Refactor launcher game importing
- Game importing happens on a separate thread to avoid UI blocking
- Server requests per-game are done in parallel to cut down on import times
- Media downloading is done in parallel
- Library import progress shown in title bar
- Enabled WAL mode for SQLite for better performance
- Fix potential issues with deferred imports causing infinite loops or lockups
2026-04-27 22:45:02 -05:00
Pat Hartl
71de97e04f FIx preview page uploader. Add progress when downloading videos. Fix large video downloads. 2026-04-27 17:58:48 -05:00
Pat Hartl
509241770e Merge remote-tracking branch 'origin/main' 2026-04-26 13:17:07 -05:00
Pat Hartl
f9abb08141 Stream video using new endpoint, adjust video overlay UI 2026-04-26 02:14:45 -05:00
Pat Hartl
f03b8da874 Merge branch 'main' of https://github.com/LANCommander/LANCommander 2026-04-26 01:19:36 -05:00
Pat Hartl
d2da56ad11 Add streaming endpoint for media 2026-04-26 01:19:31 -05:00
Pat Hartl
8de94803e3 Bundle libvlc in Linux builds 2026-04-25 23:42:05 -05:00
Pat Hartl
e448ce69fb Fix missing RatingService 2026-04-25 14:44:12 -05:00
Pat Hartl
b677328a25 Fix missing depot service 2026-04-25 13:59:24 -05:00
Pat Hartl
f05a32c907 Add ffmpeg/yt-dlp checks / installers in settings 2026-04-24 02:26:09 -05:00
Pat Hartl
7d862e5dc5 Ensure yt-dlp and ffmpeg are installed via Docker 2026-04-24 02:06:30 -05:00
Pat Hartl
3fe6bea7e5 Added "Preview" edit view, flesh out media picker
- Added sort order to media for screenshots and videos
- Added new "Preview" pane to game editor. Simulates the game details view in the launcher and allows for in-place media upload / grabbing
- Added abstractions for media grabbing
- Added subtitle to media picker dialog to indicate which services provide which assets
- Added preview for videos
- Made media searching faster overall
2026-04-24 02:05:56 -05:00
Pat Hartl
4362e7c22f Add package versions 2026-04-23 09:35:45 -05:00
Pat Hartl
9f8ce4895a WIP video and screenshot carousel in game details 2026-04-23 03:06:27 -05:00
Pat Hartl
4c5d126d73 Show game icon in footer progress 2026-04-23 03:05:45 -05:00
Pat Hartl
adfb593cde Add "Modify" option to game action bar dropdown 2026-04-23 03:05:34 -05:00
Pat Hartl
f49905983f Fix installs getting locked after install, uninstall, then install again 2026-04-22 22:43:21 -05:00
Pat Hartl
8cf758c88d Rework install dialog 2026-04-22 20:14:56 -05:00
Pat Hartl
f2be3a094f Implement cancel button as IconButton 2026-04-22 20:14:40 -05:00
Pat Hartl
a1aba863c8 Implement proper route navigation in Avalonia application
- Introduces transitions in between views
- Adds proper routing with history stack
- Replaces hacky "go back" navigation code with routing navigation
- Filters/scroll position are maintained on navigation
2026-04-22 19:37:44 -05:00
Aaron Powell
77b0f04e4d Fix file upload: use FileChooser API for Blazor InputFile compatibility
Blazor Server's InputFile component doesn't reliably process synthetic
FileList objects from Playwright's SetInputFilesAsync on headless Linux.
Switch to clicking the upload label to trigger the native file dialog,
then intercept it with Playwright's FileChooser API. This triggers a
real browser file selection that Blazor always recognizes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-08 12:56:49 +11:00
Aaron Powell
0c3ed7cb77 Capture screenshots on test completion for CI diagnostics
- Add ScreenshotHelper that captures full-page screenshots for every test
- Screenshots are named with the full test display name for easy correlation
- Save to SCREENSHOT_DIR env var (CI) or bin/Screenshots/ (local)
- Add ITestOutputHelper to all 10 test classes for test name extraction
- Screenshots are included in the existing ui-test-results artifact upload

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-08 12:33:49 +11:00
Aaron Powell
952af65b2c Fix CI: decouple GameEditTests from import, add test-reporter
- GameEditTests now use a game seeded via the service layer in
  ConfiguredServerFixture instead of importing via the UI.
  This eliminates the Blazor InputFile compatibility issue on Linux CI.
- GamesPage.ImportGameAsync uses SetInputFilesAsync with retry and
  manual change event dispatch for Blazor InputFile compatibility.
- Add dorny/test-reporter to display test results in PR summary.
- Add checks/pull-requests write permissions for test-reporter.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-08 12:07:52 +11:00
Aaron Powell
951c1a08a0 Fix game import file upload for headless Linux CI
Use Playwright's FileChooser API instead of SetInputFilesAsync on the
hidden file input. AntDesign's Upload component JS interop doesn't
recognize files set directly on the hidden input in headless Linux,
leaving the Upload button disabled. The FileChooser approach intercepts
the native file dialog, which AntDesign processes normally.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-08 10:05:28 +11:00
Aaron Powell
f3ea535e0d Fix CI: add Node.js setup for UI project webpack build
The LANCommander.UI project runs 'npm run package' during build,
which requires Node.js and npm dependencies to be installed first.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-08 09:39:01 +11:00
Aaron Powell
373ad2464f Add UI tests job to PR workflow
Runs Playwright UI tests on ubuntu-latest with Chromium.
Only builds and tests the LANCommander.Server.UI.Tests project.
Uploads test results as artifacts for inspection on failure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-08 09:30:34 +11:00
Aaron Powell
c856a51504 Fix stack overflow on test disposal with FreshServerFixture
- Refactor FirstTimeSetupTests to use FreshServerFixture via ICollectionFixture
  instead of creating its own UITestApplicationFactory per test
- Skip _realHost.Dispose() in UITestApplicationFactory since the DI container's
  deep dependency chain causes an uncatchable native StackOverflowException
- All 62 tests pass with exit code 0 (61 pass, 1 skip)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-08 08:41:11 +11:00
Aaron Powell
0bac5e7b8b Move test .lcx file into repo under TestData
Copy OpenRCT2.lcx into TestData/ and reference via AppContext.BaseDirectory
so tests don't depend on a user-specific Downloads path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-08 08:25:45 +11:00
Aaron Powell
39ebe66c73 Add game editing UI tests with page object
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-08 08:25:44 +11:00
Aaron Powell
fd0c15bf8a Fix full test suite: use ICollectionFixture and remove Hangfire
- Switch all test classes from IClassFixture<ConfiguredServerFixture> to
  [Collection("Server")] with ICollectionFixture so a single server instance
  is shared across all test classes (avoids static DatabaseContext.Provider conflicts)
- Put FirstTimeSetupTests in its own collection since it needs an unconfigured server
- Remove Hangfire hosted services in UITestApplicationFactory to prevent
  stack overflow during process shutdown (deep DI disposal chain)
- Add graceful shutdown handling with timeout in DisposeAsync
- All 54 tests pass, 1 skipped, clean exit code 0

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-08 08:25:44 +11:00
Aaron Powell
3e6c59e384 Add game import UI tests with page object and storage location seeding
- Create GamesPage page object with NavigateAsync, GetGameCountAsync,
  IsGameVisibleAsync, ImportGameAsync, and OpenGameEditAsync methods
- Create GameImportTests with 5 tests covering empty state, import
  button visibility, LCX file import, imported game visibility, and
  game edit navigation
- Seed default storage locations (Archive, Save, Media) in
  ConfiguredServerFixture to support import dialog initialization
- Handle hidden file input upload via Playwright SetInputFilesAsync
- Scope modal interactions to .ant-modal-wrap to avoid button
  ambiguity with the page toolbar

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-08 08:25:44 +11:00
Aaron Powell
3cc9e47461 Add user management UI tests with page object
- Create UsersPage page object with navigate, search, user visibility,
  roles check, and delete methods
- Add UserManagementTests with 5 tests: admin user visibility, search,
  roles display, new user registration, and user deletion
- Fix GamesPage.cs syntax error (unchecked is a C# keyword)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-08 08:25:44 +11:00
Aaron Powell
d9d6e7a3c9 Add Settings page UI tests
Create SettingsPage page object with navigation helpers for all settings
sub-pages and SettingsTests with 9 tests covering General form elements,
Users list, Roles list, Authentication, Archives, Media, Beacon, Updates,
and Appearance settings pages.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-08 08:25:44 +11:00
Aaron Powell
7a90eb1d48 Add metadata CRUD UI tests for Tags, Genres, and Platforms
Create a reusable MetadataPage page object that encapsulates navigation,
add/edit/delete operations, and item visibility checks for any metadata
type. Add MetadataTests with 8 tests covering:
- Tags: empty state, add, edit, delete
- Genres: add, delete
- Platforms: add, delete

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-08 08:25:44 +11:00
Aaron Powell
4f528e5378 Add role management UI tests
Add Playwright-based UI tests for the Roles management page including:
- RolesPage page object with navigation, add, delete, and visibility methods
- Tests verifying Administrator role visibility
- Tests for adding and deleting custom roles
- Test confirming Administrator role cannot be deleted

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-08 08:25:44 +11:00
Aaron Powell
5e3d740b83 Refactor UI tests to use WebApplicationFactory instead of dotnet run
Replace process-based server management (ServerManager) with ASP.NET Core's
WebApplicationFactory<Program> for proper integration testing:

- Add UITestApplicationFactory with dual-host pattern (real Kestrel + dummy TestServer)
  to work around .NET 9's hard-cast to TestServer in WebApplicationFactory
- Use in-memory EF Core database with dynamic port binding (IPAddress.Loopback:0)
- Stub IVersionProvider and IGitHubService to avoid external dependencies
- Programmatically create admin user in ConfiguredServerFixture via service layer
- Remove ServerManager.cs (no longer needed)
- Skip CompleteWizardAndLogin test (requires real DB file I/O)
- 18 tests pass, 1 skipped, ~28s runtime (down from ~101s)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-08 08:25:44 +11:00
Aaron Powell
94cfd6fe18 Spike: Playwright UI automated tests for server application
Add LANCommander.Server.UI.Tests project with 19 Playwright-based UI tests
covering three key scenarios:

- First-time setup flow (4 tests): Fresh server redirect, setup wizard steps,
  database provider selection, and complete wizard-to-login flow
- Login flow (5 tests): Unauthenticated redirect, page elements, valid/invalid
  credentials, and empty credential handling
- Admin navigation (10 tests): Dashboard, sidebar menu, Games, Redistributables,
  Tools, Servers, Issues, Files, Settings pages, and Settings submenu items

Infrastructure includes:
- ServerManager: Manages server process lifecycle with data directory backup/restore
- PlaywrightFixture: Browser lifecycle management (headless Chromium)
- ConfiguredServerFixture: Shared xUnit class fixture for tests needing a
  configured server (avoids restarting server per test)
- Page objects: LoginPage, FirstTimeSetupPage, AdminDashboardPage

Key technical decisions:
- Uses IClassFixture<T> pattern to share server instances across test classes
- Disables parallel execution (tests share port 1337)
- Uses element-based waits instead of URL-based waits for Blazor SSR reliability
- Uses role-based selectors for AntDesign components (no standard label/for)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-08 08:25:44 +11:00
1224 changed files with 438755 additions and 28307 deletions

View file

@ -55,6 +55,9 @@ jobs:
with: with:
node-version: '20' node-version: '20'
- name: Generate PowerShell Completions
run: dotnet run --project ./LANCommander.CompletionGenerator/LANCommander.CompletionGenerator.csproj -- ./LANCommander.UI/Components/MonacoCodeEditor/PowerShellCompletions.g.ts
# Parallel UI builds # Parallel UI builds
- name: Build UI Components - name: Build UI Components
run: | run: |

View file

@ -56,6 +56,8 @@ jobs:
uses: actions/setup-node@v3.8.1 uses: actions/setup-node@v3.8.1
# UI # UI
- name: Generate PowerShell Completions
run: dotnet run --project ./LANCommander.CompletionGenerator/LANCommander.CompletionGenerator.csproj -- ./LANCommander.UI/Components/MonacoCodeEditor/PowerShellCompletions.g.ts
- run: cd ./LANCommander.UI; npm install; npm run package - run: cd ./LANCommander.UI; npm install; npm run package
- run: cd ./LANCommander.Server; npm install - run: cd ./LANCommander.Server; npm install

View file

@ -124,19 +124,6 @@ jobs:
build_platform: Windows build_platform: Windows
build_configuration: Debug build_configuration: Debug
build_launcher_win_x64:
needs: [prep]
if: needs.prep.outputs.changed == 'true'
uses: ./.github/workflows/LANCommander.Launcher.yml
with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: win-x64
build_arch: x64
build_platform: Windows
build_configuration: Debug
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
# 3) FINALIZE: if changes == 'true', gather artifacts + push Docker:development # 3) FINALIZE: if changes == 'true', gather artifacts + push Docker:development
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
@ -145,7 +132,6 @@ jobs:
- prep - prep
- build_server_linux_x64 - build_server_linux_x64
- build_server_win_x64 - build_server_win_x64
- build_launcher_win_x64
if: needs.prep.outputs.changed == 'true' if: needs.prep.outputs.changed == 'true'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -247,12 +233,6 @@ jobs:
name: LANCommander.Server-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip name: LANCommander.Server-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip
path: artifacts path: artifacts
- name: Download Launcher Windows x64
uses: actions/download-artifact@v4
with:
name: LANCommander.Launcher-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip
path: artifacts
- name: Delete existing release assets - name: Delete existing release assets
uses: dev-drprasad/delete-tag-and-release@v1.1 uses: dev-drprasad/delete-tag-and-release@v1.1
with: with:
@ -270,6 +250,5 @@ jobs:
files: | files: |
artifacts/LANCommander.Server-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip artifacts/LANCommander.Server-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip
artifacts/LANCommander.Server-Linux-x64-v${{ needs.prep.outputs.version_tag }}.zip artifacts/LANCommander.Server-Linux-x64-v${{ needs.prep.outputs.version_tag }}.zip
artifacts/LANCommander.Launcher-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -1,123 +0,0 @@
name: LANCommander Launcher Avalonia Build
on:
workflow_dispatch:
workflow_call:
inputs:
version_semver:
description: "Semantic Version"
required: true
type: string
version_tag:
description: 'Version Tag'
required: true
type: string
build_dotnet_version:
description: 'Build .NET Version'
required: true
type: string
build_runtime:
description: 'Build Runtime'
required: false
type: string
default: 'win-x64'
build_arch:
description: 'Build Architecture'
required: false
type: string
default: 'x64'
build_platform:
description: 'Build Platform'
required: false
type: string
default: 'Windows'
build_configuration:
description: 'Build Configuration (Debug/Release)'
required: false
type: string
default: 'Release'
permissions:
contents: write
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/package
jobs:
build:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
# Checkout code
- uses: actions/checkout@v4
with:
submodules: true
# .NET Setup
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ inputs.build_dotnet_version }}
- name: Restore dependencies
run: dotnet restore --locked-mode
- name: Publish Avalonia Launcher
run: |
# Strip leading 'v' if present
RAW_VERSION="${{ inputs.version_tag }}" # e.g. v2.0.0-rc1
SEMVER="${RAW_VERSION#v}" # 2.0.0-rc1
# Numeric part only for Assembly/FileVersion
NUMERIC="${SEMVER%%-*}" # 2.0.0
ASSEMBLY_VERSION="${NUMERIC}.0" # 2.0.0.0
echo "SEMVER=$SEMVER"
echo "ASSEMBLY_VERSION=$ASSEMBLY_VERSION"
dotnet publish "./LANCommander.Launcher.Avalonia/LANCommander.Launcher.Avalonia.csproj" \
-c "${{ inputs.build_configuration }}" \
--self-contained \
--runtime "${{ inputs.build_runtime }}" \
-p:Version="$SEMVER" \
-p:AssemblyVersion="$ASSEMBLY_VERSION" \
-p:FileVersion="$ASSEMBLY_VERSION" \
-p:InformationalVersion="$SEMVER" \
-p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
-p:IncludeAllContentForSelfExtract=true \
-p:EnableCompressionInSingleFile=true \
-p:DebugType=embedded
- name: Bundle and Clean
shell: pwsh
run: |
$BasePath = "LANCommander.Launcher.Avalonia/bin/${{ inputs.build_configuration }}/net10.0/${{ inputs.build_runtime }}/publish"
# Remove unnecessary files
$PathsToRemove = @(
'*.pdb'
)
foreach ($path in $PathsToRemove) {
Remove-Item -Recurse -Force -ErrorAction Continue "$BasePath/$path"
}
- name: Compress Build Output
shell: pwsh
run: |
$compress = @{
Path = "LANCommander.Launcher.Avalonia/bin/${{ inputs.build_configuration }}/net10.0/${{ inputs.build_runtime }}/publish/*"
DestinationPath = "LANCommander.Launcher.Avalonia-${{ inputs.build_platform }}-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.zip"
CompressionLevel = "Fastest"
}
Compress-Archive @compress
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
path: LANCommander.Launcher.Avalonia-${{ inputs.build_platform }}-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.zip
name: LANCommander.Launcher.Avalonia-${{ inputs.build_platform }}-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.zip

View file

@ -0,0 +1,125 @@
name: LANCommander.Launcher.Legacy
on:
push:
branches: [main, feature/legacy-launcher]
paths:
- 'LANCommander.Launcher.Legacy/**'
- 'LANCommander.SDK.Cpp/**'
- '.github/workflows/LANCommander.Launcher.Legacy.yml'
pull_request:
branches: [main]
paths:
- 'LANCommander.Launcher.Legacy/**'
- 'LANCommander.SDK.Cpp/**'
- '.github/workflows/LANCommander.Launcher.Legacy.yml'
workflow_dispatch:
jobs:
build-win9x:
name: Build (Win9x / MinGW-w64 i686)
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout
uses: actions/checkout@v4
# ---------------------------------------------------------------
# MSYS2 with MinGW32 (i686) toolchain
# ---------------------------------------------------------------
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
update: false
install: >-
mingw-w64-i686-gcc
mingw-w64-i686-cmake
mingw-w64-i686-make
make
# ---------------------------------------------------------------
# Vendor dependencies (cJSON, miniz, Allegro 4 source)
# ---------------------------------------------------------------
- name: Download vendor dependencies
shell: pwsh
run: ./setup-vendor.ps1
# ---------------------------------------------------------------
# Build Allegro 4 from source (static, no addons)
# ---------------------------------------------------------------
- name: Build Allegro 4
run: |
ALLEGRO_SRC="LANCommander.Launcher.Legacy/vendor/allegro4/allegro5-4.4.3.1"
ALLEGRO_BUILD="LANCommander.Launcher.Legacy/build-allegro-win9x"
ALLEGRO_PREFIX="$(pwd)/LANCommander.Launcher.Legacy/allegro4-win9x"
cmake -S "$ALLEGRO_SRC" -B "$ALLEGRO_BUILD" \
-G "MinGW Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$ALLEGRO_PREFIX" \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DSHARED=OFF \
-DWANT_EXAMPLES=OFF \
-DWANT_TOOLS=OFF \
-DWANT_TESTS=OFF \
-DWANT_ALLEGROGL=OFF \
-DWANT_LOADPNG=OFF \
-DWANT_LOGG=OFF \
-DWANT_JPGALLEG=OFF \
-DWANT_FRAMEWORKS=OFF
mingw32-make -C "$ALLEGRO_BUILD" -j$(nproc)
mingw32-make -C "$ALLEGRO_BUILD" install
# ---------------------------------------------------------------
# Build the launcher
# ---------------------------------------------------------------
- name: Build launcher
run: |
LAUNCHER_DIR="LANCommander.Launcher.Legacy"
LAUNCHER_BUILD="$LAUNCHER_DIR/build-win9x"
ALLEGRO_PREFIX="$(pwd)/$LAUNCHER_DIR/allegro4-win9x"
cmake -S "$LAUNCHER_DIR" -B "$LAUNCHER_BUILD" \
-G "MinGW Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DALLEGRO_STATIC=ON \
-DTARGET_WIN9X=ON \
-DALLEGRO_ROOT="$ALLEGRO_PREFIX"
mingw32-make -C "$LAUNCHER_BUILD" -j$(nproc)
# ---------------------------------------------------------------
# Package
# ---------------------------------------------------------------
- name: Package artifacts
run: |
mkdir -p out-win9x
LAUNCHER_EXE=$(find LANCommander.Launcher.Legacy/build-win9x -name "launcher.exe" | head -1)
cp "$LAUNCHER_EXE" out-win9x/LANCommander.exe
strip out-win9x/LANCommander.exe
# Bundle GDI+ redistributable (MinGW CRT is statically linked)
if [ -f "$MINGW_PREFIX/bin/gdiplus.dll" ]; then
cp "$MINGW_PREFIX/bin/gdiplus.dll" out-win9x/
echo "Bundled: gdiplus.dll"
fi
# Show PE info for verification
objdump -p out-win9x/LANCommander.exe | grep -i "Version\|Subsystem" || true
echo ""
ls -lh out-win9x/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: LANCommander-Legacy-Win9x
path: out-win9x/
if-no-files-found: error

View file

@ -0,0 +1,127 @@
name: LANCommander Launcher Tests — PR Visual Diff Comment
on:
workflow_call:
inputs:
pr_number:
description: 'Pull request number to comment on'
required: true
type: string
artifact_run_id:
description: 'Workflow run ID that produced the launcher-visual-artifacts artifact'
required: true
type: string
permissions:
contents: write # push diff PNGs to the gh-visual-diffs branch
pull-requests: write # post / update the comment
jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Checkout for branch push
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download visual artifacts
uses: actions/download-artifact@v4
with:
name: launcher-visual-artifacts
path: visual
run-id: ${{ inputs.artifact_run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Read regression manifest
id: manifest
run: |
if [ ! -f visual/regressions.json ]; then
echo "no manifest — assuming no visual run"
echo "count=0" >> "$GITHUB_OUTPUT"
exit 0
fi
count=$(jq '.regressed_count' visual/regressions.json)
echo "count=$count" >> "$GITHUB_OUTPUT"
- name: Skip when no regressions
if: steps.manifest.outputs.count == '0'
run: echo "No visual regressions; nothing to comment."
# Push diff/actual/baseline PNGs to an orphan branch so raw.githubusercontent.com
# URLs render inline in the PR comment. One folder per (PR, run).
- name: Push diffs to gh-visual-diffs branch
if: steps.manifest.outputs.count != '0'
env:
PR: ${{ inputs.pr_number }}
RUN: ${{ inputs.artifact_run_id }}
run: |
set -euo pipefail
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
# Worktree off an orphan branch so we never touch the source tree.
if git ls-remote --exit-code --heads origin gh-visual-diffs >/dev/null; then
git fetch origin gh-visual-diffs
git worktree add /tmp/visual gh-visual-diffs
else
git worktree add --detach /tmp/visual
cd /tmp/visual
git checkout --orphan gh-visual-diffs
git rm -rf . 2>/dev/null || true
cd -
fi
DEST="/tmp/visual/pr-${PR}/run-${RUN}"
mkdir -p "$DEST"
cp -r visual/diffs "$DEST/" 2>/dev/null || true
cp -r visual/screenshots "$DEST/" 2>/dev/null || true
cp -r visual/baselines "$DEST/" 2>/dev/null || true
cd /tmp/visual
git add -A
git -c user.name=github-actions -c user.email=github-actions@github.com \
commit -m "Visual diffs for PR #${PR} run ${RUN}"
git push origin gh-visual-diffs
- name: Post / update PR comment
if: steps.manifest.outputs.count != '0'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR: ${{ inputs.pr_number }}
RUN: ${{ inputs.artifact_run_id }}
REPO: ${{ github.repository }}
MARKER: '<!-- launcher-visual-diff-comment -->'
run: |
set -euo pipefail
base="https://raw.githubusercontent.com/${REPO}/gh-visual-diffs/pr-${PR}/run-${RUN}"
body=$(mktemp)
{
echo "$MARKER"
echo "## :art: Launcher visual regressions"
echo
echo "$(jq '.regressed_count' visual/regressions.json) baseline(s) drifted in [run ${RUN}](https://github.com/${REPO}/actions/runs/${RUN})."
echo
jq -r '.regressions[] | .name' visual/regressions.json | while read -r name; do
echo "<details><summary><strong>${name}</strong></summary>"
echo
echo "| Baseline | Actual | Diff |"
echo "| --- | --- | --- |"
echo "| ![baseline](${base}/baselines/${name}.png) | ![actual](${base}/screenshots/${name}.png) | ![diff](${base}/diffs/${name}.diff.png) |"
echo
echo "</details>"
echo
done
echo "_If these changes are intentional, run the **Update Visual Baselines** workflow to refresh._"
} >> "$body"
# Find an existing comment with our marker; update it if present.
existing=$(gh api repos/${REPO}/issues/${PR}/comments --paginate \
--jq ".[] | select(.body | startswith(\"${MARKER}\")) | .id" | head -1)
if [ -n "$existing" ]; then
gh api -X PATCH "repos/${REPO}/issues/comments/${existing}" --field "body=@${body}"
else
gh api -X POST "repos/${REPO}/issues/${PR}/comments" --field "body=@${body}"
fi

View file

@ -0,0 +1,91 @@
name: LANCommander Launcher Tests — Update Visual Baselines
# Operator-triggered: re-renders every visual test on the CI host and commits the
# new screenshots over the committed Baselines/. Only runs when a human dispatches
# it from the Actions tab — never on push or PR — so accidental drift can't slip in.
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to commit refreshed baselines to'
required: true
type: string
default: 'main'
build_dotnet_version:
description: 'Build .NET Version'
required: false
type: string
default: '9.0.102'
permissions:
contents: write
jobs:
refresh:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
submodules: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ inputs.build_dotnet_version }}
- name: Install rendering prereqs
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
libfontconfig1 libfreetype6 libice6 libsm6 libx11-6 libxcb1 libxext6
- name: Restore + build visual test project
run: |
dotnet restore LANCommander.Launcher.Tests/LANCommander.Launcher.Tests.csproj
dotnet build LANCommander.Launcher.Tests/LANCommander.Launcher.Tests.csproj -c Debug --no-restore
# Run visual tests, ignore failures (regressions are expected here — that's
# the whole point of refreshing). Then promote every captured screenshot
# to be the new baseline.
- name: Capture fresh screenshots
continue-on-error: true
run: |
dotnet test LANCommander.Launcher.Tests/LANCommander.Launcher.Tests.csproj \
-c Debug --no-build --no-restore \
--logger "console;verbosity=normal"
- name: Promote captures to baselines
run: |
set -euo pipefail
src=LANCommander.Launcher.Tests/bin/Debug/net10.0/Screenshots
dst=LANCommander.Launcher.Tests/Baselines
if [ ! -d "$src" ]; then
echo "::error::No screenshots captured at $src — visual tests didn't run."
exit 1
fi
mkdir -p "$dst"
cp -v "$src"/*.png "$dst"/
echo "## Updated baselines" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
ls -1 "$dst"/*.png | xargs -n1 basename | sed 's/^/- /' >> "$GITHUB_STEP_SUMMARY"
- name: Commit + push refreshed baselines
run: |
set -euo pipefail
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
if git diff --quiet -- LANCommander.Launcher.Tests/Baselines; then
echo "Baselines unchanged — nothing to commit."
exit 0
fi
git add LANCommander.Launcher.Tests/Baselines
git commit -m "Refresh launcher visual baselines from CI run ${GITHUB_RUN_ID}"
git push origin HEAD:${{ inputs.branch }}

View file

@ -0,0 +1,170 @@
name: LANCommander Launcher Tests
on:
workflow_call:
inputs:
build_dotnet_version:
description: 'Build .NET Version'
required: true
type: string
outputs:
visual_diff_count:
description: 'Number of visual baselines that regressed in this run'
value: ${{ jobs.test.outputs.visual_diff_count }}
workflow_dispatch:
inputs:
build_dotnet_version:
description: 'Build .NET Version'
required: false
type: string
default: '9.0.102'
permissions:
contents: read
jobs:
test:
name: Run Launcher Tests
runs-on: ubuntu-latest
outputs:
visual_diff_count: ${{ steps.summarize.outputs.visual_diff_count }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ inputs.build_dotnet_version }}
# Avalonia headless rendering uses Skia + the Inter font. Install
# font + GPU prereqs so screenshots render consistently.
- name: Install rendering prereqs
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
libfontconfig1 libfreetype6 libice6 libsm6 libx11-6 libxcb1 libxext6
- name: Restore
run: dotnet restore
# ---- Unit + integration test projects ---------------------------------
# Services.Tests and IntegrationTests build cleanly without the
# Server/UI npm+pwsh chain. Launcher.Tests likewise just needs Skia.
- name: Build test projects
run: |
dotnet build LANCommander.Launcher.Services.Tests/LANCommander.Launcher.Services.Tests.csproj -c Debug --no-restore
dotnet build LANCommander.Launcher.IntegrationTests/LANCommander.Launcher.IntegrationTests.csproj -c Debug --no-restore
dotnet build LANCommander.Launcher.Tests/LANCommander.Launcher.Tests.csproj -c Debug --no-restore
- name: Run Services unit tests
run: |
dotnet test LANCommander.Launcher.Services.Tests/LANCommander.Launcher.Services.Tests.csproj \
-c Debug --no-build --no-restore \
--logger "trx;LogFileName=services.trx" \
--logger "console;verbosity=normal" \
--results-directory test-results \
--collect:"XPlat Code Coverage"
- name: Run integration tests
run: |
dotnet test LANCommander.Launcher.IntegrationTests/LANCommander.Launcher.IntegrationTests.csproj \
-c Debug --no-build --no-restore \
--logger "trx;LogFileName=integration.trx" \
--logger "console;verbosity=normal" \
--results-directory test-results \
--collect:"XPlat Code Coverage"
# Visual tests are continued-on-error so a baseline regression doesn't
# mask any earlier failure and so we always reach the artifact-upload
# + summary steps below. The summary step re-asserts the failure for CI.
- name: Run visual tests
id: visual_tests
continue-on-error: true
run: |
dotnet test LANCommander.Launcher.Tests/LANCommander.Launcher.Tests.csproj \
-c Debug --no-build --no-restore \
--logger "trx;LogFileName=visual.trx" \
--logger "console;verbosity=normal" \
--results-directory test-results
# ---- Visual artifact collection --------------------------------------
# Aggregate every screenshot + diff PNG into top-level folders so the
# PR-comment job downstream can find them by predictable name.
- name: Collect visual artifacts
if: always()
run: |
mkdir -p visual/screenshots visual/diffs visual/baselines
cp -r LANCommander.Launcher.Tests/bin/Debug/net10.0/Screenshots/. visual/screenshots/ 2>/dev/null || true
cp -r LANCommander.Launcher.Tests/bin/Debug/net10.0/Diffs/. visual/diffs/ 2>/dev/null || true
cp -r LANCommander.Launcher.Tests/Baselines/. visual/baselines/ 2>/dev/null || true
- name: Summarize visual diffs
id: summarize
if: always()
run: |
shopt -s nullglob
diffs=(visual/diffs/*.diff.png)
count=${#diffs[@]}
echo "visual_diff_count=$count" >> "$GITHUB_OUTPUT"
echo "## Visual test summary" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "$count baseline(s) regressed." >> "$GITHUB_STEP_SUMMARY"
# JSON manifest the PR-comment job consumes
python3 - "$count" <<'PY' > visual/regressions.json
import json, os, sys
count = int(sys.argv[1])
diffs = sorted(os.listdir("visual/diffs")) if os.path.isdir("visual/diffs") else []
data = {
"regressed_count": count,
"regressions": [
{
"name": d.replace(".diff.png", ""),
"diff": f"visual/diffs/{d}",
"actual": f"visual/screenshots/{d.replace('.diff.png', '.png')}",
"baseline": f"visual/baselines/{d.replace('.diff.png', '.png')}",
}
for d in diffs
],
}
print(json.dumps(data, indent=2))
PY
cat visual/regressions.json
- name: Upload visual artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: launcher-visual-artifacts
path: |
visual/screenshots/**
visual/diffs/**
visual/baselines/**
visual/regressions.json
if-no-files-found: warn
retention-days: 14
- name: Upload TRX + coverage
if: always()
uses: actions/upload-artifact@v4
with:
name: launcher-test-results
path: test-results/**
if-no-files-found: warn
retention-days: 14
# Re-assert the visual test outcome so CI fails when baselines diverge,
# after artifacts are guaranteed uploaded.
- name: Fail if visual tests regressed
if: always() && steps.visual_tests.outcome == 'failure'
run: |
echo "::error::Visual tests reported regressions. See the launcher-visual-artifacts artifact."
exit 1

View file

@ -45,27 +45,18 @@ env:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ${{ inputs.build_platform == 'Linux' && inputs.build_arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps: steps:
- uses: frabert/replace-string-action@v2
name: Swap Path Backslashes
id: swap_path_backslashes
with:
string: '${{ github.workspace }}'
pattern: '\\'
replace-with: '/'
flags: g
# Checkout code # Checkout code
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
submodules: true submodules: true
# .NET Setup and Caching # .NET Setup
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v4
with: with:
@ -74,23 +65,7 @@ jobs:
- name: Restore dependencies - name: Restore dependencies
run: dotnet restore --locked-mode run: dotnet restore --locked-mode
# Node.js Setup and Caching - name: Publish Launcher
- name: Setup Node.js
uses: actions/setup-node@v3.8.1
with:
node-version: '20'
- name: Install Node Packages
run: |
npm install --prefix ./LANCommander.UI
npm install --prefix ./LANCommander.Launcher
- name: Package Frontend
run: |
npm run package --prefix ./LANCommander.UI
npm run package --prefix ./LANCommander.Launcher
- name: Publish Updater and Launcher
run: | run: |
# Strip leading 'v' if present # Strip leading 'v' if present
RAW_VERSION="${{ inputs.version_tag }}" # e.g. v2.0.0-rc1 RAW_VERSION="${{ inputs.version_tag }}" # e.g. v2.0.0-rc1
@ -103,15 +78,6 @@ jobs:
echo "SEMVER=$SEMVER" echo "SEMVER=$SEMVER"
echo "ASSEMBLY_VERSION=$ASSEMBLY_VERSION" echo "ASSEMBLY_VERSION=$ASSEMBLY_VERSION"
dotnet publish "./LANCommander.AutoUpdater/LANCommander.AutoUpdater.csproj" \
-c "${{ inputs.build_configuration }}" \
--self-contained \
--runtime "${{ inputs.build_runtime }}" \
-p:Version="$SEMVER" \
-p:AssemblyVersion="$ASSEMBLY_VERSION" \
-p:FileVersion="$ASSEMBLY_VERSION" \
-p:InformationalVersion="$SEMVER"
dotnet publish "./LANCommander.Launcher/LANCommander.Launcher.csproj" \ dotnet publish "./LANCommander.Launcher/LANCommander.Launcher.csproj" \
-c "${{ inputs.build_configuration }}" \ -c "${{ inputs.build_configuration }}" \
--self-contained \ --self-contained \
@ -119,48 +85,219 @@ jobs:
-p:Version="$SEMVER" \ -p:Version="$SEMVER" \
-p:AssemblyVersion="$ASSEMBLY_VERSION" \ -p:AssemblyVersion="$ASSEMBLY_VERSION" \
-p:FileVersion="$ASSEMBLY_VERSION" \ -p:FileVersion="$ASSEMBLY_VERSION" \
-p:InformationalVersion="$SEMVER" -p:InformationalVersion="$SEMVER" \
-p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
-p:IncludeAllContentForSelfExtract=true \
-p:EnableCompressionInSingleFile=true \
-p:DebugType=embedded
dotnet publish "./LANCommander.Launcher.CLI/LANCommander.Launcher.CLI.csproj" \ - name: Bundle libvlc (Linux)
-c "${{ inputs.build_configuration }}" \ if: inputs.build_platform == 'Linux'
--self-contained \ shell: bash
--runtime "${{ inputs.build_runtime }}" \ run: |
-p:Version="$SEMVER" \ PUBLISH_DIR="LANCommander.Launcher/bin/${{ inputs.build_configuration }}/net10.0/${{ inputs.build_runtime }}/publish"
-p:AssemblyVersion="$ASSEMBLY_VERSION" \ VLC_DIR="$PUBLISH_DIR/libvlc/${{ inputs.build_runtime }}"
-p:FileVersion="$ASSEMBLY_VERSION" \ mkdir -p "$VLC_DIR"
-p:InformationalVersion="$SEMVER"
if [ "${{ inputs.build_arch }}" = "arm64" ]; then
# Enable arm64 multiarch and add Ubuntu Ports repository so apt can
# download arm64 packages on this x64 runner.
sudo dpkg --add-architecture arm64
CODENAME=$(lsb_release -cs)
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports ${CODENAME} main restricted universe" \
| sudo tee /etc/apt/sources.list.d/ubuntu-ports-arm64.list > /dev/null
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports ${CODENAME}-updates main restricted universe" \
| sudo tee -a /etc/apt/sources.list.d/ubuntu-ports-arm64.list > /dev/null
sudo apt-get update -qq
sudo apt-get download libvlc5:arm64 libvlccore9:arm64 vlc-plugin-base:arm64
mkdir -p vlc-extracted
for deb in libvlc5_*arm64.deb libvlccore9_*arm64.deb vlc-plugin-base_*arm64.deb; do
dpkg -x "$deb" vlc-extracted/
done
LIB_DIR="vlc-extracted/usr/lib/aarch64-linux-gnu"
PLUGINS_SRC="$LIB_DIR/vlc/plugins"
else
sudo apt-get install -y --no-install-recommends libvlc5 libvlccore9 vlc-plugin-base
LIB_DIR="/usr/lib/x86_64-linux-gnu"
PLUGINS_SRC="$LIB_DIR/vlc/plugins"
fi
# Copy the two core shared libraries, dereferencing symlinks so their
# content is preserved correctly when zipped.
for lib in libvlc.so.5 libvlccore.so.9; do
src=$(find "$LIB_DIR" -maxdepth 1 -name "${lib}*" | sort | head -1)
if [ -n "$src" ]; then
cp -L "$src" "$VLC_DIR/$lib"
echo "Bundled: $lib"
else
echo "WARNING: $lib not found in $LIB_DIR" >&2
fi
done
# Copy VLC plugins (vlc-plugin-base covers common codecs and demuxers)
if [ -d "$PLUGINS_SRC" ]; then
mkdir -p "$VLC_DIR/plugins"
cp -rL "$PLUGINS_SRC/." "$VLC_DIR/plugins/"
echo "Bundled $(find "$VLC_DIR/plugins" -name "*.so" | wc -l) plugin(s)"
fi
- name: Bundle and Clean - name: Bundle and Clean
shell: pwsh shell: pwsh
run: | run: |
Copy-Item -Force -Recurse -Verbose LANCommander.AutoUpdater/bin/${{ inputs.build_configuration }}/net10.0/${{ inputs.build_runtime }}/publish/* LANCommander.Launcher/bin/${{ inputs.build_configuration }}/net10.0/${{ inputs.build_runtime }}/publish/
Copy-Item -Force -Recurse -Verbose LANCommander.Launcher.CLI/bin/${{ inputs.build_configuration }}/net10.0/${{ inputs.build_runtime }}/publish/* LANCommander.Launcher/bin/${{ inputs.build_configuration }}/net10.0/${{ inputs.build_runtime }}/publish/
# Remove unnecessary files in a single operation
$PathsToRemove = @(
'wwwroot/_content/BootstrapBlazor.PdfReader/compat',
'wwwroot/_content/BootstrapBlazor.PdfReader/2.*',
'wwwroot/_content/BootstrapBlazor.PdfReader/build/pdf.sandbox.js',
'wwwroot/_content/BootstrapBlazor.PdfReader/build/*.map',
'wwwroot/_content/BootstrapBlazor.PdfReader/web/*.map',
'wwwroot/_content/AntDesign/less',
'wwwroot/_content/BlazorMonaco/lib/monaco-editor/min-maps',
'wwwroot/Identity/lib/bootstrap',
'LANCommander.ico',
'LANCommanderDark.ico',
'package-lock.json',
'package.json',
'*.pdb',
'hostfxr.dll.bak',
'Libraries/locales'
)
$BasePath = "LANCommander.Launcher/bin/${{ inputs.build_configuration }}/net10.0/${{ inputs.build_runtime }}/publish" $BasePath = "LANCommander.Launcher/bin/${{ inputs.build_configuration }}/net10.0/${{ inputs.build_runtime }}/publish"
# Remove unnecessary files
$PathsToRemove = @(
'*.pdb'
)
foreach ($path in $PathsToRemove) { foreach ($path in $PathsToRemove) {
Remove-Item -Recurse -Force -ErrorAction Continue "$BasePath/$path" Remove-Item -Recurse -Force -ErrorAction Continue "$BasePath/$path"
} }
- name: Bundle macOS .app
if: inputs.build_platform == 'macOS'
shell: bash
run: |
set -euo pipefail
# Strip leading 'v' and reduce to numeric x.y.z for the bundle version keys.
RAW_VERSION="${{ inputs.version_tag }}"
SEMVER="${RAW_VERSION#v}"
NUMERIC="${SEMVER%%-*}"
APP_NAME="LANCommander Launcher"
EXECUTABLE="LANCommander.Launcher"
BUNDLE_ID="app.lancommander.launcher"
ICON_SRC="LANCommander.Launcher/Assets/icon.icns"
PUBLISH_DIR="LANCommander.Launcher/bin/${{ inputs.build_configuration }}/net10.0/${{ inputs.build_runtime }}/publish"
APP_DIR="${EXECUTABLE}.app"
# Lay out the bundle skeleton.
mkdir -p "$APP_DIR/Contents/MacOS" "$APP_DIR/Contents/Resources"
cp -a "$PUBLISH_DIR/." "$APP_DIR/Contents/MacOS/"
cp "$ICON_SRC" "$APP_DIR/Contents/Resources/AppIcon.icns"
# Write Info.plist.
cat > "$APP_DIR/Contents/Info.plist" <<PLIST
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>${APP_NAME}</string>
<key>CFBundleDisplayName</key>
<string>${APP_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${BUNDLE_ID}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE}</string>
<key>CFBundleIconFile</key>
<string>AppIcon</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleShortVersionString</key>
<string>${NUMERIC}</string>
<key>CFBundleVersion</key>
<string>${SEMVER}</string>
<key>LSMinimumSystemVersion</key>
<string>11.0</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
PLIST
# Ensure the entrypoint is executable, then zip while preserving the
# permission bits (Compress-Archive drops the exec bit).
chmod +x "$APP_DIR/Contents/MacOS/${EXECUTABLE}"
zip -ry "LANCommander.Launcher-${{ inputs.build_platform }}-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.zip" "$APP_DIR"
- name: Build AppImage (Linux)
if: inputs.build_platform == 'Linux'
shell: bash
run: |
set -euo pipefail
PUBLISH_DIR="LANCommander.Launcher/bin/${{ inputs.build_configuration }}/net10.0/${{ inputs.build_runtime }}/publish"
APP_NAME="LANCommander.Launcher"
APPDIR="AppDir"
# appimagetool / runtime architecture identifiers
if [ "${{ inputs.build_arch }}" = "arm64" ]; then
AI_ARCH="aarch64"
else
AI_ARCH="x86_64"
fi
export ARCH="$AI_ARCH"
# --- Assemble the AppDir ---------------------------------------------
rm -rf "$APPDIR"
mkdir -p "$APPDIR/usr/bin" "$APPDIR/usr/share/applications" \
"$APPDIR/usr/share/icons/hicolor/scalable/apps"
cp -r "$PUBLISH_DIR/." "$APPDIR/usr/bin/"
chmod +x "$APPDIR/usr/bin/$APP_NAME"
# Icon (use the prebuilt 256x256 project icon)
ICON_SRC="LANCommander.Launcher/Assets/icon.png"
ICON_DIR="$APPDIR/usr/share/icons/hicolor/256x256/apps"
mkdir -p "$ICON_DIR"
cp "$ICON_SRC" "$ICON_DIR/lancommander.png"
cp "$ICON_DIR/lancommander.png" "$APPDIR/lancommander.png"
ln -sf lancommander.png "$APPDIR/.DirIcon"
# Desktop entry
cat > "$APPDIR/usr/share/applications/lancommander.desktop" <<'EOF'
[Desktop Entry]
Type=Application
Name=LANCommander Launcher
Comment=LANCommander Launcher
Exec=LANCommander.Launcher
Icon=lancommander
Categories=Game;
Terminal=false
EOF
cp "$APPDIR/usr/share/applications/lancommander.desktop" "$APPDIR/lancommander.desktop"
# AppRun entry point
cat > "$APPDIR/AppRun" <<'EOF'
#!/bin/bash
HERE="$(dirname "$(readlink -f "${0}")")"
export PATH="${HERE}/usr/bin:${PATH}"
export LD_LIBRARY_PATH="${HERE}/usr/bin:${LD_LIBRARY_PATH:-}"
exec "${HERE}/usr/bin/LANCommander.Launcher" "$@"
EOF
chmod +x "$APPDIR/AppRun"
# --- Fetch appimagetool ----------------------------------------------
TOOL_URL="https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-${AI_ARCH}.AppImage"
curl -L -o appimagetool "$TOOL_URL"
chmod +x appimagetool
# --- Build the AppImage ----------------------------------------------
OUT="LANCommander.Launcher-Linux-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.AppImage"
./appimagetool --appimage-extract-and-run "$APPDIR" "$OUT"
echo "Produced $OUT"
- name: Upload AppImage Artifact (Linux)
if: inputs.build_platform == 'Linux'
uses: actions/upload-artifact@v4
with:
path: LANCommander.Launcher-Linux-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.AppImage
name: LANCommander.Launcher-Linux-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.AppImage
- name: Compress Build Output - name: Compress Build Output
if: inputs.build_platform != 'macOS'
shell: pwsh shell: pwsh
run: | run: |
$compress = @{ $compress = @{
@ -174,4 +311,4 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
path: LANCommander.Launcher-${{ inputs.build_platform }}-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.zip path: LANCommander.Launcher-${{ inputs.build_platform }}-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.zip
name: LANCommander.Launcher-${{ inputs.build_platform }}-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.zip name: LANCommander.Launcher-${{ inputs.build_platform }}-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.zip

View file

@ -255,84 +255,6 @@ jobs:
build_platform: Windows build_platform: Windows
build_configuration: Debug build_configuration: Debug
build_launcher_avalonia_linux_arm64:
needs: [prep]
if: needs.prep.outputs.changed == 'true' && github.repository_owner == 'LANCommander'
uses: ./.github/workflows/LANCommander.Launcher.Avalonia.yml
with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: linux-arm64
build_arch: arm64
build_platform: Linux
build_configuration: Debug
build_launcher_avalonia_linux_x64:
needs: [prep]
if: needs.prep.outputs.changed == 'true' && github.repository_owner == 'LANCommander'
uses: ./.github/workflows/LANCommander.Launcher.Avalonia.yml
with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: linux-x64
build_arch: x64
build_platform: Linux
build_configuration: Debug
build_launcher_avalonia_osx_arm64:
needs: [prep]
if: needs.prep.outputs.changed == 'true' && github.repository_owner == 'LANCommander'
uses: ./.github/workflows/LANCommander.Launcher.Avalonia.yml
with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: osx-arm64
build_arch: arm64
build_platform: macOS
build_configuration: Debug
build_launcher_avalonia_osx_x64:
needs: [prep]
if: needs.prep.outputs.changed == 'true' && github.repository_owner == 'LANCommander'
uses: ./.github/workflows/LANCommander.Launcher.Avalonia.yml
with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: osx-x64
build_arch: x64
build_platform: macOS
build_configuration: Debug
build_launcher_avalonia_win_arm64:
needs: [prep]
if: needs.prep.outputs.changed == 'true' && github.repository_owner == 'LANCommander'
uses: ./.github/workflows/LANCommander.Launcher.Avalonia.yml
with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: win-arm64
build_arch: arm64
build_platform: Windows
build_configuration: Debug
build_launcher_avalonia_win_x64:
needs: [prep]
if: needs.prep.outputs.changed == 'true' && github.repository_owner == 'LANCommander'
uses: ./.github/workflows/LANCommander.Launcher.Avalonia.yml
with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: win-x64
build_arch: x64
build_platform: Windows
build_configuration: Debug
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
# 3) FINALIZE: if changes == 'true', gather artifacts + push Docker:nightly # 3) FINALIZE: if changes == 'true', gather artifacts + push Docker:nightly
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
@ -345,12 +267,6 @@ jobs:
- build_server_osx_x64 - build_server_osx_x64
- build_server_win_arm64 - build_server_win_arm64
- build_server_win_x64 - build_server_win_x64
- build_launcher_linux_arm64
- build_launcher_linux_x64
- build_launcher_osx_arm64
- build_launcher_osx_x64
- build_launcher_win_arm64
- build_launcher_win_x64
if: needs.prep.outputs.changed == 'true' && github.repository_owner == 'LANCommander' if: needs.prep.outputs.changed == 'true' && github.repository_owner == 'LANCommander'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -443,12 +359,12 @@ jobs:
needs: needs:
- prep - prep
- publish_docker_image - publish_docker_image
- build_launcher_avalonia_linux_arm64 - build_launcher_linux_arm64
- build_launcher_avalonia_linux_x64 - build_launcher_linux_x64
- build_launcher_avalonia_osx_arm64 - build_launcher_osx_arm64
- build_launcher_avalonia_osx_x64 - build_launcher_osx_x64
- build_launcher_avalonia_win_arm64 - build_launcher_win_arm64
- build_launcher_avalonia_win_x64 - build_launcher_win_x64
steps: steps:
- name: Check out code - name: Check out code
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -528,40 +444,16 @@ jobs:
name: LANCommander.Launcher-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip name: LANCommander.Launcher-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip
path: artifacts path: artifacts
- name: Download Launcher Avalonia Linux ARM64 - name: Download Launcher Linux ARM64 AppImage
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: LANCommander.Launcher.Avalonia-Linux-arm64-v${{ needs.prep.outputs.version_tag }}.zip name: LANCommander.Launcher-Linux-arm64-v${{ needs.prep.outputs.version_tag }}.AppImage
path: artifacts path: artifacts
- name: Download Launcher Avalonia Linux x64 - name: Download Launcher Linux x64 AppImage
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: LANCommander.Launcher.Avalonia-Linux-x64-v${{ needs.prep.outputs.version_tag }}.zip name: LANCommander.Launcher-Linux-x64-v${{ needs.prep.outputs.version_tag }}.AppImage
path: artifacts
- name: Download Launcher Avalonia macOS ARM64
uses: actions/download-artifact@v4
with:
name: LANCommander.Launcher.Avalonia-macOS-arm64-v${{ needs.prep.outputs.version_tag }}.zip
path: artifacts
- name: Download Launcher Avalonia macOS x64
uses: actions/download-artifact@v4
with:
name: LANCommander.Launcher.Avalonia-macOS-x64-v${{ needs.prep.outputs.version_tag }}.zip
path: artifacts
- name: Download Launcher Avalonia Windows ARM64
uses: actions/download-artifact@v4
with:
name: LANCommander.Launcher.Avalonia-Windows-arm64-v${{ needs.prep.outputs.version_tag }}.zip
path: artifacts
- name: Download Launcher Avalonia Windows x64
uses: actions/download-artifact@v4
with:
name: LANCommander.Launcher.Avalonia-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip
path: artifacts path: artifacts
- name: Create or update nightly release - name: Create or update nightly release

View file

@ -1,225 +1,229 @@
name: LANCommander Pull Request name: LANCommander Pull Request
on: on:
pull_request: pull_request:
types: types:
- opened - opened
- synchronize - synchronize
- reopened - reopened
- ready_for_review - ready_for_review
workflow_dispatch: workflow_dispatch:
permissions: permissions:
contents: write contents: write
packages: read packages: read
checks: write
jobs: pull-requests: write
prep:
runs-on: ubuntu-latest jobs:
outputs: prep:
version_semver: ${{ steps.set_version.outputs.version_semver }} runs-on: ubuntu-latest
version_tag: ${{ steps.set_version.outputs.version_tag }} outputs:
build_dotnet_version: 9.0.102 version_semver: ${{ steps.set_version.outputs.version_semver }}
steps: version_tag: ${{ steps.set_version.outputs.version_tag }}
- name: Check out code build_dotnet_version: 9.0.102
uses: actions/checkout@v4 steps:
with: - name: Check out code
fetch-depth: 0 uses: actions/checkout@v4
with:
- name: Determine build metadata fetch-depth: 0
id: set_version
shell: bash - name: Determine build metadata
env: id: set_version
PR_NUMBER: ${{ github.event.pull_request.number }} shell: bash
RUN_NUMBER: ${{ github.run_number }} env:
run: | PR_NUMBER: ${{ github.event.pull_request.number }}
TIMESTAMP=$(date -u +"%Y%m%d%H%M") RUN_NUMBER: ${{ github.run_number }}
TIME_COMPONENT=$(date -u +"%H%M") run: |
TIME_COMPONENT=$((10#$TIME_COMPONENT)) TIMESTAMP=$(date -u +"%Y%m%d%H%M")
TIME_COMPONENT=$(date -u +"%H%M")
if [ -n "$PR_NUMBER" ]; then TIME_COMPONENT=$((10#$TIME_COMPONENT))
BUILD_COMPONENT=$((PR_NUMBER % 65535))
if [ "$BUILD_COMPONENT" -eq 0 ]; then if [ -n "$PR_NUMBER" ]; then
BUILD_COMPONENT=1 BUILD_COMPONENT=$((PR_NUMBER % 65535))
fi if [ "$BUILD_COMPONENT" -eq 0 ]; then
VERSION_SEMVER="0.0.${BUILD_COMPONENT}.${TIME_COMPONENT}" BUILD_COMPONENT=1
VERSION_TAG="0.0.${BUILD_COMPONENT}-pr.${PR_NUMBER}.${TIMESTAMP}" fi
else VERSION_SEMVER="0.0.${BUILD_COMPONENT}.${TIME_COMPONENT}"
BUILD_COMPONENT=$((RUN_NUMBER % 65535)) VERSION_TAG="0.0.${BUILD_COMPONENT}-pr.${PR_NUMBER}.${TIMESTAMP}"
if [ "$BUILD_COMPONENT" -eq 0 ]; then else
BUILD_COMPONENT=1 BUILD_COMPONENT=$((RUN_NUMBER % 65535))
fi if [ "$BUILD_COMPONENT" -eq 0 ]; then
VERSION_SEMVER="0.0.${BUILD_COMPONENT}.${TIME_COMPONENT}" BUILD_COMPONENT=1
VERSION_TAG="0.0.${BUILD_COMPONENT}-ci.${RUN_NUMBER}.${TIMESTAMP}" fi
fi VERSION_SEMVER="0.0.${BUILD_COMPONENT}.${TIME_COMPONENT}"
VERSION_TAG="0.0.${BUILD_COMPONENT}-ci.${RUN_NUMBER}.${TIMESTAMP}"
echo "version_semver=$VERSION_SEMVER" >> $GITHUB_OUTPUT fi
echo "version_tag=$VERSION_TAG" >> $GITHUB_OUTPUT
echo "version_semver=$VERSION_SEMVER" >> $GITHUB_OUTPUT
build_server_linux_arm64: echo "version_tag=$VERSION_TAG" >> $GITHUB_OUTPUT
needs: [prep]
uses: ./.github/workflows/LANCommander.Server.yml ui_tests:
with: needs: [prep]
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }} runs-on: ubuntu-latest
version_semver: ${{ needs.prep.outputs.version_semver }} steps:
version_tag: ${{ needs.prep.outputs.version_tag }} - name: Check out code
build_runtime: linux-arm64 uses: actions/checkout@v4
build_arch: arm64
build_platform: Linux - name: Setup .NET
build_configuration: Debug uses: actions/setup-dotnet@v4
with:
build_server_linux_x64: dotnet-version: ${{ needs.prep.outputs.build_dotnet_version }}
needs: [prep]
uses: ./.github/workflows/LANCommander.Server.yml - name: Setup Node.js
with: uses: actions/setup-node@v4
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }} with:
version_semver: ${{ needs.prep.outputs.version_semver }} node-version: '20'
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: linux-x64 - name: Install Node packages
build_arch: x64 run: |
build_platform: Linux npm install --prefix ./LANCommander.UI
build_configuration: Debug npm install --prefix ./LANCommander.Server
build_server_osx_arm64: # The Monaco editor's PowerShell completions are generated (gitignored) and
needs: [prep] # required by the frontend webpack build. The in-build MSBuild target uses
uses: ./.github/workflows/LANCommander.Server.yml # Windows-style paths, so generate explicitly here for the Linux runner.
with: - name: Generate PowerShell Completions
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }} run: dotnet run --project ./LANCommander.CompletionGenerator/LANCommander.CompletionGenerator.csproj -- ./LANCommander.UI/Components/MonacoCodeEditor/PowerShellCompletions.g.ts
version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }} - name: Restore dependencies
build_runtime: osx-arm64 run: dotnet restore LANCommander.Server.UI.Tests
build_arch: arm64
build_platform: macOS - name: Build test project
build_configuration: Debug run: dotnet build LANCommander.Server.UI.Tests --no-restore --configuration Release
build_server_osx_x64: - name: Install Playwright browsers
needs: [prep] run: pwsh LANCommander.Server.UI.Tests/bin/Release/net10.0/playwright.ps1 install --with-deps chromium
uses: ./.github/workflows/LANCommander.Server.yml
with: - name: Run UI tests
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }} run: dotnet test LANCommander.Server.UI.Tests --no-build --configuration Release --logger "trx;LogFileName=ui-test-results.trx" --results-directory ./TestResults
version_semver: ${{ needs.prep.outputs.version_semver }} env:
version_tag: ${{ needs.prep.outputs.version_tag }} SCREENSHOT_DIR: ${{ github.workspace }}/TestResults/Screenshots
build_runtime: osx-x64
build_arch: x64 - name: Test report
build_platform: macOS if: always()
build_configuration: Debug uses: dorny/test-reporter@v1
with:
build_server_win_arm64: name: UI Test Results
needs: [prep] path: ./TestResults/ui-test-results.trx
uses: ./.github/workflows/LANCommander.Server.yml reporter: dotnet-trx
with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }} - name: Upload test results
version_semver: ${{ needs.prep.outputs.version_semver }} if: always()
version_tag: ${{ needs.prep.outputs.version_tag }} uses: actions/upload-artifact@v4
build_runtime: win-arm64 with:
build_arch: arm64 name: ui-test-results
build_platform: Windows path: ./TestResults
build_configuration: Debug retention-days: 7
build_server_win_x64: build_server_linux_arm64:
needs: [prep] needs: [prep]
uses: ./.github/workflows/LANCommander.Server.yml uses: ./.github/workflows/LANCommander.Server.yml
with: with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }} build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }} version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }} version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: win-x64 build_runtime: linux-arm64
build_arch: x64 build_arch: arm64
build_platform: Windows build_platform: Linux
build_configuration: Debug build_configuration: Debug
build_launcher_linux_arm64: build_server_linux_x64:
needs: [prep] needs: [prep]
uses: ./.github/workflows/LANCommander.Launcher.yml uses: ./.github/workflows/LANCommander.Server.yml
with: with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }} build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }} version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }} version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: linux-arm64 build_runtime: linux-x64
build_arch: arm64 build_arch: x64
build_platform: Linux build_platform: Linux
build_configuration: Debug build_configuration: Debug
build_launcher_linux_x64: build_server_osx_arm64:
needs: [prep] needs: [prep]
uses: ./.github/workflows/LANCommander.Launcher.yml uses: ./.github/workflows/LANCommander.Server.yml
with: with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }} build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }} version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }} version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: linux-x64 build_runtime: osx-arm64
build_arch: x64 build_arch: arm64
build_platform: Linux build_platform: macOS
build_configuration: Debug build_configuration: Debug
build_launcher_osx_arm64: build_server_osx_x64:
needs: [prep] needs: [prep]
uses: ./.github/workflows/LANCommander.Launcher.yml uses: ./.github/workflows/LANCommander.Server.yml
with: with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }} build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }} version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }} version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: osx-arm64 build_runtime: osx-x64
build_arch: arm64 build_arch: x64
build_platform: macOS build_platform: macOS
build_configuration: Debug build_configuration: Debug
build_launcher_osx_x64: build_server_win_arm64:
needs: [prep] needs: [prep]
uses: ./.github/workflows/LANCommander.Launcher.yml uses: ./.github/workflows/LANCommander.Server.yml
with: with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }} build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }} version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }} version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: osx-x64 build_runtime: win-arm64
build_arch: x64 build_arch: arm64
build_platform: macOS build_platform: Windows
build_configuration: Debug build_configuration: Debug
build_launcher_win_arm64: build_server_win_x64:
needs: [prep] needs: [prep]
uses: ./.github/workflows/LANCommander.Launcher.yml uses: ./.github/workflows/LANCommander.Server.yml
with: with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }} build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }} version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }} version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: win-arm64 build_runtime: win-x64
build_arch: arm64 build_arch: x64
build_platform: Windows build_platform: Windows
build_configuration: Debug build_configuration: Debug
build_launcher_win_x64: build_launcher_linux_x64:
needs: [prep] needs: [prep]
uses: ./.github/workflows/LANCommander.Launcher.yml uses: ./.github/workflows/LANCommander.Launcher.yml
with: with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }} build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }} version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }} version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: win-x64 build_runtime: linux-x64
build_arch: x64 build_arch: x64
build_platform: Windows build_platform: Linux
build_configuration: Debug build_configuration: Debug
build_launcher_avalonia_linux_x64: build_launcher_win_x64:
needs: [prep] needs: [prep]
uses: ./.github/workflows/LANCommander.Launcher.Avalonia.yml uses: ./.github/workflows/LANCommander.Launcher.yml
with: with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }} build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }} version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }} version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: linux-x64 build_runtime: win-x64
build_arch: x64 build_arch: x64
build_platform: Linux build_platform: Windows
build_configuration: Debug build_configuration: Debug
build_launcher_avalonia_win_x64: launcher_tests:
needs: [prep] needs: [prep]
uses: ./.github/workflows/LANCommander.Launcher.Avalonia.yml uses: ./.github/workflows/LANCommander.Launcher.Tests.yml
with: with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }} build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }} launcher_tests_pr_comment:
build_runtime: win-x64 # Always run after the test job — even on failure — so visual regressions
build_arch: x64 # show up as a PR comment instead of being buried in the artifact.
build_platform: Windows needs: [launcher_tests]
build_configuration: Debug if: always() && needs.launcher_tests.result != 'cancelled' && github.event.pull_request.number != null
uses: ./.github/workflows/LANCommander.Launcher.Tests.PRComment.yml
with:
pr_number: ${{ github.event.pull_request.number }}
artifact_run_id: ${{ github.run_id }}

View file

@ -0,0 +1,100 @@
name: LANCommander Packager Build
on:
workflow_dispatch:
workflow_call:
inputs:
version_semver:
description: "Semantic Version"
required: true
type: string
version_tag:
description: 'Version Tag'
required: true
type: string
build_dotnet_version:
description: 'Build .NET Version'
required: false
type: string
default: '10.0.x'
build_configuration:
description: 'Build Configuration (Debug/Release)'
required: false
type: string
default: 'Release'
permissions:
contents: write
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/package
jobs:
build:
runs-on: windows-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ inputs.build_dotnet_version }}
- name: Restore dependencies
run: dotnet restore
- name: Publish Packager
shell: pwsh
run: |
# Strip leading 'v' if present
$RawVersion = "${{ inputs.version_tag }}"
$Semver = $RawVersion -replace '^v', ''
# Numeric part only for Assembly/FileVersion
$Numeric = ($Semver -split '-')[0]
$AssemblyVersion = "$Numeric.0"
Write-Host "SEMVER=$Semver"
Write-Host "ASSEMBLY_VERSION=$AssemblyVersion"
dotnet publish "./LANCommander.Packager/LANCommander.Packager.csproj" `
-c "${{ inputs.build_configuration }}" `
--self-contained `
--runtime win-x86 `
-p:Version="$Semver" `
-p:AssemblyVersion="$AssemblyVersion" `
-p:FileVersion="$AssemblyVersion" `
-p:InformationalVersion="$Semver" `
-p:PublishSingleFile=true `
-p:IncludeNativeLibrariesForSelfExtract=true `
-p:IncludeAllContentForSelfExtract=true `
-p:EnableCompressionInSingleFile=true `
-p:DebugType=embedded
- name: Clean
shell: pwsh
run: |
$BasePath = "LANCommander.Packager/bin/${{ inputs.build_configuration }}/net10.0/win-x86/publish"
Remove-Item -Recurse -Force -ErrorAction Continue "$BasePath/*.pdb"
- name: Compress Build Output
shell: pwsh
run: |
$compress = @{
Path = "LANCommander.Packager/bin/${{ inputs.build_configuration }}/net10.0/win-x86/publish/*"
DestinationPath = "LANCommander.Packager-Windows-x86-v${{ inputs.version_tag }}.zip"
CompressionLevel = "Fastest"
}
Compress-Archive @compress
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
path: LANCommander.Packager-Windows-x86-v${{ inputs.version_tag }}.zip
name: LANCommander.Packager-Windows-x86-v${{ inputs.version_tag }}.zip

View file

@ -27,6 +27,7 @@ jobs:
outputs: outputs:
version_tag: ${{ steps.trim_tag_ref.outputs.replaced }} version_tag: ${{ steps.trim_tag_ref.outputs.replaced }}
version_semver: ${{ steps.trim_tag_ref.outputs.replaced }} version_semver: ${{ steps.trim_tag_ref.outputs.replaced }}
is_prerelease: ${{ steps.check_prerelease.outputs.is_prerelease }}
build_dotnet_version: 9.0.102 build_dotnet_version: 9.0.102
steps: steps:
- name: Check out code - name: Check out code
@ -43,6 +44,16 @@ jobs:
pattern: 'refs/tags/v' pattern: 'refs/tags/v'
replace-with: '' replace-with: ''
- name: Check if pre-release
id: check_prerelease
run: |
VERSION="${{ steps.trim_tag_ref.outputs.replaced }}"
if [[ "$VERSION" == *-* ]]; then
echo "is_prerelease=true" >> $GITHUB_OUTPUT
else
echo "is_prerelease=false" >> $GITHUB_OUTPUT
fi
# Server # Server
build_server_linux_arm64: build_server_linux_arm64:
needs: [prep] needs: [prep]
@ -189,53 +200,14 @@ jobs:
build_platform: Windows build_platform: Windows
build_configuration: Release build_configuration: Release
# Avalonia Launcher # Packager (Windows x86 only)
build_launcher_avalonia_linux_x64: build_packager:
needs: [prep] needs: [prep]
uses: ./.github/workflows/LANCommander.Launcher.Avalonia.yml uses: ./.github/workflows/LANCommander.Packager.yml
with: with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }} build_dotnet_version: '10.0.x'
version_semver: ${{ needs.prep.outputs.version_semver }} version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }} version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: linux-x64
build_arch: x64
build_platform: Linux
build_configuration: Release
build_launcher_avalonia_osx_arm64:
needs: [prep]
uses: ./.github/workflows/LANCommander.Launcher.Avalonia.yml
with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: osx-arm64
build_arch: arm64
build_platform: macOS
build_configuration: Release
build_launcher_avalonia_osx_x64:
needs: [prep]
uses: ./.github/workflows/LANCommander.Launcher.Avalonia.yml
with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: osx-x64
build_arch: x64
build_platform: macOS
build_configuration: Release
build_launcher_avalonia_win_x64:
needs: [prep]
uses: ./.github/workflows/LANCommander.Launcher.Avalonia.yml
with:
build_dotnet_version: ${{ needs.prep.outputs.build_dotnet_version }}
version_semver: ${{ needs.prep.outputs.version_semver }}
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: win-x64
build_arch: x64
build_platform: Windows
build_configuration: Release build_configuration: Release
build_release: build_release:
@ -254,10 +226,7 @@ jobs:
- build_launcher_osx_x64 - build_launcher_osx_x64
- build_launcher_win_arm64 - build_launcher_win_arm64
- build_launcher_win_x64 - build_launcher_win_x64
- build_launcher_avalonia_linux_x64 - build_packager
- build_launcher_avalonia_osx_arm64
- build_launcher_avalonia_osx_x64
- build_launcher_avalonia_win_x64
steps: steps:
- name: Create Temp Directory - name: Create Temp Directory
@ -299,6 +268,7 @@ jobs:
name: LANCommander.Server-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip name: LANCommander.Server-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip
path: artifacts path: artifacts
# Launcher artifacts
- name: Download Launcher Linux ARM64 - name: Download Launcher Linux ARM64
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
@ -335,29 +305,22 @@ jobs:
name: LANCommander.Launcher-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip name: LANCommander.Launcher-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip
path: artifacts path: artifacts
# Avalonia Launcher artifacts - name: Download Launcher Linux ARM64 AppImage
- name: Download Avalonia Launcher Linux x64
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: LANCommander.Launcher.Avalonia-Linux-x64-v${{ needs.prep.outputs.version_tag }}.zip name: LANCommander.Launcher-Linux-arm64-v${{ needs.prep.outputs.version_tag }}.AppImage
path: artifacts path: artifacts
- name: Download Avalonia Launcher macOS ARM64 - name: Download Launcher Linux x64 AppImage
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: LANCommander.Launcher.Avalonia-macOS-arm64-v${{ needs.prep.outputs.version_tag }}.zip name: LANCommander.Launcher-Linux-x64-v${{ needs.prep.outputs.version_tag }}.AppImage
path: artifacts path: artifacts
- name: Download Avalonia Launcher macOS x64 - name: Download Packager Windows x86
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: LANCommander.Launcher.Avalonia-macOS-x64-v${{ needs.prep.outputs.version_tag }}.zip name: LANCommander.Packager-Windows-x86-v${{ needs.prep.outputs.version_tag }}.zip
path: artifacts
- name: Download Avalonia Launcher Windows x64
uses: actions/download-artifact@v4
with:
name: LANCommander.Launcher.Avalonia-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip
path: artifacts path: artifacts
- name: Debug - List Artifact Files - name: Debug - List Artifact Files
@ -371,6 +334,7 @@ jobs:
name: v${{ needs.prep.outputs.version_tag }} name: v${{ needs.prep.outputs.version_tag }}
generate_release_notes: true generate_release_notes: true
draft: true draft: true
prerelease: ${{ needs.prep.outputs.is_prerelease == 'true' }}
files: | files: |
artifacts/LANCommander.Server-Windows-arm64-v${{ needs.prep.outputs.version_tag }}.zip artifacts/LANCommander.Server-Windows-arm64-v${{ needs.prep.outputs.version_tag }}.zip
artifacts/LANCommander.Server-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip artifacts/LANCommander.Server-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip
@ -378,16 +342,15 @@ jobs:
artifacts/LANCommander.Server-Linux-arm64-v${{ needs.prep.outputs.version_tag }}.zip artifacts/LANCommander.Server-Linux-arm64-v${{ needs.prep.outputs.version_tag }}.zip
artifacts/LANCommander.Server-macOS-arm64-v${{ needs.prep.outputs.version_tag }}.zip artifacts/LANCommander.Server-macOS-arm64-v${{ needs.prep.outputs.version_tag }}.zip
artifacts/LANCommander.Server-macOS-x64-v${{ needs.prep.outputs.version_tag }}.zip artifacts/LANCommander.Server-macOS-x64-v${{ needs.prep.outputs.version_tag }}.zip
artifacts/LANCommander.Launcher-Windows-arm64-v${{ needs.prep.outputs.version_tag }}.zip
artifacts/LANCommander.Launcher-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip
artifacts/LANCommander.Launcher-Linux-x64-v${{ needs.prep.outputs.version_tag }}.zip
artifacts/LANCommander.Launcher-Linux-arm64-v${{ needs.prep.outputs.version_tag }}.zip artifacts/LANCommander.Launcher-Linux-arm64-v${{ needs.prep.outputs.version_tag }}.zip
artifacts/LANCommander.Launcher-Linux-x64-v${{ needs.prep.outputs.version_tag }}.zip
artifacts/LANCommander.Launcher-macOS-arm64-v${{ needs.prep.outputs.version_tag }}.zip artifacts/LANCommander.Launcher-macOS-arm64-v${{ needs.prep.outputs.version_tag }}.zip
artifacts/LANCommander.Launcher-macOS-x64-v${{ needs.prep.outputs.version_tag }}.zip artifacts/LANCommander.Launcher-macOS-x64-v${{ needs.prep.outputs.version_tag }}.zip
artifacts/LANCommander.Launcher.Avalonia-Linux-x64-v${{ needs.prep.outputs.version_tag }}.zip artifacts/LANCommander.Launcher-Windows-arm64-v${{ needs.prep.outputs.version_tag }}.zip
artifacts/LANCommander.Launcher.Avalonia-macOS-arm64-v${{ needs.prep.outputs.version_tag }}.zip artifacts/LANCommander.Launcher-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip
artifacts/LANCommander.Launcher.Avalonia-macOS-x64-v${{ needs.prep.outputs.version_tag }}.zip artifacts/LANCommander.Launcher-Linux-arm64-v${{ needs.prep.outputs.version_tag }}.AppImage
artifacts/LANCommander.Launcher.Avalonia-Windows-x64-v${{ needs.prep.outputs.version_tag }}.zip artifacts/LANCommander.Launcher-Linux-x64-v${{ needs.prep.outputs.version_tag }}.AppImage
artifacts/LANCommander.Packager-Windows-x86-v${{ needs.prep.outputs.version_tag }}.zip
- name: Checkout Repo for Docker build - name: Checkout Repo for Docker build
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -457,10 +420,9 @@ jobs:
file: ./LANCommander.Server/Dockerfile file: ./LANCommander.Server/Dockerfile
push: true push: true
platforms: linux/amd64 platforms: linux/amd64
# ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}:latest
tags: | tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}:v${{ needs.prep.outputs.version_tag }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}:v${{ needs.prep.outputs.version_tag }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}:latest ${{ needs.prep.outputs.is_prerelease == 'true' && format('{0}/{1}:prerelease', env.REGISTRY, env.IMAGE_NAME) || format('{0}/{1}:latest', env.REGISTRY, env.IMAGE_NAME) }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max

View file

@ -1,9 +1,8 @@
name: LANCommander SDK Release name: LANCommander SDK Release
on: on:
push: release:
tags: types: [published]
- 'v[0-9]+.[0-9]+.[0-9]+'
permissions: permissions:
contents: write contents: write
@ -13,7 +12,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
version_tag: ${{ steps.trim_tag_ref.outputs.replaced }} version_tag: ${{ steps.trim_tag_ref.outputs.replaced }}
version_semver: ${{ steps.trim_tag_ref.outputs.replaced }} version_semver: ${{ steps.extract_semver.outputs.replaced }}
steps: steps:
- uses: frabert/replace-string-action@v2 - uses: frabert/replace-string-action@v2
name: Trim Tag Ref name: Trim Tag Ref
@ -23,6 +22,14 @@ jobs:
pattern: 'refs/tags/v' pattern: 'refs/tags/v'
replace-with: '' replace-with: ''
- uses: frabert/replace-string-action@v2
name: Extract SemVer (strip prerelease suffix for AssemblyVersion)
id: extract_semver
with:
string: '${{ steps.trim_tag_ref.outputs.replaced }}'
pattern: '-.*$'
replace-with: ''
publish: publish:
needs: prep needs: prep
runs-on: ubuntu-latest runs-on: ubuntu-latest

View file

@ -45,7 +45,7 @@ env:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ${{ inputs.build_platform == 'Linux' && inputs.build_arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -85,6 +85,9 @@ jobs:
npm install --prefix ./LANCommander.UI npm install --prefix ./LANCommander.UI
npm install --prefix ./LANCommander.Server npm install --prefix ./LANCommander.Server
- name: Generate PowerShell Completions
run: dotnet run --project ./LANCommander.CompletionGenerator/LANCommander.CompletionGenerator.csproj -- ./LANCommander.UI/Components/MonacoCodeEditor/PowerShellCompletions.g.ts
- name: Package Frontend - name: Package Frontend
run: | run: |
npm run package --prefix ./LANCommander.UI npm run package --prefix ./LANCommander.UI
@ -113,6 +116,12 @@ jobs:
-p:FileVersion="$ASSEMBLY_VERSION" \ -p:FileVersion="$ASSEMBLY_VERSION" \
-p:InformationalVersion="$SEMVER" -p:InformationalVersion="$SEMVER"
# Disable NetBeauty on ARM64 runners — nbeauty2 only ships x64 native binaries
DISABLE_BEAUTY="False"
if [ "${{ inputs.build_arch }}" = "arm64" ] && [ "${{ inputs.build_platform }}" = "Linux" ]; then
DISABLE_BEAUTY="True"
fi
dotnet publish "./LANCommander.Server/LANCommander.Server.csproj" \ dotnet publish "./LANCommander.Server/LANCommander.Server.csproj" \
-c "${{ inputs.build_configuration }}" \ -c "${{ inputs.build_configuration }}" \
--self-contained \ --self-contained \
@ -120,7 +129,8 @@ jobs:
-p:Version="$SEMVER" \ -p:Version="$SEMVER" \
-p:AssemblyVersion="$ASSEMBLY_VERSION" \ -p:AssemblyVersion="$ASSEMBLY_VERSION" \
-p:FileVersion="$ASSEMBLY_VERSION" \ -p:FileVersion="$ASSEMBLY_VERSION" \
-p:InformationalVersion="$SEMVER" -p:InformationalVersion="$SEMVER" \
-p:DisableBeauty="$DISABLE_BEAUTY"
- name: Bundle and Clean - name: Bundle and Clean
@ -152,7 +162,69 @@ jobs:
Remove-Item -Recurse -Force -ErrorAction Continue "$BasePath/$path" Remove-Item -Recurse -Force -ErrorAction Continue "$BasePath/$path"
} }
- name: Bundle macOS .app
if: inputs.build_platform == 'macOS'
shell: bash
run: |
set -euo pipefail
# Strip leading 'v' and reduce to numeric x.y.z for the bundle version keys.
RAW_VERSION="${{ inputs.version_tag }}"
SEMVER="${RAW_VERSION#v}"
NUMERIC="${SEMVER%%-*}"
APP_NAME="LANCommander Server"
EXECUTABLE="LANCommander.Server"
BUNDLE_ID="app.lancommander.server"
ICON_SRC="LANCommander.Server/icon.icns"
PUBLISH_DIR="LANCommander.Server/bin/${{ inputs.build_configuration }}/net10.0/${{ inputs.build_runtime }}/publish"
APP_DIR="${EXECUTABLE}.app"
# Lay out the bundle skeleton.
mkdir -p "$APP_DIR/Contents/MacOS" "$APP_DIR/Contents/Resources"
cp -a "$PUBLISH_DIR/." "$APP_DIR/Contents/MacOS/"
cp "$ICON_SRC" "$APP_DIR/Contents/Resources/AppIcon.icns"
# Write Info.plist.
cat > "$APP_DIR/Contents/Info.plist" <<PLIST
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>${APP_NAME}</string>
<key>CFBundleDisplayName</key>
<string>${APP_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${BUNDLE_ID}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE}</string>
<key>CFBundleIconFile</key>
<string>AppIcon</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleShortVersionString</key>
<string>${NUMERIC}</string>
<key>CFBundleVersion</key>
<string>${SEMVER}</string>
<key>LSMinimumSystemVersion</key>
<string>11.0</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
PLIST
# Ensure the entrypoint is executable, then zip while preserving the
# permission bits (Compress-Archive drops the exec bit).
chmod +x "$APP_DIR/Contents/MacOS/${EXECUTABLE}"
zip -ry "LANCommander.Server-${{ inputs.build_platform }}-${{ inputs.build_arch }}-v${{ inputs.version_tag }}.zip" "$APP_DIR"
- name: Compress Build Output - name: Compress Build Output
if: inputs.build_platform != 'macOS'
shell: pwsh shell: pwsh
run: | run: |
$compress = @{ $compress = @{

View file

@ -12,7 +12,7 @@ jobs:
arch: ['x64', 'arm64'] arch: ['x64', 'arm64']
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Get version - name: Get version
id: get_version id: get_version
shell: pwsh shell: pwsh
@ -33,13 +33,19 @@ jobs:
# Install Inno Setup # Install Inno Setup
- name: Install Inno Setup - name: Install Inno Setup
run: | run: |
curl -L -o innosetup.exe https://files.jrsoftware.org/is/6/innosetup-6.2.2.exe curl -L -o innosetup.exe https://github.com/jrsoftware/issrc/releases/download/is-6_7_3/innosetup-6.7.3.exe
.\innosetup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART .\innosetup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART
shell: cmd shell: cmd
# Create Inno Setup script # Create Inno Setup script
- name: Create installer script - name: Create installer script
run: | run: |
$appId = if ('${{ matrix.app }}' -eq 'Server') {
'2C58E237-1D69-42A0-B702-F995B75B8A5E'
} else {
'A3D4F8E1-7B2C-4E5D-9F1A-6C8B3D7E2F4A'
}
@" @"
#define MyAppName "LANCommander ${{ matrix.app }}" #define MyAppName "LANCommander ${{ matrix.app }}"
#define MyAppVersion "${{ env.VERSION }}" #define MyAppVersion "${{ env.VERSION }}"
@ -49,7 +55,7 @@ jobs:
#define Architecture "${{ matrix.arch }}" #define Architecture "${{ matrix.arch }}"
[Setup] [Setup]
AppId={{$(New-Guid)}} AppId={{$appId}
AppName={#MyAppName} AppName={#MyAppName}
AppVersion={#MyAppVersion} AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher} AppPublisher={#MyAppPublisher}
@ -94,7 +100,6 @@ jobs:
strategy: strategy:
matrix: matrix:
app: ['Server', 'Launcher'] app: ['Server', 'Launcher']
arch: ['x64', 'arm64']
steps: steps:
- name: Get version - name: Get version
shell: pwsh shell: pwsh
@ -103,8 +108,14 @@ jobs:
$version = $tag.TrimStart('v') $version = $tag.TrimStart('v')
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Append echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Install wingetcreate
shell: pwsh
run: |
Invoke-WebRequest -Uri "https://aka.ms/wingetcreate/latest" -OutFile wingetcreate.exe
- name: Submit package to Windows Package Manager Community Repository - name: Submit package to Windows Package Manager Community Repository
run: | run: |
$installerUrl = "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/LANCommander.${{ matrix.app }}-${env:VERSION}-${{ matrix.arch }}-Setup.exe" $x64Url = "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/LANCommander.${{ matrix.app }}-${env:VERSION}-x64-Setup.exe"
wingetcreate submit --token ${{ secrets.GITHUB_TOKEN }} --urls "$installerUrl" --version ${env:VERSION} LANCommander.LANCommander.${{ matrix.app }}.${{ matrix.arch }} $arm64Url = "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/LANCommander.${{ matrix.app }}-${env:VERSION}-arm64-Setup.exe"
shell: pwsh .\wingetcreate.exe update --submit --token "${{ secrets.WINGET_TOKEN }}" --urls $x64Url $arm64Url --version ${env:VERSION} LANCommander.${{ matrix.app }}
shell: pwsh

1
.gitignore vendored
View file

@ -370,6 +370,7 @@ LANCommander.Server/wwwroot/css/main.js
.aspire .aspire
LANCommander.Server/config/ LANCommander.Server/config/
LANCommander.UI/wwwroot/ LANCommander.UI/wwwroot/
LANCommander.UI/Components/MonacoCodeEditor/PowerShellCompletions.g.ts
LANCommander.Server/Data/ LANCommander.Server/Data/
LANCommander.Launcher.Avalonia/Data/ LANCommander.Launcher.Avalonia/Data/

94
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,94 @@
# Contributing to LANCommander
Thanks for your interest in contributing to LANCommander! This project is primarily developed by a single developer, so community contributions are greatly appreciated.
## Getting Started
### Prerequisites
- [.NET 10.0 SDK](https://dotnet.microsoft.com/download/dotnet/10.0)
- [Node.js](https://nodejs.org/) (for the server UI's TypeScript/SCSS assets)
- A code editor such as [Visual Studio](https://visualstudio.microsoft.com/), [Rider](https://www.jetbrains.com/rider/), or [VS Code](https://code.visualstudio.com/)
### Building the Project
1. Clone the repository:
```bash
git clone https://github.com/LANCommander/LANCommander.git
cd LANCommander
```
2. Restore dependencies:
```bash
dotnet restore
```
3. Build the server:
```bash
dotnet build LANCommander.Server
```
4. Build the launcher:
```bash
dotnet build LANCommander.Launcher
```
### Running Locally
To run the server in development mode:
```bash
dotnet run --project LANCommander.Server
```
The server will be available at `http://localhost:1337` by default.
## How to Contribute
### Reporting Bugs
Use the [GitHub Issues](https://github.com/LANCommander/LANCommander/issues) page with the bug report template. Include:
- Steps to reproduce the issue
- Expected vs. actual behavior
- Your OS and LANCommander version
- Relevant logs or screenshots
### Submitting Changes
1. Fork the repository
2. Create a feature branch from `main` (`git checkout -b my-feature`)
3. Make your changes
4. Test your changes locally
5. Commit with a clear, descriptive message
6. Push to your fork and open a Pull Request
### What to Work On
- Check [open issues](https://github.com/LANCommander/LANCommander/issues) for bugs or feature requests
- Documentation improvements are always welcome at our [documentation site](https://docs.lancommander.app/)
- Game packaging scripts and guides for the community
### Code Guidelines
- Follow existing code style and conventions in the project
- Keep PRs focused, one feature or fix per PR when possible
- Include screenshots in your PR if you're changing UI
## Project Structure
| Directory | Description |
|-----------|-------------|
| `LANCommander.Server` | ASP.NET Blazor web application (server/admin) |
| `LANCommander.Launcher` | Avalonia desktop client (launcher) |
| `LANCommander.Packager` | Game packaging tool |
| `LANCommander.SDK` | .NET SDK for building custom clients |
| `LANCommander.Server.Data` | Entity Framework data models and migrations |
| `LANCommander.Server.Services` | Server business logic |
| `LANCommander.Documentation` | Docusaurus documentation site |
## Community
- [Discord](https://discord.gg/vDEEWVt8EM): Best place for discussion, help, and sharing game packages
## License
By contributing to LANCommander, you agree that your contributions will be licensed under the [MIT License](LICENSE).

View file

@ -5,6 +5,7 @@
<ItemGroup Label="Aspire"> <ItemGroup Label="Aspire">
<PackageVersion Include="Aspire.Hosting.AppHost" Version="9.5.0" /> <PackageVersion Include="Aspire.Hosting.AppHost" Version="9.5.0" />
<PackageVersion Include="AvaloniaUI.DiagnosticsSupport" Version="2.1.1" /> <PackageVersion Include="AvaloniaUI.DiagnosticsSupport" Version="2.1.1" />
<PackageVersion Include="DiscordRichPresence" Version="1.6.1.70" />
<PackageVersion Include="EasyMDE.Blazor" Version="1.0.5" /> <PackageVersion Include="EasyMDE.Blazor" Version="1.0.5" />
<PackageVersion Include="HotAvalonia" Version="3.1.0" /> <PackageVersion Include="HotAvalonia" Version="3.1.0" />
<PackageVersion Include="LiveChartsCore" Version="2.0.0-rc5.4" /> <PackageVersion Include="LiveChartsCore" Version="2.0.0-rc5.4" />
@ -12,7 +13,7 @@
<PackageVersion Include="LiveChartsCore.SkiaSharpView.Avalonia" Version="2.0.0-rc5.4" /> <PackageVersion Include="LiveChartsCore.SkiaSharpView.Avalonia" Version="2.0.0-rc5.4" />
<PackageVersion Include="Markdig" Version="0.44.0" /> <PackageVersion Include="Markdig" Version="0.44.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Configuration" Version="9.0.8" /> <PackageVersion Include="Microsoft.Extensions.Logging.Configuration" Version="9.0.8" />
<PackageVersion Include="Notify.NET" Version="1.0.2" /> <PackageVersion Include="Notify.NET" Version="1.1.0" />
<PackageVersion Include="Svrooij.PowerShell.DI" Version="1.3.4" /> <PackageVersion Include="Svrooij.PowerShell.DI" Version="1.3.4" />
</ItemGroup> </ItemGroup>
<ItemGroup Label="AutoMapper"> <ItemGroup Label="AutoMapper">
@ -36,7 +37,6 @@
<PackageVersion Include="HtmlAgilityPack" Version="1.11.72" /> <PackageVersion Include="HtmlAgilityPack" Version="1.11.72" />
<PackageVersion Include="Crc32.NET" Version="1.2.0" /> <PackageVersion Include="Crc32.NET" Version="1.2.0" />
<PackageVersion Include="Emzi0767.NtfsDataStreams" Version="1.0.0" /> <PackageVersion Include="Emzi0767.NtfsDataStreams" Version="1.0.0" />
<PackageVersion Include="MadMilkman.Ini" Version="1.0.6" />
<PackageVersion Include="PeanutButter.INI" Version="3.0.396" /> <PackageVersion Include="PeanutButter.INI" Version="3.0.396" />
<PackageVersion Include="Superpower" Version="3.1.0" /> <PackageVersion Include="Superpower" Version="3.1.0" />
<PackageVersion Include="RegParserDotNet" Version="1.1.1" /> <PackageVersion Include="RegParserDotNet" Version="1.1.1" />
@ -69,7 +69,9 @@
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.12.0" /> <PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.12.0" />
</ItemGroup> </ItemGroup>
<ItemGroup Label="Testing"> <ItemGroup Label="Testing">
<PackageVersion Include="bunit" Version="1.40.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.4" /> <PackageVersion Include="coverlet.collector" Version="6.0.4" />
<PackageVersion Include="Microsoft.Playwright" Version="1.51.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" /> <PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" /> <PackageVersion Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
<PackageVersion Include="Microsoft.TypeScript.MSBuild" Version="5.7.1" /> <PackageVersion Include="Microsoft.TypeScript.MSBuild" Version="5.7.1" />
@ -85,17 +87,19 @@
</ItemGroup> </ItemGroup>
<ItemGroup Label="External"> <ItemGroup Label="External">
<PackageVersion Include="CoreRCON" Version="5.0.5" /> <PackageVersion Include="CoreRCON" Version="5.0.5" />
<PackageVersion Include="LANCommander.HQ.SDK" Version="1.0.1" />
<PackageVersion Include="craftersmine.SteamGridDB.Net" Version="1.1.7" /> <PackageVersion Include="craftersmine.SteamGridDB.Net" Version="1.1.7" />
<PackageVersion Include="YoutubeExplode" Version="6.4.3" /> <PackageVersion Include="YoutubeExplode" Version="6.4.3" />
<PackageVersion Include="Docker.DotNet.Enhanced" Version="3.129.0" /> <PackageVersion Include="Docker.DotNet.Enhanced" Version="3.129.0" />
<PackageVersion Include="Facepunch.Steamworks" Version="2.3.3" /> <PackageVersion Include="Facepunch.Steamworks" Version="2.3.3" />
<PackageVersion Include="IGDB" Version="6.1.0" /> <PackageVersion Include="IGDB" Version="6.1.0" />
<PackageVersion Include="IPXRelayDotNet" Version="1.1.3" /> <PackageVersion Include="IPXRelayDotNet" Version="1.1.3" />
<PackageVersion Include="LANCommander.Interposer" Version="1.0.7" />
<PackageVersion Include="Octokit" Version="14.0.0" /> <PackageVersion Include="Octokit" Version="14.0.0" />
<PackageVersion Include="RestSharp" Version="112.1.0" /> <PackageVersion Include="RestSharp" Version="112.1.0" />
<PackageVersion Include="rix0rrr.BeaconLib" Version="1.0.2" /> <PackageVersion Include="rix0rrr.BeaconLib" Version="1.0.2" />
<PackageVersion Include="Semver" Version="3.0.0" /> <PackageVersion Include="Semver" Version="3.0.0" />
<PackageVersion Include="SharpCompress" Version="0.47.0" /> <PackageVersion Include="SharpCompress" Version="0.50.0" />
<PackageVersion Include="SteamWebAPI2" Version="4.4.1" /> <PackageVersion Include="SteamWebAPI2" Version="4.4.1" />
</ItemGroup> </ItemGroup>
<ItemGroup Label="Entity Framework Core"> <ItemGroup Label="Entity Framework Core">
@ -120,7 +124,7 @@
<ItemGroup Label="Microsoft Extensions"> <ItemGroup Label="Microsoft Extensions">
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="9.0.8" /> <PackageVersion Include="Microsoft.Extensions.Configuration" Version="9.0.8" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.9" /> <PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.1" /> <PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.8" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.9" /> <PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.1" /> <PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.1" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.9" /> <PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.9" />
@ -143,6 +147,15 @@
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.12.0" /> <PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.12.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.12.0" /> <PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.12.0" />
</ItemGroup> </ItemGroup>
<ItemGroup Label="LibVLC">
<PackageVersion Include="LibVLCSharp" Version="3.8.5" />
<PackageVersion Include="LibVLCSharp.Avalonia" Version="3.8.5" />
<PackageVersion Include="VideoLAN.LibVLC.Windows" Version="3.0.23.1" />
<PackageVersion Include="VideoLAN.LibVLC.Mac" Version="3.1.3.1" />
</ItemGroup>
<ItemGroup Label="SDL">
<PackageVersion Include="ppy.SDL3-CS" Version="2026.520.0" />
</ItemGroup>
<ItemGroup Label="Photino"> <ItemGroup Label="Photino">
<PackageVersion Include="AsyncImageLoader.Avalonia" Version="3.3.0" /> <PackageVersion Include="AsyncImageLoader.Avalonia" Version="3.3.0" />
<PackageVersion Include="Avalonia" Version="11.2.3" /> <PackageVersion Include="Avalonia" Version="11.2.3" />

View file

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\LANCommander.SDK\LANCommander.SDK.csproj" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,512 @@
using System.Management.Automation;
using System.Reflection;
using System.Text;
using System.Text.Json;
using LANCommander.SDK.PowerShell.Extensions;
if (args.Length == 0)
{
Console.Error.WriteLine("Usage: LANCommander.CompletionGenerator <output-path>");
return 1;
}
var outputPath = args[0];
var assembly = typeof(InitialSessionStateExtensions).Assembly;
var cmdletTypes = assembly.GetTypes()
.Where(t => t.GetCustomAttribute<CmdletAttribute>() != null)
.OrderBy(t => t.GetCustomAttribute<CmdletAttribute>()!.VerbName + "-" + t.GetCustomAttribute<CmdletAttribute>()!.NounName);
var sb = new StringBuilder();
sb.AppendLine("// Auto-generated by LANCommander.CompletionGenerator — do not edit manually");
sb.AppendLine();
sb.AppendLine("export interface CmdletParameter {");
sb.AppendLine(" name: string;");
sb.AppendLine(" type: string;");
sb.AppendLine(" mandatory: boolean;");
sb.AppendLine(" position: number | null;");
sb.AppendLine(" helpMessage: string | null;");
sb.AppendLine(" aliases: string[];");
sb.AppendLine("}");
sb.AppendLine();
sb.AppendLine("export interface CmdletDefinition {");
sb.AppendLine(" name: string;");
sb.AppendLine(" description: string | null;");
sb.AppendLine(" outputType: string | null;");
sb.AppendLine(" parameters: CmdletParameter[];");
sb.AppendLine("}");
sb.AppendLine();
sb.AppendLine("export const cmdlets: CmdletDefinition[] = [");
foreach (var type in cmdletTypes)
{
var cmdletAttr = type.GetCustomAttribute<CmdletAttribute>()!;
var name = $"{cmdletAttr.VerbName}-{cmdletAttr.NounName}";
var outputTypeAttr = type.GetCustomAttribute<OutputTypeAttribute>();
string? outputType = null;
if (outputTypeAttr?.Type?.Length > 0)
outputType = GetFriendlyTypeName(outputTypeAttr.Type[0].Type);
// Use XML doc summary if available via the Summary property pattern, otherwise use null
var descriptionLines = type.GetCustomAttributes()
.Where(a => a.GetType().Name == "DescriptionAttribute")
.Select(a => a.GetType().GetProperty("Description")?.GetValue(a)?.ToString())
.FirstOrDefault();
// Fall back to XML summary comment — not available via reflection, use class summary convention
string? description = descriptionLines;
sb.AppendLine(" {");
sb.AppendLine($" name: {JsonEncode(name)},");
sb.AppendLine($" description: {JsonEncode(description)},");
sb.AppendLine($" outputType: {JsonEncode(outputType)},");
sb.AppendLine(" parameters: [");
var properties = type.GetProperties(BindingFlags.Public | BindingFlags.Instance)
.Where(p => p.GetCustomAttribute<ParameterAttribute>() != null)
.OrderBy(p =>
{
var pa = p.GetCustomAttribute<ParameterAttribute>()!;
return pa.Position == int.MinValue ? int.MaxValue : pa.Position;
})
.ThenBy(p => p.Name);
foreach (var prop in properties)
{
var paramAttr = prop.GetCustomAttribute<ParameterAttribute>()!;
var aliasAttr = prop.GetCustomAttribute<AliasAttribute>();
var aliases = aliasAttr?.AliasNames?.ToArray() ?? Array.Empty<string>();
var position = paramAttr.Position == int.MinValue ? (int?)null : paramAttr.Position;
sb.AppendLine(" {");
sb.AppendLine($" name: {JsonEncode(prop.Name)},");
sb.AppendLine($" type: {JsonEncode(GetFriendlyTypeName(prop.PropertyType))},");
sb.AppendLine($" mandatory: {(paramAttr.Mandatory ? "true" : "false")},");
sb.AppendLine($" position: {(position.HasValue ? position.Value.ToString() : "null")},");
sb.AppendLine($" helpMessage: {JsonEncode(paramAttr.HelpMessage)},");
sb.AppendLine($" aliases: [{string.Join(", ", aliases.Select(a => JsonEncode(a)))}],");
sb.AppendLine(" },");
}
sb.AppendLine(" ],");
sb.AppendLine(" },");
}
sb.AppendLine("];");
sb.AppendLine();
// Generate built-in PowerShell cmdlet completions from core modules
var builtinCmdletNames = new HashSet<string>(cmdletTypes.Select(t =>
{
var a = t.GetCustomAttribute<CmdletAttribute>()!;
return $"{a.VerbName}-{a.NounName}";
}));
Console.WriteLine("Enumerating built-in PowerShell cmdlets...");
sb.AppendLine("export const builtinCmdlets: CmdletDefinition[] = [");
var builtinCount = 0;
try
{
// Use external pwsh process for full module metadata and help access
var psScript = @"
$commonParams = @(
'Verbose','Debug','ErrorAction','WarningAction','InformationAction',
'ErrorVariable','WarningVariable','InformationVariable','OutVariable',
'OutBuffer','PipelineVariable','ProgressAction','Confirm','WhatIf'
)
$modules = @(
'Microsoft.PowerShell.Management',
'Microsoft.PowerShell.Utility',
'Microsoft.PowerShell.Security',
'Microsoft.PowerShell.Archive'
)
$results = @()
# Get command names from core modules, then resolve each individually for full metadata
$commandNames = Get-Command -CommandType Cmdlet,Function -Module $modules -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Name -Unique
foreach ($cmdName in $commandNames) {
$cmd = Get-Command $cmdName -ErrorAction SilentlyContinue
if (-not $cmd) { continue }
$synopsis = $null
try {
$h = Get-Help $cmdName -ErrorAction SilentlyContinue
if ($h -and $h.Synopsis) {
$s = $h.Synopsis.Trim()
# Skip if synopsis is just the cmdlet name, or looks like syntax (contains parameter notation)
if ($s -ne $cmdName -and $s -notmatch '\[[-<]' -and $s -notmatch '-\w+\s+<') {
$synopsis = $s
}
}
} catch {}
$outputType = $null
if ($cmd.OutputType -and $cmd.OutputType.Count -gt 0 -and $cmd.OutputType[0].Type) {
$outputType = $cmd.OutputType[0].Type.Name
}
$params = @()
if ($cmd.Parameters) {
foreach ($key in $cmd.Parameters.Keys) {
if ($key -in $commonParams) { continue }
$p = $cmd.Parameters[$key]
$pAttr = $p.Attributes | Where-Object { $_ -is [System.Management.Automation.ParameterAttribute] } | Select-Object -First 1
$mandatory = $false
$position = $null
$helpMsg = $null
if ($pAttr) {
$mandatory = [bool]$pAttr.Mandatory
if ($pAttr.Position -ne [int]::MinValue) {
$position = $pAttr.Position
}
if ($pAttr.HelpMessage) {
$helpMsg = $pAttr.HelpMessage
}
}
$aliases = @($p.Aliases)
$params += @{
n = $key
t = $p.ParameterType.Name
m = $mandatory
pos = $position
h = $helpMsg
a = $aliases
}
}
}
$results += @{
name = $cmdName
desc = $synopsis
out = $outputType
params = $params
}
}
$results | ConvertTo-Json -Depth 4 -Compress
";
// Write the script to a temp file to avoid stdin encoding issues
var tempScript = Path.GetTempFileName() + ".ps1";
File.WriteAllText(tempScript, psScript, new UTF8Encoding(false));
var psi = new System.Diagnostics.ProcessStartInfo
{
FileName = "pwsh",
Arguments = $"-NoProfile -NonInteractive -ExecutionPolicy Bypass -File \"{tempScript}\"",
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
CreateNoWindow = true,
};
// Clear .NET SDK environment variables that can interfere with pwsh's module loading
foreach (var key in Environment.GetEnvironmentVariables().Keys.Cast<string>()
.Where(k => k.StartsWith("DOTNET_", StringComparison.OrdinalIgnoreCase) ||
k.StartsWith("MSBuild", StringComparison.OrdinalIgnoreCase)))
{
psi.Environment[key] = null;
}
using var process = System.Diagnostics.Process.Start(psi)!;
var json = process.StandardOutput.ReadToEnd();
var stderr = process.StandardError.ReadToEnd();
process.WaitForExit(120_000);
if (!string.IsNullOrWhiteSpace(stderr))
Console.Error.WriteLine($" pwsh stderr: {stderr.Trim()}");
try { File.Delete(tempScript); } catch { }
if (process.ExitCode != 0)
throw new Exception($"pwsh exited with code {process.ExitCode}");
using var doc = JsonDocument.Parse(json);
var root = doc.RootElement;
// Handle both array and single-object responses
var elements = root.ValueKind == JsonValueKind.Array
? root.EnumerateArray().ToList()
: new List<JsonElement> { root };
foreach (var cmd in elements.OrderBy(e => e.GetProperty("name").GetString()))
{
var name = cmd.GetProperty("name").GetString()!;
if (builtinCmdletNames.Contains(name))
continue;
string? description = null;
if (cmd.TryGetProperty("desc", out var descEl) && descEl.ValueKind == JsonValueKind.String)
description = descEl.GetString();
string? outputTypeName = null;
if (cmd.TryGetProperty("out", out var outEl) && outEl.ValueKind == JsonValueKind.String)
outputTypeName = MapTypeName(outEl.GetString()!);
sb.AppendLine(" {");
sb.AppendLine($" name: {JsonEncode(name)},");
sb.AppendLine($" description: {JsonEncode(description)},");
sb.AppendLine($" outputType: {JsonEncode(outputTypeName)},");
sb.AppendLine(" parameters: [");
if (cmd.TryGetProperty("params", out var paramsEl) && paramsEl.ValueKind == JsonValueKind.Array)
{
// Sort: positional first, then alphabetical
var paramList = paramsEl.EnumerateArray().ToList();
paramList.Sort((a, b) =>
{
var posA = a.TryGetProperty("pos", out var pa) && pa.ValueKind == JsonValueKind.Number ? pa.GetInt32() : int.MaxValue;
var posB = b.TryGetProperty("pos", out var pb) && pb.ValueKind == JsonValueKind.Number ? pb.GetInt32() : int.MaxValue;
var cmp = posA.CompareTo(posB);
if (cmp != 0) return cmp;
return string.Compare(
a.GetProperty("n").GetString(),
b.GetProperty("n").GetString(),
StringComparison.Ordinal);
});
foreach (var param in paramList)
{
var paramName = param.GetProperty("n").GetString()!;
var typeName = MapTypeName(param.GetProperty("t").GetString() ?? "object");
var mandatory = param.TryGetProperty("m", out var mEl) && mEl.ValueKind == JsonValueKind.True;
string? posStr = "null";
if (param.TryGetProperty("pos", out var posEl) && posEl.ValueKind == JsonValueKind.Number)
posStr = posEl.GetInt32().ToString();
string? helpMessage = null;
if (param.TryGetProperty("h", out var hEl) && hEl.ValueKind == JsonValueKind.String)
helpMessage = hEl.GetString();
var aliases = new List<string>();
if (param.TryGetProperty("a", out var aEl) && aEl.ValueKind == JsonValueKind.Array)
{
foreach (var alias in aEl.EnumerateArray())
{
if (alias.ValueKind == JsonValueKind.String)
aliases.Add(alias.GetString()!);
}
}
sb.AppendLine(" {");
sb.AppendLine($" name: {JsonEncode(paramName)},");
sb.AppendLine($" type: {JsonEncode(typeName)},");
sb.AppendLine($" mandatory: {(mandatory ? "true" : "false")},");
sb.AppendLine($" position: {posStr},");
sb.AppendLine($" helpMessage: {JsonEncode(helpMessage)},");
sb.AppendLine($" aliases: [{string.Join(", ", aliases.Select(a => JsonEncode(a)))}],");
sb.AppendLine(" },");
}
}
sb.AppendLine(" ],");
sb.AppendLine(" },");
builtinCount++;
}
}
catch (Exception ex)
{
Console.Error.WriteLine($"Warning: Failed to enumerate built-in cmdlets: {ex.Message}");
Console.Error.WriteLine("Ensure 'pwsh' (PowerShell 7+) is installed and on PATH.");
}
sb.AppendLine("];");
sb.AppendLine();
// Generate type definitions for complex objects used as script variables
var variableTypes = new Dictionary<string, Type>
{
["GameManifest"] = typeof(LANCommander.SDK.Models.Manifest.Game),
["ToolManifest"] = typeof(LANCommander.SDK.Models.Manifest.Tool),
["RedistributableManifest"] = typeof(LANCommander.SDK.Models.Manifest.Redistributable),
["Server"] = typeof(LANCommander.SDK.Models.Server),
["Game"] = typeof(LANCommander.SDK.Models.Game),
["User"] = typeof(LANCommander.SDK.Models.User),
["Tool"] = typeof(LANCommander.SDK.Models.Tool),
["Redistributable"] = typeof(LANCommander.SDK.Models.Redistributable),
};
sb.AppendLine("export interface TypeProperty {");
sb.AppendLine(" name: string;");
sb.AppendLine(" type: string;");
sb.AppendLine("}");
sb.AppendLine();
sb.AppendLine("export interface TypeDefinition {");
sb.AppendLine(" name: string;");
sb.AppendLine(" properties: TypeProperty[];");
sb.AppendLine("}");
sb.AppendLine();
sb.AppendLine("export const variableTypes: TypeDefinition[] = [");
foreach (var (typeName, clrType) in variableTypes.OrderBy(kv => kv.Key))
{
sb.AppendLine(" {");
sb.AppendLine($" name: {JsonEncode(typeName)},");
sb.AppendLine(" properties: [");
var props = clrType.GetProperties(BindingFlags.Public | BindingFlags.Instance)
.Where(p => p.CanRead)
.OrderBy(p => p.Name);
foreach (var prop in props)
{
sb.AppendLine(" {");
sb.AppendLine($" name: {JsonEncode(prop.Name)},");
sb.AppendLine($" type: {JsonEncode(GetPropertyTypeName(prop.PropertyType))},");
sb.AppendLine(" },");
}
sb.AppendLine(" ],");
sb.AppendLine(" },");
}
sb.AppendLine("];");
sb.AppendLine();
// Generate ScriptType enum values
sb.AppendLine("export const scriptTypeValues: string[] = [");
foreach (var value in Enum.GetNames<LANCommander.SDK.Enums.ScriptType>())
{
sb.AppendLine($" {JsonEncode(value)},");
}
sb.AppendLine("];");
var directory = Path.GetDirectoryName(outputPath);
if (!string.IsNullOrEmpty(directory))
Directory.CreateDirectory(directory);
File.WriteAllText(outputPath, sb.ToString(), Encoding.UTF8);
Console.WriteLine($"Generated completions for {cmdletTypes.Count()} LANCommander cmdlets, {builtinCount} built-in cmdlets, and {variableTypes.Count} variable types -> {outputPath}");
return 0;
static string JsonEncode(string? value)
{
if (value == null) return "null";
return JsonSerializer.Serialize(value);
}
static string GetPropertyTypeName(Type type)
{
var underlying = Nullable.GetUnderlyingType(type);
if (underlying != null)
return GetPropertyTypeName(underlying) + "?";
if (type.IsArray)
return GetPropertyTypeName(type.GetElementType()!) + "[]";
if (type.IsGenericType)
{
var genericDef = type.GetGenericTypeDefinition();
if (genericDef == typeof(IEnumerable<>) || genericDef == typeof(ICollection<>) ||
genericDef == typeof(List<>) || genericDef == typeof(IList<>))
{
var elementType = type.GetGenericArguments()[0];
return GetPropertyTypeName(elementType) + "[]";
}
}
// Check non-generic IEnumerable
if (type != typeof(string) && type.GetInterfaces().Any(i =>
i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IEnumerable<>)))
{
var elementType = type.GetInterfaces()
.First(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IEnumerable<>))
.GetGenericArguments()[0];
return GetPropertyTypeName(elementType) + "[]";
}
if (type == typeof(string)) return "string";
if (type == typeof(int) || type == typeof(long)) return "int";
if (type == typeof(uint)) return "uint";
if (type == typeof(double) || type == typeof(float)) return "double";
if (type == typeof(bool)) return "bool";
if (type == typeof(Guid)) return "Guid";
if (type == typeof(DateTime)) return "DateTime";
if (type == typeof(Uri)) return "Uri";
if (type.IsEnum) return type.Name;
return type.Name;
}
static string MapTypeName(string typeName) => typeName switch
{
"String" => "string",
"Int32" => "int",
"Int64" => "long",
"UInt32" => "uint",
"Double" => "double",
"Single" => "float",
"Boolean" => "bool",
"Byte" => "byte",
"Guid" => "Guid",
"Uri" => "Uri",
"DateTime" => "DateTime",
"Object" => "object",
"SwitchParameter" => "SwitchParameter",
"SecureString" => "SecureString",
"String[]" => "string[]",
"Int32[]" => "int[]",
"Object[]" => "object[]",
"Byte[]" => "byte[]",
"PSObject" => "object",
"PSObject[]" => "object[]",
"Hashtable" => "Hashtable",
"ScriptBlock" => "ScriptBlock",
"TimeSpan" => "TimeSpan",
"PSCredential" => "PSCredential",
_ => typeName,
};
static string GetFriendlyTypeName(Type? type)
{
if (type == null) return "object";
// Handle nullable types
var underlying = Nullable.GetUnderlyingType(type);
if (underlying != null)
return GetFriendlyTypeName(underlying) + "?";
// Handle arrays
if (type.IsArray)
return GetFriendlyTypeName(type.GetElementType()) + "[]";
// Handle SwitchParameter
if (type == typeof(SwitchParameter))
return "SwitchParameter";
// Handle common types
if (type == typeof(string)) return "string";
if (type == typeof(int)) return "int";
if (type == typeof(long)) return "long";
if (type == typeof(uint)) return "uint";
if (type == typeof(double)) return "double";
if (type == typeof(float)) return "float";
if (type == typeof(bool)) return "bool";
if (type == typeof(byte)) return "byte";
if (type == typeof(byte[])) return "byte[]";
if (type == typeof(Guid)) return "Guid";
if (type == typeof(Uri)) return "Uri";
if (type == typeof(object)) return "object";
// Handle SecureString
if (type == typeof(System.Security.SecureString))
return "SecureString";
return type.Name;
}

View file

@ -25,5 +25,6 @@ This site serves as the main documentation platform for the project. As such, it
- [Getting Started](/GettingStarted) - [Getting Started](/GettingStarted)
- [Server](/Server/Overview) - [Server](/Server/Overview)
- [Launcher](/Launcher/Overview) - [Launcher](/Launcher/Overview)
- [Packager](/Packager/Overview)
- [Scripting](/Scripting/Overview) - [Scripting](/Scripting/Overview)
- [SDK Documentation](/SDK/Overview) - [SDK Documentation](/SDK/Overview)

View file

@ -0,0 +1,34 @@
---
sidebar_label: Getting Started
sidebar_position: 2
---
# Getting Started
## Requirements
- **Windows 10 or later** (x86 or x64)
- **Administrator privileges** - the Packager requires elevation to monitor installer processes via DLL injection
The Packager is distributed as a single 32-bit executable (`LANCommander.Packager.exe`). No installation is required.
## Download
Download the latest release from the [GitHub Releases page](https://github.com/LANCommander/LANCommander/releases). The Packager artifact is named `LANCommander.Packager-Windows-x86-v{VERSION}.zip`.
Extract the archive to a directory of your choice and run `LANCommander.Packager.exe`.
## Command-Line Usage
The Packager can optionally accept arguments to skip the initial file picker dialog:
```
LANCommander.Packager.exe [installer-path] [-o output-path]
```
| Argument | Description |
|:--------:|:------------|
| `installer-path` | Path to the installer executable to monitor |
| `-o`, `--output` | Path for the output `.lcx` file |
If no installer path is provided, a file picker dialog will appear on launch.

View file

@ -0,0 +1,47 @@
---
sidebar_label: LCX Package Format
sidebar_position: 4
---
# LCX Package Format
An `.LCX` file is a standard ZIP archive containing everything needed to install and configure a game through LANCommander. The Packager generates this format automatically, but understanding its structure is useful for troubleshooting or manual editing.
## Archive Structure
```
package.lcx (ZIP)
├── manifest.yaml # Game metadata (YAML)
├── Archives/
│ └── {guid} # Inner ZIP containing game files
└── Scripts/
├── {guid} # Install script (PowerShell)
└── {guid} # Uninstall script (PowerShell)
```
### manifest.yaml
The manifest is a YAML file describing the game's metadata, actions, archive references, and script references. It follows the LANCommander SDK's `Game` manifest schema and includes:
- **Title, Sort Title, Version, Description, Notes** - basic metadata
- **Released On, Singleplayer** - classification
- **Directory Name** - the expected install directory name
- **Actions** - launch configurations (name, executable path, arguments, primary flag)
- **Archives** - references to inner archive entries with compressed/uncompressed sizes
- **Scripts** - references to script entries with type (Install/Uninstall) and admin requirements
### Archives
The `Archives/` directory contains one or more inner ZIP files, each identified by a GUID. The inner archive holds the game files with paths relative to the install directory root.
### Scripts
The `Scripts/` directory contains PowerShell scripts identified by GUID. The Packager generates up to two scripts:
**Install Script** - Recreates registry keys and values captured during monitoring. If the Patch GameSpy option was enabled, it also includes an `Edit-PatchGameSpy` call. Scripts assume `$InstallDirectory` is available in the execution environment (provided by the launcher's PowerShell runtime).
**Uninstall Script** - Removes the registry keys and values that were created by the install script.
## Importing into LANCommander
`.LCX` packages can be imported directly through the LANCommander server's web interface. The server reads the manifest, extracts the archive and scripts, and creates the corresponding game entry with all metadata, actions, and scripts pre-configured.

View file

@ -0,0 +1,14 @@
---
sidebar_label: Overview
sidebar_position: 1
---
# Packager
The LANCommander Packager is a standalone Windows utility that automates the creation of `.LCX` game packages. It monitors a game installer as it runs, captures all file and registry changes, and guides you through a wizard to produce a ready-to-import package for your LANCommander server.
Instead of manually creating archives, writing install scripts, and filling out metadata by hand, the Packager handles all of this in a single guided workflow.
- [Getting Started](/Packager/Getting%20Started) - requirements, download, and command-line usage
- [Wizard Walkthrough](/Packager/Wizard) - step-by-step guide through the seven wizard stages
- [LCX Package Format](/Packager/LCX%20Format) - internal structure of `.LCX` files

View file

@ -0,0 +1,114 @@
---
sidebar_label: Wizard Walkthrough
sidebar_position: 3
---
# Wizard Walkthrough
The Packager walks you through seven steps to create a complete `.LCX` package. Each step is shown in the sidebar with a progress indicator.
---
## Step 1: Monitor Installer
After selecting an installer executable, the Packager launches it and monitors all file and registry activity using native DLL injection (Interposer). A real-time log displays captured events as the installer runs.
The Packager automatically:
- Detects the installer's architecture (32-bit or 64-bit) and injects the appropriate Interposer DLL
- Monitors child processes spawned by the installer
- Filters out writes to system directories (Windows, temp folders)
- Captures both file writes and registry key/value creation
Once the installer exits, the captured data is summarized in the status bar. Click **Next** to continue.
:::info
The log view continues to show captured events for reference. All diagnostic output is also written to `packager.log` in the application directory.
:::
---
## Step 2: Install Directory
The Packager analyzes the captured file writes to detect the game's installation directory. This is determined by finding the most common non-system directory among the written files.
If the detected directory is incorrect, click **Browse** to manually select the correct location. This directory becomes the root of the game archive.
---
## Step 3: Select Files
All files within the install directory are displayed in a tree view with checkboxes. By default, every file is selected.
- **Check/uncheck a directory** to toggle all files within it
- **Select All** / **Select None** buttons at the top for bulk operations
- The counter at the top shows how many files are currently selected
Files outside the install directory (if any were captured) are listed by their full paths. Only files that still exist on disk at this point are shown.
---
## Step 4: Registry Entries
All captured registry writes are displayed in a tree view organized by hive and key path. Entries are deduplicated so if the same key and value were written multiple times during installation, only one entry is shown.
Each leaf entry displays an indicator:
- **Green +** - the entry was created during installation
- **Yellow ~** - the entry was updated (written to an existing key)
Selected entries will be included in the auto-generated install and uninstall scripts. The install script recreates the registry keys and values; the uninstall script removes them.
---
## Step 5: Game Metadata
Enter basic information about the game. The title is pre-populated from the installer's filename.
| Field | Description |
|:------|:------------|
| **Title** | Display name of the game (required) |
| **Sort Title** | Optional override for alphabetical sorting |
| **Version** | Game version, defaults to `1.0` |
| **Released On** | Release date of the game |
| **Singleplayer** | Whether the game supports singleplayer |
| **Description** | A description of the game |
| **Notes** | Private notes (admin-only, not shown to users) |
---
## Step 6: Game Executable
The Packager scans your selected files for `.exe` files and filters out common installer/redistributable executables (e.g. `vcredist`, `dxsetup`, `setup`, `unins`). The remaining executables are displayed in a list.
Select the primary game executable. This is the file the launcher will run when the user clicks "Play". You can also customize:
| Field | Description |
|:------|:------------|
| **Action Name** | Label shown on the play button, defaults to `Play` |
| **Arguments** | Command-line arguments passed when launching |
---
## Step 7: Generate Package
Configure the output path for the `.LCX` file and optionally adjust packaging options before generating.
### Output Path
The default output path is based on the game title in the current working directory. Click **Browse** to choose a different location.
### Options
Expand the **Options** panel to configure additional settings:
| Option | Description |
|:-------|:------------|
| **Patch GameSpy** | Adds an `Edit-PatchGameSpy -Path $InstallDirectory` call to the install script. This scans the install directory for GameSpy references and patches them for OpenSpy compatibility. |
| **Compression Level** | Controls the trade-off between archive size and packaging speed. Options: Optimal (default), Fastest, No Compression, Smallest Size. |
| **Write Summary Log** | Writes a `.Package.log` file alongside the `.LCX` output documenting the source installer, selected files, registry entries, metadata, and options used. |
Click **Generate .LCX** to build the package. A progress bar shows the current stage:
1. Creating game files archive
2. Generating scripts
3. Writing manifest
On completion, the output path and file size are displayed.

View file

@ -0,0 +1,195 @@
---
title: 2.1.0-rc1
---
import ReleaseDownloads from '@site/src/components/ReleaseDownloads';
import ScreenshotCarousel from '@site/src/components/ScreenshotCarousel';
import ContributorGrid from '@site/src/components/ContributorGrid';
# LANCommander 2.1.0 Release Candidate 1 Release Notes
## Breaking Changes
### .NET 10
LANCommander has been upgraded from .NET 8 to .NET 10. This should be a seamless transition as all LANCommander binaries are self-contained and include the appropriate .NET runtime. However, if you are running an older version of Windows that does not support .NET 10, you may encounter issues running this version of LANCommander. The minimum supported Windows version is now Windows 10 version 1809.
## Launching Into the Future
To kick things off, LANCommander 2.1.0 introduces a new launcher. As a recap, the previous launcher was built using .NET Blazor and wrapped into a Webview2 chrome using the open source project [Photino](https://www.tryphotino.io/). This decision was originally made in an effort to maintain a somewhat shared codebase with the server web UI.
Unfortunately, over time limitations of the platform made it apparent that a change had to be made. Community member [aaronpowell](https://github.com/aaronpowell) stepped up and built out a proof of concept for a launcher using Avalonia, an open-source native cross-platform UI framework for .NET. The potential was immediately clear and the decision was made to jump in head first. The following months saw the project refocus on build a new launcher with a major emphasis on performance, reliability, design, and feature parity.
The result is, well, a project that went off a little off the rails in the best possible fashion:
<ScreenshotCarousel screenshots={[
{ src: require('./_Assets/2.1.0 - Launcher.jpg').default, alt: 'Launcher', label: 'Launcher', caption: 'The brand new Avalonia-based launcher' },
{ src: require('./_Assets/2.1.0 - Shelf.jpg').default, alt: 'Shelf View', label: 'Shelf View', caption: 'Browse your library in the new shelf layout' },
{ src: require('./_Assets/2.1.0 - Depot.jpg').default, alt: 'Depot', label: 'Depot', caption: 'The redesigned depot with categorization carousels' },
{ src: require('./_Assets/2.1.0 - Screenshot.jpg').default, alt: 'Game Details', label: 'Game Details', caption: 'Screenshots and videos displayed right in the detail view' },
{ src: require('./_Assets/2.1.0 - Downloads.png').default, alt: 'Download Queue', label: 'Download Queue', caption: 'Track every step of the installation process' },
]} />
I think the screenshots speak for themselves. Okay, not quite, there's a lot of fun stuff in this build so let's dive right in!
### User Library
Previous versions of the launcher attempted to bring the art of a game to the forefront. These views are where most players spend their time interacting with the application. However, everyone's tastes are different. As such the library now contains three main views; cover grid, list, and shelf.
![Shelf View](./_Assets/2.1.0%20-%20Shelf.jpg)
### Game Details
Browsing the user library is great and all, but the detail view is where a game really gets to shine. Metadata has shifted to the right-hand side, descriptions now support more complex formatting with Markdown rendering support, and _finally_ videos and screenshots are displayed in a carousel. A lightbox viewer lets you zoom in on screenshots, watch videos, and even read game manuals right from the detail view thanks to the new built-in PDF viewer.
![Game Screenshot Detail](./_Assets/2.1.0%20-%20Screenshot.jpg)
This is really just the start of something new. Expect this part of the launcher to be built out more in the future with better publishing tools and metadata expansion.
### Depot
The depot has been overhauled too, probably more than any other part of the launcher. Previous iterations have been _fine_, but with large game sets it was hard to find just what you needed. The new depot puts a focus on categorization while maintaining granular filtering tools to get you exactly where you need to go.
![Depot](./_Assets/2.1.0%20-%20Depot.jpg)
As you can see, this section more than any other benefits from high quality metadata. We'll get into that later, but first let's talk about game installation.
### Download Queue
Game installation and downloading has been the hardest component to develop in the entire LANCommander platform. And rightly so! Without game installation, all you get is a fancy web UI and a pretty launcher that can't launch any games.
The LANCommander launcher is essentially a UI wrapper for the LANCommander SDK. The SDK is a .NET library that provides all of the useful bits of communicating with a LANCommander server install. Authentication, script execution, save management, game installation and so much more are provided through this library. In previous iterations, the SDK had a very strict execution plan for installing games. Often times this would lead to deadlocks and outright failures.
To resolve this in 2.1.0, the game install process has moved to a two-layer queuing system. The first layer of the queue manages what actually enters the download queue. This could be a game, redistributable, tool, or addon. The second layer handles any subprocessing step such as executing the different script types, save downloading, existing file verification, etc. The result is a system that is more transparent and reliable.
This queuing system has been exposed somewhat in the download queue:
![Download Queue](./_Assets/2.1.0%20-%20Downloads.png)
Each entry in the download queue will now report each step of the process during a game installation. In addition to looking a bit less mystical, this should give users an idea of what _exactly_ is happening during a game installation.
### Discord Rich Presence
The launcher now integrates with Discord Rich Presence. When you're playing a game through LANCommander, your Discord status will update to show what you're playing. By default this will show as LANCommander with the game name as the status. If the game is mapped to the correct Discord ID (via external IDs in the server), then the game's official Discord assets will be used for a more polished presentation.
### Offline Mode
Previous attempts at an offline mode in the launcher were pretty clunky and unreliable. In 2.1.0, the launcher now has a proper offline mode that allows you to launch previously installed games even when the server is unreachable.
### Single Sign-On
SSO was supported in the previous launcher, but it was a bit of an afterthought and not super reliable. In the new launcher it's been given more attention and should work as expected.
### Chat
As with the last version, the chat functionality remains pretty barebones. This is an area that will get more attention in the future, but it _is_ currently available in the new launcher. It might even work a little better.
## Server Improvements
This release should also be pretty exciting for server admins. With a new launcher with shiny new features brings a set of tools to manage them.
### LANCommander HQ
A new metadata provider has been added: LANCommander HQ. This gives server admins another option for sourcing game metadata and media alongside IGDB and SteamGridDB. In addition, support for external IDs beyond IGDB has been introduced, making it easier to cross-reference games across multiple platforms and services. To get started with the HQ, link your Discord account under "Integrations / HQ" in the server settings. Existing metadata providers such as IGDB and SteamGridDB are still available as well, so no functionality has been lost from previous versions.
### Preview Tool
A new "Preview" editing view has been added to the server for managing game art. Inspired by the launcher's presentation, this tool gives admins a better sense of how their media will look in the launcher before publishing. Screenshots and videos can now be uploaded in bulk, and the media grabber supports selecting multiple assets at once. Animated covers are now supported as well, APNG images grabbed from SteamGridDB are automatically converted to video and should display in the new launcher.
![Preview Tool](./_Assets/2.1.0%20-%20Server%20-%20Preview.png)
### Script Editor Improvements
The script editor has received a significant upgrade. Context-aware code completions now suggest built-in PowerShell cmdlets, LANCommander-specific variables, and generated type definitions. Validation has been improved, and script errors are now logged rather than silently swallowed. A new `Set-GameDetails` cmdlet has been added for specifying package details from within scripts.
### Redistributable Options
Redistributables now support configurable options. Options can be defined with a schema editor, given display names, and are preserved across import/export. Assigning redistributables to a game can now be accessed under the "Redistributables" section of the game editor. When selected, a redistributable with options will render as an easy-to-use form and per-game overrides can be defined.
![Redistributable Options](./_Assets/2.1.0%20-%20Server%20-%20Redistributable%20Options.png)
A new **RunWrapper** script type has been added as well, giving admins more control over how redistributables and games are executed. This should enhance redistributables to cover more use cases such as emulators, launchers, and compatiblity shims like Proton or dgVoodoo.
### Key Management
Key allocation has been improved. The allocation method on keys is now nullable, and a new manual key assignment dialog has been added. The logic for choosing the next available key has also been reworked.
### Media & Tooling
Server settings now include checks for ffmpeg and yt-dlp availability, with automatic installation support in Docker environments. A new streaming endpoint for media has been added, improving video playback in the launcher. Automatic downloads for Steam screenshots have been added as well. YouTube video support has been added to the media grabber, and ffmpeg is now used for video processing tasks such as APNG conversion and thumbnail generation.
## LANCommander HQ
Last but far from least, this release coincides with the launch of [LANCommander HQ](https://hq.lancommander.com), a new metadata provider and community hub for LANCommander users. The HQ aims to provide a centralized platform for game metadata and media across multiple providers, while also normalizing and enhancing that data with a focus on the needs of LANCommander users. There's a bit to cover, so let's dive in!
### Metadata
LANCommander HQ aggregates metadata from multiple sources including IGDB, SteamGridDB, and user contributions. This data is then normalized and enhanced with a focus on the needs of LANCommander users. There are many metadata providers out there, and unfortunately they all have their own unique schemas and data quality issues. The HQ's goal is to provide a single source of truth for game metadata that can be consumed by LANCommander servers and launchers.
There are a lot of exciting features in the works for the HQ, but for this release the focus is on building out the core infrastructure and integrating with the new launcher. Expect to see more features and improvements in the future as the HQ continues to evolve.
### Community
The main features of the HQ are currently focused on metadata, but there is the potential to expand it into a broader community hub for LANCommander users. This could include an area to share game configurations, scripts, and other resources. Additionally, there are some content moderation tools in place that should allow the HQ to host user-generated content and provide the best possible experience for all users. If you have a knack for curation and want to help out, there will likely be opportunities to get involved in the future!
### Tiering / Subscriptions
The HQ operates on a tiered subscription model. Currently there are only two tiers: Basic (Free) and Premium ($5/month). The Basic tier provides access to the core metadata features of the HQ, while the Premium tier provides access to additional features such as enhanced metadata, relaxed rate limiting, and more. More information will be provided in the near future and will be provided on this site under the [LANCommander HQ](/hq) section. All paid subscriptions on the HQ are handled by Stripe, so every transaction is secure and your personal information is protected.
This subscription model is primarily in place to help cover the costs of running the HQ while also providing a sustainable path forward for continued development of LANCommander itself. This entire project is developed and maintained by essentially one person with some help from the community here and there. While this is a labor of love, there are real costs associated with running the infrastructure for the HQ and continued development of LANCommander. The subscription model is designed to be as accessible as possible while also providing a way for users to support the project if they find value in it.
As such, this will probably mean that the Patreon page will be going away in the near future. For existing patrons, it is recommended to switch over to the new subscription model on the HQ as it provides a more direct way to support the project and access the benefits of the HQ _today_.
## Contributions
This release includes contributions from the following community members:
**@aaronpowell | PR [#395](https://github.com/LANCommander/LANCommander/pull/395): Avalonia Launcher**
A substantial 42-commit, 6,000-line PR that bootstrapped the cross-platform Avalonia launcher. Aaron built out the core application structure, service wiring, and async initialization, and then built out the UI with filtered depot browsing and grid layout, a download queue, install/uninstall flows, a settings page, PDF manual viewer, game action bars, and a full CI pipeline for Windows, Linux, and macOS builds. A lot of the foundation that the current launcher sits on came from this PR.
**@akifreak | PR [#398](https://github.com/LANCommander/LANCommander/pull/398): Fix Game Archive Upload**
Discovered that archive uploads through the web UI were silently broken after upgrading to v2.0.2, traced the problem through the JavaScript bundle, and submitted 11 targeted fixes rather than a single bug report. The fixes covered ES module loading, null-guards on DOM elements, a FileMode.Append seek conflict, incorrect archive ID passing, and error propagation throughout the upload pipeline. The uploading process should feel much more stable now!
**@MasterMNB | PR [#400](https://github.com/LANCommander/LANCommander/pull/400): Avalonia Launcher Back Button**
Improved the visibility and styling of the back button in the `GameDetailView`, which was previously hard to distinguish from the background. It's a small change, but it's a real usability improvement that makes navigation feel more intentional.
## Changelog
**Launcher**
- Added: Brand new launcher built on Avalonia
- Added: Screenshots and videos in game detail carousel with lightbox viewer
- Added: Redesigned depot with categorization carousels and advanced filtering
- Added: Tools support
- Added: Download transfer speed graph
- Added: OS notifications upon game installation completion
- Added: Discord Rich Presence integration
- Added: Offline mode for playing games without server connectivity
- Added: SSO/OIDC external authentication provider support
- Added: Built-in PDF viewer for game manuals
- Added: Splash screen on startup
- Added: Verify files option in game dropdown
- Added: Markdown rendering for game descriptions
- Changed: Refactored game/redistributable/tool install process to two-layer queue system
- Changed: Imports should be faster and execute in the background without causing major UI hiccups
- Changed: Improved memory management with proper disposal of HTTP clients, RPC clients, and cancellation tokens
- Fixed: Installing games that already have files on disk will show the verification process during install
- Fixed: Logging in and logging out should no longer cause a hung UI
- Fixed: Install-uninstall-reinstall cycle no longer locks the game
- Fixed: Authentication token race condition causing crashes after login
**Server**
- Added: LANCommander HQ metadata provider support
- Added: Support for external IDs beyond IGDB
- Added: New launcher-inspired "Preview" tool for managing art
- Added: Context-aware script editor with code completions, validation, and PowerShell type definitions
- Added: Redistributable options with schema editor and display names
- Added: RunWrapper script type
- Added: Package versioning for archives
- Added: Bulk upload for screenshots and videos
- Added: Multiple select support in media grabber
- Added: Animated cover support (APNG auto-conversion to video)
- Added: Steam screenshot downloads
- Added: YouTube video support in media grabber
- Added: Media streaming endpoint
- Added: ffmpeg/yt-dlp availability checks and auto-install in Docker
- Added: Manual key assignment dialog and reworked key allocation
- Added: `Set-GameDetails` cmdlet for package scripts
- Fixed: Media uploads should now behave as expected
- Fixed: Game archive uploads in web UI
- Fixed: Orphaned files tool
- Fixed: Redistributable archive downloads
- Fixed: Script working directory for games
- Fixed: SteamCMD login when SteamGuard is enabled
- Fixed: Import file cleanup after completion
**Infrastructure**
- Upgraded to .NET 10
- Added ARM64 build support
- Removed legacy Photino launcher from CI
- Added nightly builds for Avalonia launcher
## Downloads
<ReleaseDownloads release="v2.1.0-rc1" />
## Contributors
<ContributorGrid from="v2.0.2" to="v2.1.0-rc1" />

View file

@ -0,0 +1,99 @@
---
title: 2.1.0-rc2
---
import ReleaseDownloads from '@site/src/components/ReleaseDownloads';
import ScreenshotCarousel from '@site/src/components/ScreenshotCarousel';
import ContributorGrid from '@site/src/components/ContributorGrid';
# LANCommander 2.1.0 Release Candidate 2 Release Notes
## Variable Picker Dialog
A new variable picker dialog has been added to the action editor and save path editor in the server UI. When editing action arguments, working directories, or save paths, a new button opens a dialog that lets you browse and insert LANCommander variables (`{InstallDir}`, `{DisplayWidth}`, etc.), environment variables (`%APPDATA%`, `%LOCALAPPDATA%`, etc.), and special folder paths (`%MyDocuments%`, `%Desktop%`, etc.) with a single click. No more needing to remember exact variable names or syntax.
## Redistributable Improvements
### File Tracking and Cleanup
Redistributable files installed into a game's directory are now tracked. When a game is uninstalled, any files that were extracted by redistributables are cleaned up alongside the game's own files. This prevents leftover redistributable artifacts from lingering in the install directory after uninstallation.
### Detect Install Script Behavior
The redistributable install detection logic has been updated. If a redistributable does not have a detect install script defined, the install script will now always run rather than being skipped. This ensures that redistributables without detection scripts are reliably installed every time, which is the expected behavior for most simple redistributable configurations.
## Package Script Filtering
Package scripts are now filtered out of API responses for games, redistributables, and tools. These scripts are used internally during the packaging process and should not be sent to clients. This filtering is applied at both the endpoint and AutoMapper levels, ensuring that package scripts never leak to launchers or other API consumers.
## Launcher CLI Improvements
### Full Command Line Verb Support
The Avalonia launcher now supports the full set of CLI verbs: `RunScript`, `Install`, `Uninstall`, `Run`, `Sync`, `Import`, `Export`, `Upload`, `Login`, `Logout`, and `ChangeAlias`. Previously only `RunScript` was supported in headless mode. The `--help` and `--version` flags are also now recognized. Console logging has been added for headless execution.
### CLI Project Removal
The standalone `LANCommander.Launcher.CLI` project has been removed. All CLI functionality is now handled directly by the Avalonia launcher's headless mode, consolidating the codebase and eliminating the need for a separate CLI binary.
## C++ SDK
A new C++ SDK (`LANCommander.SDK.Cpp`) has been introduced. Written in C++14, it provides maximum compatibility from Windows 95 through modern platforms. The SDK includes 16 API clients covering authentication, games, library, saves, media, tools, depot, and more. It ships with two HTTP backend implementations (WinINet for Windows and libcurl for cross-platform) and uses vendored cJSON for zero mandatory external dependencies. This SDK is the foundation that powers the legacy launcher.
## Legacy Launcher
:::note A Fun Detour
The legacy launcher is a fun side project and detour from the main development track. It should not be regarded as a primary concern or a supported production launcher. Think of it as an experiment in seeing just how far back LANCommander's reach can extend.
:::
The legacy launcher is a native Win32 application written in C++ that targets Windows 9x (Windows 95/98/ME) and beyond. Built on Allegro 4 for rendering and GDI+ for image decoding (JPEG cover art, backgrounds, etc.), it provides a surprisingly full-featured LANCommander experience on vintage hardware. GDI+ is a requirement and must be available on the target system. For Windows 9x systems, this means installing the [GDI+ redistributable](https://www.microsoft.com/en-us/download/details.aspx?id=18909).
Features include:
- **Library and Depot browsing** with cover art grid
- **Game detail view** with metadata and screenshots
- **Download queue** with progress tracking
- **Login screen** with server authentication
- **Settings screen** with configurable server address
- **SQLite-backed local database** for offline game metadata
- **Custom window chrome** with a themed UI
- **Unicode support** for international character sets
<ScreenshotCarousel screenshots={[
{ src: require('./_Assets/2.1.0-rc2 - Legacy Launcher - Login.png').default, alt: 'Legacy Launcher Login', label: 'Login', caption: 'The login screen running on Windows 98' },
{ src: require('./_Assets/2.1.0-rc2 - Legacy Launcher - Library.png').default, alt: 'Legacy Launcher Library', label: 'Library', caption: 'Browsing the game library with cover art' },
{ src: require('./_Assets/2.1.0-rc2 - Legacy Launcher - Detail.png').default, alt: 'Legacy Launcher Detail', label: 'Game Detail', caption: 'Game detail view with metadata' },
{ src: require('./_Assets/2.1.0-rc2 - Legacy Launcher - Downloads.png').default, alt: 'Legacy Launcher Downloads', label: 'Downloads', caption: 'The download queue in action' },
{ src: require('./_Assets/2.1.0-rc2 - Legacy Launcher - Settings.png').default, alt: 'Legacy Launcher Settings', label: 'Settings', caption: 'Configuring server connection settings' },
]} />
## Changelog
**Server**
- Added: Variable picker dialog for action editor and save path editor
- Fixed: Package scripts are no longer exposed through API responses
- Fixed: Script helper now correctly maps Package and RunWrapper script filenames
**Launcher**
- Added: Full set of CLI verbs (Install, Uninstall, Run, Sync, Import, Export, Upload, Login, Logout, ChangeAlias)
- Added: Console logging for headless CLI execution
- Changed: Redistributable files are now tracked and cleaned up on uninstall
- Changed: Redistributables without detect install scripts now always run the install script
- Fixed: Script writing for all script types
- Removed: Standalone CLI project (functionality merged into Avalonia launcher)
**Legacy Launcher**
- Added: Complete native Win32 launcher targeting Windows 9x
- Added: Library and depot browsing with cover art grid
- Added: Game detail view with metadata display
- Added: Download queue with SQLite-backed local database
- Added: Settings screen with YAML configuration
- Added: Custom themed window chrome
- Added: Unicode support for Win9x targets
- Added: CI workflow for automated builds
**SDK**
- Added: C++ SDK (LANCommander.SDK.Cpp) with C++14 compatibility
- Added: WinINet and libcurl HTTP backend implementations
- Added: 16 API clients covering full LANCommander API surface
- Changed: Game list filtering now shows only standalone mods/expansions and main games
## Downloads
<ReleaseDownloads release="v2.1.0-rc2" />
## Contributors
<ContributorGrid from="v2.1.0-rc1" to="v2.1.0-rc2" />

View file

@ -0,0 +1,73 @@
---
title: 2.1.0-rc3
---
import ReleaseDownloads from '@site/src/components/ReleaseDownloads';
import ContributorGrid from '@site/src/components/ContributorGrid';
# LANCommander 2.1.0 Release Candidate 3 Release Notes
## Server Discovery
The Avalonia launcher now supports automatic server discovery using the beacon system. When connecting to a server, the launcher can discover LANCommander servers on the local network without needing to manually enter an address. This feature was already present in the legacy Photino launcher and has now been brought forward to the new Avalonia-based launcher.
## Launcher Improvements
### List View Rework
The list view in the launcher library has been reworked for a cleaner presentation and better usability. It is essentially a reimagination of the library view in the previous launcher.
### Carousel Fixes
Cover art in carousels has received several visual fixes. The shadow overlay on covers now renders correctly, and covers are no longer cut off at the bottom when hovered. These are small polish items that improve the overall look and feel of the depot and library views.
### Play Button State
The play button now correctly reflects the current state of a running game, showing the appropriate playing/stop indicator when a game is actively running.
### Performance Optimizations
General launcher optimizations have been made to improve responsiveness and reduce resource usage.
## Bug Fixes
### Redistributable and Tool Importing
Fixed an issue where importing redistributables and tools from an LCX file was not working correctly.
### Linux Path Expansion
Path variable expansion now correctly preserves the Linux root (`/`) prefix. Previously, expanding variables like `{InstallDir}` on Linux could strip the leading slash, resulting in incorrect paths.
## Contributions
This release includes contributions from the following community members:
**@akifreak | PR [#403](https://github.com/LANCommander/LANCommander/pull/403): Fix Beacon Discovery**
Back for another round of contributions, akifreak tracked down and fixed an issue where server discovery wasn't working reliably. In some cases the launcher was actually finding servers on the network but wasn't surfacing them in the UI. The fix spans the full discovery pipeline; making the probe socket more resilient to bad data, ensuring beacon responses actually reach the client, and refreshing the server list as soon as a new server is found.
## Changelog
**Launcher**
- Added: Automatic server discovery via beacon system
- Added: Play session sync on game import
- Added: Additional save handling logging
- Changed: Reworked list view layout
- Changed: Performance optimizations
- Changed: Increased cover art rendering quality
- Changed: Action bar layout and behavior adjustments
- Fixed: Shadow overlay on covers in carousels
- Fixed: Cover art clipping on hover in carousels
- Fixed: Play button now shows correct playing/stop state when a game is running
- Fixed: Linux path variable expansion now preserves root prefix
**Server**
- Fixed: Redistributable and tool importing
- Fixed: Media settings page failing to render
**SDK**
- Fixed: Discovery probe socket resilience against malformed data
- Fixed: Broadcast send reliability in DiscoveryProbe
- Fixed: Beacon responses now forwarded to BeaconClient event
- Fixed: Save client now checks for newer server saves before uploading
- Added: Logging in save packaging and upload pipeline
## Downloads
<ReleaseDownloads release="v2.1.0-rc3" />
## Contributors
<ContributorGrid from="v2.1.0-rc2" to="v2.1.0-rc3" />

View file

@ -0,0 +1,57 @@
---
title: 2.1.0-rc4
---
import ReleaseDownloads from '@site/src/components/ReleaseDownloads';
import ContributorGrid from '@site/src/components/ContributorGrid';
# LANCommander 2.1.0 Release Candidate 4 Release Notes
## Big Screen Mode
The Avalonia launcher now supports a big screen mode designed for use with TVs and handhelds. When enabled, the launcher switches to a fullscreen layout optimized for focused gaming. This pairs with the new gamepad navigation support to make LANCommander usable from the sofa or a handheld without a keyboard or mouse.
## Gamepad Navigation
Full gamepad support has been added to the Avalonia launcher. Controllers are detected and mapped using SDL2, and directional navigation has been implemented across the library views, carousels, game detail pages, and overlay dialogs. Focus management handles moving between UI elements naturally with a d-pad or analog stick, making it possible to browse, install, and launch games entirely with a controller. This feature is still a bit rough around the edges, but should improve in future releases.
## RunWrapper Scripts for Redistributables
RunWrapper scripts were previously defined as a script type but never actually executed. This release adds full execution support during game launch. RunWrapper scripts now run alongside the game process with proper state tracking, cancellation support, and child process cleanup when the game exits.
## Packaging Dialog
The "Package" button has been moved from individual game, redistributable, and tool edit pages to the archive editor. A new packaging dialog provides a consolidated view of the packaging process, making it easier to build and manage archives directly from the archive list.
## Bug Fixes
- Fixed scrollbar being overlapped by the titlebar in the launcher
- Fixed HQ metadata lookups by updating the HQ SDK dependency
- Fixed media downloads failing during game import
- Fixed icon downloading
- Fixed server save check incorrectly determining newer saves were available
## Changelog
**Launcher**
- Added: Big screen mode for fullscreen TV/controller use
- Added: Gamepad navigation across library, carousels, detail views, and overlays
- Fixed: Scrollbar overlapped by titlebar
- Fixed: Media download on import
- Fixed: Icon downloading
**Server**
- Added: Packaging dialog on archive editor
- Added: RunWrapper script type available for redistributable scripts
- Changed: Moved "Package" button from edit pages to archive editor
- Changed: Updated PowerShell code snippets
- Fixed: HQ metadata lookups
**SDK**
- Added: RunWrapper script execution for redistributables with process lifecycle management
- Changed: Multi-target framework support
- Changed: Source-generated cmdlet registration via new `CmdletRegistrationGenerator`
- Fixed: Save client check for newer saves on server
## Downloads
<ReleaseDownloads release="v2.1.0-rc4" />
## Contributors
<ContributorGrid from="v2.1.0-rc3" to="v2.1.0-rc4" />

View file

@ -0,0 +1,59 @@
---
title: 2.1.0-rc5
---
import ReleaseDownloads from '@site/src/components/ReleaseDownloads';
import ContributorGrid from '@site/src/components/ContributorGrid';
# LANCommander 2.1.0 Release Candidate 5 Release Notes
## LANCommander Packager
A new standalone Avalonia application, LANCommander Packager, has been added for building LCX package files outside of the server. The packager works by monitoring the files and registry entries created by a game's installer. You can then choose which files / registry keys are bundled into the final LCX file.
## Background Uploading
Archive uploads now continue in the background, allowing you to navigate away from the upload page without losing progress. An upload indicator in the sidebar tracks active uploads so you can continue working in other areas of the server while files transfer. This also applies to the import upload dialog.
## HQ Login in First Time Setup
The first time setup wizard now includes a step to log in to LANCommander HQ directly during initial configuration. This streamlines connecting to HQ for metadata and media lookups without needing to visit the settings page after setup is complete.
## File Manager Improvements
The server file manager has received several usability improvements including faster enumeration of large directories, toggleable columns, new Created and Type columns, fixed breadcrumb navigation, and a properly built directory tree with support for cross-platform roots and special folders.
## Bug Fixes
- Fixed standalone expansions and mods appearing in nested game lists (#284)
- Fixed missing nested game data
- Fixed save path matching failing on Windows due to backslash normalization (#266)
- Fixed log viewer not working under Settings / Logs (#393)
- Fixed user approval menu item not functioning (#405)
- Fixed archive processing when using "Use Local File"
- Fixed "Use Local File" button being incorrectly disabled
## Changelog
**Server**
- Added: Background uploading with sidebar progress indicator
- Added: HQ login step in first time setup wizard
- Added: Button to download current log file
- Changed: Improved file manager with faster directory enumeration, toggleable columns, and cross-platform directory tree
- Fixed: Log viewer under Settings / Logs (#393)
- Fixed: User approval menu item (#405)
- Fixed: Archive processing for "Use Local File"
- Fixed: "Use Local File" disabled button
- Fixed: Standalone expansions/mods shown in nested game lists (#284)
- Fixed: Missing nested game data
**Packager**
- Added: New standalone application for building LCX package files
- Added: CI workflow for building and releasing the packager
- Added: Documentation for packager usage and LCX format
**SDK**
- Fixed: Save path normalization to use forward slashes before regex matching (#266)
## Downloads
<ReleaseDownloads release="v2.1.0-rc5" />
## Contributors
<ContributorGrid from="v2.1.0-rc4" to="v2.1.0-rc5" />

View file

@ -0,0 +1,678 @@
---
title: 2.1.0
---
import ReleaseDownloads from '@site/src/components/ReleaseDownloads';
import ScreenshotCarousel from '@site/src/components/ScreenshotCarousel';
import ContributorGrid from '@site/src/components/ContributorGrid';
# LANCommander 2.1.0 Release Notes
:::tip Latest Version
This page covers the full LANCommander 2.1 series. The latest patch is **2.1.9** — see [Patch Updates](#patch-updates) below for what's changed since the initial release.
:::
LANCommander 2.1.0 is a landmark release that touches virtually every part of the platform. A brand new launcher built on Avalonia, a standalone packager application, a C++ SDK powering a legacy Win32 launcher, major server improvements, and the launch of LANCommander HQ all come together in what has been the most ambitious update cycle to date.
## Breaking Changes
### .NET 10
LANCommander has been upgraded from .NET 8 to .NET 10. This should be a seamless transition as all LANCommander binaries are self-contained and include the appropriate .NET runtime. However, if you are running an older version of Windows that does not support .NET 10, you may encounter issues running this version of LANCommander. The minimum supported Windows version is now Windows 10 version 1809.
## Launching Into the Future
To kick things off, LANCommander 2.1.0 introduces a new launcher. As a recap, the previous launcher was built using .NET Blazor and wrapped into a Webview2 chrome using the open source project [Photino](https://www.tryphotino.io/). This decision was originally made in an effort to maintain a somewhat shared codebase with the server web UI.
Unfortunately, over time limitations of the platform made it apparent that a change had to be made. Community member [aaronpowell](https://github.com/aaronpowell) stepped up and built out a proof of concept for a launcher using Avalonia, an open-source native cross-platform UI framework for .NET. The potential was immediately clear and the decision was made to jump in head first. The following months saw the project refocus on building a new launcher with a major emphasis on performance, reliability, design, and feature parity.
The result is, well, a project that went off a little off the rails in the best possible fashion:
<ScreenshotCarousel screenshots={[
{ src: require('./_Assets/2.1.0 - Launcher.jpg').default, alt: 'Launcher', label: 'Launcher', caption: 'The brand new Avalonia-based launcher' },
{ src: require('./_Assets/2.1.0 - Shelf.jpg').default, alt: 'Shelf View', label: 'Shelf View', caption: 'Browse your library in the new shelf layout' },
{ src: require('./_Assets/2.1.0 - Depot.jpg').default, alt: 'Depot', label: 'Depot', caption: 'The redesigned depot with categorization carousels' },
{ src: require('./_Assets/2.1.0 - Screenshot.jpg').default, alt: 'Game Details', label: 'Game Details', caption: 'Screenshots and videos displayed right in the detail view' },
{ src: require('./_Assets/2.1.0 - Downloads.png').default, alt: 'Download Queue', label: 'Download Queue', caption: 'Track every step of the installation process' },
]} />
I think the screenshots speak for themselves. Okay, not quite, there's a lot of fun stuff in this build so let's dive right in!
### User Library
Previous versions of the launcher attempted to bring the art of a game to the forefront. These views are where most players spend their time interacting with the application. However, everyone's tastes are different. As such the library now contains three main views; cover grid, list, and shelf.
![Shelf View](./_Assets/2.1.0%20-%20Shelf.jpg)
### Game Details
Browsing the user library is great and all, but the detail view is where a game really gets to shine. Metadata has shifted to the right-hand side, descriptions now support more complex formatting with Markdown rendering support, and _finally_ videos and screenshots are displayed in a carousel. A lightbox viewer lets you zoom in on screenshots, watch videos, and even read game manuals right from the detail view thanks to the new built-in PDF viewer.
![Game Screenshot Detail](./_Assets/2.1.0%20-%20Screenshot.jpg)
This is really just the start of something new. Expect this part of the launcher to be built out more in the future with better publishing tools and metadata expansion.
### Depot
The depot has been overhauled too, probably more than any other part of the launcher. Previous iterations have been _fine_, but with large game sets it was hard to find just what you needed. The new depot puts a focus on categorization while maintaining granular filtering tools to get you exactly where you need to go.
![Depot](./_Assets/2.1.0%20-%20Depot.jpg)
As you can see, this section more than any other benefits from high quality metadata. We'll get into that later, but first let's talk about game installation.
### Download Queue
Game installation and downloading has been the hardest component to develop in the entire LANCommander platform. And rightly so! Without game installation, all you get is a fancy web UI and a pretty launcher that can't launch any games.
The LANCommander launcher is essentially a UI wrapper for the LANCommander SDK. The SDK is a .NET library that provides all of the useful bits of communicating with a LANCommander server install. Authentication, script execution, save management, game installation and so much more are provided through this library. In previous iterations, the SDK had a very strict execution plan for installing games. Often times this would lead to deadlocks and outright failures.
To resolve this in 2.1.0, the game install process has moved to a two-layer queuing system. The first layer of the queue manages what actually enters the download queue. This could be a game, redistributable, tool, or addon. The second layer handles any subprocessing step such as executing the different script types, save downloading, existing file verification, etc. The result is a system that is more transparent and reliable.
This queuing system has been exposed somewhat in the download queue:
![Download Queue](./_Assets/2.1.0%20-%20Downloads.png)
Each entry in the download queue will now report each step of the process during a game installation. In addition to looking a bit less mystical, this should give users an idea of what _exactly_ is happening during a game installation.
### Big Screen Mode & Gamepad Navigation
The launcher now supports a big screen mode designed for use with TVs and handhelds. When enabled, the launcher switches to a fullscreen layout optimized for focused gaming. Gamepad support has been added as well. Controllers are detected and mapped using SDL2, and directional navigation has been implemented across the library views, carousels, game detail pages, and overlay dialogs. Focus management handles moving between UI elements naturally with a d-pad or analog stick, making it possible to browse, install, and launch games with a controller. This feature is pretty barebones for now, but adds a foundation for deeper integration in the future.
### Discord Rich Presence
The launcher now integrates with Discord Rich Presence. When you're playing a game through LANCommander, your Discord status will update to show what you're playing. By default this will show as LANCommander with the game name as the status. If the game is mapped to the correct Discord ID (via external IDs in the server), then the game's official Discord assets will be used for a more polished presentation.
### Offline Mode
Previous attempts at an offline mode in the launcher were pretty clunky and unreliable. In 2.1.0, the launcher now has a proper offline mode that allows you to launch previously installed games even when the server is unreachable.
### Command Line Interface
The Avalonia launcher now handles all CLI functionality directly, replacing the previous standalone CLI project. The full set of CLI verbs is supported: `RunScript`, `Install`, `Uninstall`, `Run`, `Sync`, `Import`, `Export`, `Upload`, `Login`, `Logout`, and `ChangeAlias`. The `--help` and `--version` flags are also recognized, and console logging has been added for headless execution.
### Single Sign-On
SSO was supported in the previous launcher, but it was a bit of an afterthought and not super reliable. In the new launcher it's been given more attention and should work as expected.
### Chat
As with the last version, the chat functionality remains pretty barebones. This is an area that will get more attention in the future, but it _is_ currently available in the new launcher. It might even work a little better.
## Server Improvements
This release should also be pretty exciting for server admins. With a new launcher and shiny new features brings a set of tools to manage them.
### LANCommander HQ
A new metadata provider has been added: LANCommander HQ. This gives server admins another option for sourcing game metadata and media alongside IGDB and SteamGridDB. In addition, support for external IDs beyond IGDB has been introduced, making it easier to cross-reference games across multiple platforms and services. To get started with the HQ, link your Discord account under "Integrations / HQ" in the server settings. The first time setup wizard now includes a step to log in to HQ directly during initial configuration, streamlining the onboarding experience. Existing metadata providers such as IGDB and SteamGridDB are still available as well, so no functionality has been lost from previous versions. We'll cover more about HQ later on in these notes.
### Preview Tool
A new "Preview" editing view has been added to the server for managing game art. Inspired by the launcher's presentation, this tool gives admins a better sense of how their media will look in the launcher before publishing. Screenshots and videos can now be uploaded in bulk, and the media grabber supports selecting multiple assets at once. Animated covers are now supported as well, APNG images grabbed from SteamGridDB are automatically converted to video and should display in the new launcher.
![Preview Tool](./_Assets/2.1.0%20-%20Server%20-%20Preview.png)
### Script Editor Improvements
The script editor has received a significant upgrade. Context-aware code completions now suggest built-in PowerShell cmdlets, LANCommander-specific variables, and generated type definitions. Validation has been improved, and script errors are now logged rather than silently swallowed. A new `Set-GameDetails` cmdlet has been added for specifying package details from within scripts.
### Variable Picker Dialog
A new variable picker dialog has been added to the action editor and save path editor. When editing action arguments, working directories, or save paths, a new button opens a dialog that lets you browse and insert LANCommander variables (`{InstallDir}`, `{DisplayWidth}`, etc.), environment variables (`%APPDATA%`, `%LOCALAPPDATA%`, etc.), and special folder paths (`%MyDocuments%`, `%Desktop%`, etc.) with a single click.
### Redistributable Options
Redistributables now support configurable options. Options can be defined with a schema editor, given display names, and are preserved across import/export. Assigning redistributables to a game can now be accessed under the "Redistributables" section of the game editor. When selected, a redistributable with options will render as an easy-to-use form and per-game overrides can be defined.
![Redistributable Options](./_Assets/2.1.0%20-%20Server%20-%20Redistributable%20Options.png)
A new **RunWrapper** script type has been added as well, giving admins more control over how redistributables and games are executed. RunWrapper scripts now run alongside the game process with proper state tracking, cancellation support, and child process cleanup when the game exits. This should enhance redistributables to cover more use cases such as emulators, launchers, and compatibility shims like Proton or dgVoodoo.
### Packaging Dialog
The "Package" button has been moved from individual game, redistributable, and tool edit pages to the archive editor. A new packaging dialog provides a consolidated view of the packaging process, making it easier to build and manage archives directly from the archive list.
### Background Uploading
Archive uploads now continue in the background, allowing you to navigate away from the upload page without losing progress. An upload indicator in the sidebar tracks active uploads so you can continue working in other areas of the server while files transfer. This also applies to the import upload dialog.
### File Manager Improvements
The server file manager has received several usability improvements including faster enumeration of large directories, toggleable columns, new Created and Type columns, fixed breadcrumb navigation, and a properly built directory tree with support for cross-platform roots and special folders.
### Key Management
Key allocation has been improved. The allocation method on keys is now nullable, and a new manual key assignment dialog has been added. The logic for choosing the next available key has also been reworked.
### Media & Tooling
Server settings now include checks for ffmpeg and yt-dlp availability, with automatic installation support in Docker environments. A new streaming endpoint for media has been added, improving video playback in the launcher. Automatic downloads for Steam screenshots have been added as well. YouTube video support has been added to the media grabber, and ffmpeg is now used for video processing tasks such as APNG conversion and thumbnail generation.
## LANCommander Packager
A new standalone Avalonia application, LANCommander Packager, has been added for building LCX package files outside of the server. The packager works by monitoring the files and registry entries created by a game's installer. You can then choose which files and registry keys are bundled into the final LCX file. If the tool is authenticated to a LANCommander server instance, the game can be directly uploaded to the server as well.
<ScreenshotCarousel screenshots={[
{ src: require('./_Assets/2.1.0 - Packager - Monitor.png').default, alt: 'Packager Monitor', label: 'Monitor', caption: 'The Packager application will monitor the files and registry entries created during installation' },
{ src: require('./_Assets/2.1.0 - Packager - Select Files.png').default, alt: 'Packager Select Files', label: 'Select Files', caption: 'Files can be individually selected to include in the final import file' },
{ src: require('./_Assets/2.1.0 - Packager - Registry.png').default, alt: 'Packager Registry Entries', label: 'Registry Entries', caption: 'Registry entries can be individually selected and will be included in install/uninstall scripts' },
{ src: require('./_Assets/2.1.0 - Packager - Metadata.png').default, alt: 'Packager Metadata', label: 'Metadata', caption: 'Basic metadata can be defined before packaging' },
{ src: require('./_Assets/2.1.0 - Packager - Metadata Lookup.png').default, alt: 'Packager Metadata Lookup', label: 'Metadata Lookup', caption: 'Metadata can also be pulled in from metadata providers' },
{ src: require('./_Assets/2.1.0 - Packager - Select Executable.png').default, alt: 'Packager Select Executable', label: 'Select Executable', caption: 'The primary action can be defined before packaging' },
{ src: require('./_Assets/2.1.0 - Packager - Generate Package.png').default, alt: 'Packager Generate Package', label: 'Generate Package', caption: 'The final package can be created as an .LCX file or uploaded directly to a server' },
]} />
## C++ SDK & Legacy Launcher
### C++ SDK
A new C++ SDK (`LANCommander.SDK.Cpp`) has been introduced. Written in C++14, it provides maximum compatibility from Windows 95 through modern platforms. The SDK includes 16 API clients covering authentication, games, library, saves, media, tools, depot, and more. It ships with two HTTP backend implementations (WinINet for Windows and libcurl for cross-platform) and uses vendored cJSON for zero mandatory external dependencies. This SDK is the foundation that powers the legacy launcher.
### Legacy Launcher
:::note A Fun Detour
The legacy launcher is a fun side project and detour from the main development track. It should not be regarded as a primary concern or a supported production launcher. Think of it as an experiment in seeing just how far back LANCommander's reach can extend.
:::
The legacy launcher is a native Win32 application written in C++ that targets Windows 9x (Windows 95/98/ME) and beyond. Built on Allegro 4 for rendering and GDI+ for image decoding (JPEG cover art, backgrounds, etc.), it provides a surprisingly full-featured LANCommander experience on vintage hardware. GDI+ is a requirement and must be available on the target system. For Windows 9x systems, this means installing the [GDI+ redistributable](https://www.microsoft.com/en-us/download/details.aspx?id=18909).
Features include:
- **Library and Depot browsing** with cover art grid
- **Game detail view** with metadata and screenshots
- **Download queue** with progress tracking
- **Login screen** with server authentication
- **Settings screen** with configurable server address
- **SQLite-backed local database** for offline game metadata
- **Custom window chrome** with a themed UI
- **Unicode support** for international character sets
<ScreenshotCarousel screenshots={[
{ src: require('./_Assets/2.1.0-rc2 - Legacy Launcher - Login.png').default, alt: 'Legacy Launcher Login', label: 'Login', caption: 'The login screen running on Windows 98' },
{ src: require('./_Assets/2.1.0-rc2 - Legacy Launcher - Library.png').default, alt: 'Legacy Launcher Library', label: 'Library', caption: 'Browsing the game library with cover art' },
{ src: require('./_Assets/2.1.0-rc2 - Legacy Launcher - Detail.png').default, alt: 'Legacy Launcher Detail', label: 'Game Detail', caption: 'Game detail view with metadata' },
{ src: require('./_Assets/2.1.0-rc2 - Legacy Launcher - Downloads.png').default, alt: 'Legacy Launcher Downloads', label: 'Downloads', caption: 'The download queue in action' },
{ src: require('./_Assets/2.1.0-rc2 - Legacy Launcher - Settings.png').default, alt: 'Legacy Launcher Settings', label: 'Settings', caption: 'Configuring server connection settings' },
]} />
## LANCommander HQ
Last but far from least, this release coincides with the launch of [LANCommander HQ](https://hq.lancommander.com), a new metadata provider and community hub for LANCommander users. The HQ aims to provide a centralized platform for game metadata and media across multiple providers, while also normalizing and enhancing that data with a focus on the needs of LANCommander users. There's a bit to cover, so let's dive in!
### Metadata
LANCommander HQ aggregates metadata from multiple sources including IGDB, SteamGridDB, and user contributions. This data is then normalized and enhanced with a focus on the needs of LANCommander users. There are many metadata providers out there, and unfortunately they all have their own unique schemas and data quality issues. The HQ's goal is to provide a single source of truth for game metadata that can be consumed by LANCommander servers and launchers.
There are a lot of exciting features in the works for the HQ, but for this release the focus is on building out the core infrastructure and integrating with the new launcher. Expect to see more features and improvements in the future as the HQ continues to evolve.
### Community
The main features of the HQ are currently focused on metadata, but there is the potential to expand it into a broader community hub for LANCommander users. This could include an area to share game configurations, scripts, and other resources. Additionally, there are some content moderation tools in place that should allow the HQ to host user-generated content and provide the best possible experience for all users. If you have a knack for curation and want to help out, there will likely be opportunities to get involved in the future!
### Tiering / Subscriptions
The HQ operates on a tiered subscription model. Currently there are only two tiers: Basic (Free) and Premium ($5/month). The Basic tier provides access to the core metadata features of the HQ, while the Premium tier provides access to additional features such as enhanced metadata, relaxed rate limiting, and more. More information will be provided in the near future and will be provided on this site under the [LANCommander HQ](/hq) section. All paid subscriptions on the HQ are handled by Stripe, so every transaction is secure and your personal information is protected.
This subscription model is primarily in place to help cover the costs of running the HQ while also providing a sustainable path forward for continued development of LANCommander itself. This entire project is developed and maintained by essentially one person with some help from the community here and there. While this is a labor of love, there are real costs associated with running the infrastructure for the HQ and continued development of LANCommander. The subscription model is designed to be as accessible as possible while also providing a way for users to support the project if they find value in it.
As such, this will probably mean that the Patreon page will be going away in the near future. For existing patrons, it is recommended to switch over to the new subscription model on the HQ as it provides a more direct way to support the project and access the benefits of the HQ _today_.
## Contributions
This release includes contributions from the following community members:
**@aaronpowell | PR [#395](https://github.com/LANCommander/LANCommander/pull/395): Avalonia Launcher**
A substantial 42-commit, 6,000-line PR that bootstrapped the cross-platform Avalonia launcher. Aaron built out the core application structure, service wiring, and async initialization, and then built out the UI with filtered depot browsing and grid layout, a download queue, install/uninstall flows, a settings page, PDF manual viewer, game action bars, and a full CI pipeline for Windows, Linux, and macOS builds. A lot of the foundation that the current launcher sits on came from this PR.
**@akifreak | PR [#398](https://github.com/LANCommander/LANCommander/pull/398): Fix Game Archive Upload**
Discovered that archive uploads through the web UI were silently broken after upgrading to v2.0.2, traced the problem through the JavaScript bundle, and submitted 11 targeted fixes rather than a single bug report. The fixes covered ES module loading, null-guards on DOM elements, a FileMode.Append seek conflict, incorrect archive ID passing, and error propagation throughout the upload pipeline. The uploading process should feel much more stable now!
**@akifreak | PR [#403](https://github.com/LANCommander/LANCommander/pull/403): Fix Beacon Discovery**
Back for another round of contributions, akifreak tracked down and fixed an issue where server discovery wasn't working reliably. In some cases the launcher was actually finding servers on the network but wasn't surfacing them in the UI. The fix spans the full discovery pipeline; making the probe socket more resilient to bad data, ensuring beacon responses actually reach the client, and refreshing the server list as soon as a new server is found.
**@MasterMNB | PR [#400](https://github.com/LANCommander/LANCommander/pull/400): Avalonia Launcher Back Button**
Improved the visibility and styling of the back button in the `GameDetailView`, which was previously hard to distinguish from the background. It's a small change, but it's a real usability improvement that makes navigation feel more intentional.
## Changelog
**Launcher**
- Added: Brand new launcher built on Avalonia
- Added: Screenshots and videos in game detail carousel with lightbox viewer
- Added: Redesigned depot with categorization carousels and advanced filtering
- Added: Tools support
- Added: Download transfer speed graph
- Added: OS notifications upon game installation completion
- Added: Discord Rich Presence integration
- Added: SSO/OIDC external authentication provider support
- Added: Built-in PDF viewer for game manuals
- Added: Splash screen on startup
- Added: Verify files option in game dropdown
- Added: Markdown rendering for game descriptions
- Added: Big screen mode for fullscreen TV/controller use
- Added: Gamepad navigation across library, carousels, detail views, and overlays
- Added: Full set of CLI verbs (Install, Uninstall, Run, Sync, Import, Export, Upload, Login, Logout, ChangeAlias)
- Added: Console logging for headless CLI execution
- Changed: Refactored game/redistributable/tool install process to two-layer queue system
- Changed: Imports should be faster and execute in the background without causing major UI hiccups
- Changed: Improved memory management with proper disposal of HTTP clients, RPC clients, and cancellation tokens
- Changed: Redistributable files are now tracked and cleaned up on uninstall
- Changed: Redistributables without detect install scripts now always run the install script
- Fixed: Installing games that already have files on disk will show the verification process during install
- Fixed: Linux path variable expansion now preserves root prefix
- Fixed: Script writing for all script types
- Removed: Standalone CLI project (functionality merged into Avalonia launcher)
**Server**
- Added: LANCommander HQ metadata provider support
- Added: Support for external IDs beyond IGDB
- Added: New launcher-inspired "Preview" tool for managing art
- Added: Context-aware script editor with code completions, validation, and PowerShell type definitions
- Added: Redistributable options with schema editor and display names
- Added: RunWrapper script type with full execution support
- Added: Package versioning for archives
- Added: Bulk upload for screenshots and videos
- Added: Multiple select support in media grabber
- Added: Animated cover support (APNG auto-conversion to video)
- Added: Steam screenshot downloads
- Added: YouTube video support in media grabber
- Added: Media streaming endpoint
- Added: ffmpeg/yt-dlp availability checks and auto-install in Docker
- Added: Manual key assignment dialog and reworked key allocation
- Added: `Set-GameDetails` cmdlet for package scripts
- Added: Variable picker dialog for action editor and save path editor
- Added: Packaging dialog on archive editor
- Added: RunWrapper script type available for redistributable scripts
- Added: Background uploading with sidebar progress indicator
- Added: HQ login step in first time setup wizard
- Added: Button to download current log file
- Changed: Moved "Package" button from edit pages to archive editor
- Changed: Updated PowerShell code snippets
- Changed: Improved file manager with faster directory enumeration, toggleable columns, and cross-platform directory tree
- Fixed: Media uploads should now behave as expected
- Fixed: Game archive uploads in web UI
- Fixed: Orphaned files tool
- Fixed: Redistributable archive downloads
- Fixed: Script working directory for games
- Fixed: SteamCMD login when SteamGuard is enabled
- Fixed: Import file cleanup after completion
- Fixed: Package scripts are no longer exposed through API responses
- Fixed: Script helper now correctly maps Package and RunWrapper script filenames
- Fixed: Redistributable and tool importing
- Fixed: Media settings page failing to render
- Fixed: HQ metadata lookups
- Fixed: Log viewer under Settings / Logs (#393)
- Fixed: User approval menu item (#405)
- Fixed: Archive processing for "Use Local File"
- Fixed: "Use Local File" disabled button
- Fixed: Standalone expansions/mods shown in nested game lists (#284)
- Fixed: Missing nested game data
**Packager**
- Added: New standalone application for building LCX package files
- Added: CI workflow for building and releasing the packager
**Legacy Launcher**
- Added: Complete native Win32 launcher targeting Windows 9x
- Added: Library and depot browsing with cover art grid
- Added: Game detail view with metadata display
- Added: Download queue with SQLite-backed local database
- Added: Settings screen with YAML configuration
- Added: Custom themed window chrome
- Added: Unicode support for Win9x targets
- Added: CI workflow for automated builds
**SDK**
- Added: C++ SDK (LANCommander.SDK.Cpp) with C++14 compatibility
- Added: WinINet and libcurl HTTP backend implementations
- Added: 16 API clients covering full LANCommander API surface
- Added: RunWrapper script execution for redistributables with process lifecycle management
- Added: Logging in save packaging and upload pipeline
- Changed: Game list filtering now shows only standalone mods/expansions and main games
- Changed: Multi-target framework support
- Changed: Source-generated cmdlet registration via new `CmdletRegistrationGenerator`
- Fixed: Discovery probe socket resilience against malformed data
- Fixed: Broadcast send reliability in DiscoveryProbe
- Fixed: Beacon responses now forwarded to BeaconClient event
- Fixed: Save client now checks for newer server saves before uploading
- Fixed: Save path normalization to use forward slashes before regex matching (#266)
**Infrastructure**
- Upgraded to .NET 10
- Added ARM64 build support
- Removed legacy Photino launcher from CI
- Added nightly builds for Avalonia launcher
## Patch Updates
### 2.1.1
<details>
<summary>View 2.1.1 patch notes</summary>
#### New Features
##### User Registration in Launcher
User registration has been added back into the launcher's login screen. This was a feature from the old launcher that was missed in the port to Avalonia.
##### Game Update Support
The Avalonia launcher's update functionality was only partially-implemented. This has been completed and moved over to the new installation workflow system. Additionally, updates for games can be ignored by clicking the dropdown next to the "Update" button and selecting "Play without updating".
#### Improvements
- Game titles are now dimmed in the library when not installed, making it easier to see what's ready to play at a glance
- The games list view and depot now display a helpful message when there are no items, instead of showing a blank screen
- The launcher now downloads media on demand if it doesn't exist locally, and gracefully falls back if LibVLC fails to load
#### Bug Fixes
- Fixed bundling of LibVLC on macOS and Windows
- Fixed the display of the empty library view
- Fixed game updating
<ReleaseDownloads release="v2.1.1" />
</details>
### 2.1.2
<details>
<summary>View 2.1.2 patch notes</summary>
#### New Features
##### Redistributable Update Checking
The launcher now checks if installed redistributables are up to date and will re-run them when updates are available on the server. This ensures games always have the correct runtime dependencies.
##### Drag and Drop File Import in Script Editor
The script editor now supports drag and drop for `.ps1`, `.reg`, `.ini`, and other text files. PowerShell scripts replace the editor contents, `.reg` files are automatically converted to PowerShell commands, and other text files are inserted as escaped strings.
##### Manifest and Script Refresh
When a game has no update available, the launcher will now refresh the manifest and scripts on disk. This ensures local files stay in sync with server-side changes that don't trigger a full update.
#### Improvements
- Entire row is now clickable in the compact library list view
- Items per page selection is now persisted in data tables
- Improved process termination handling with fallback for Windows and absolute pathing for `kill` on Linux/macOS
#### Bug Fixes
- Fixed padding in the metadata lookup dialog
- Fixed HQ token retrieval on the first-time setup and integrations settings pages
- Fixed local server engine tracking (contributed by @Mavyre)
<ReleaseDownloads release="v2.1.2" />
</details>
### 2.1.3
<details>
<summary>View 2.1.3 patch notes</summary>
#### New Features
##### Allow Registration Setting
Servers now have an "Allow Registration" setting to control whether new users can register accounts. Resolves #408.
##### Server Autostop Delay
Server lifecycle management has been moved to a dedicated `ServerManager`, and servers can now be configured with an autostop delay so they shut down after a period of inactivity. Autostart/autostop for servers should be much more reliable now.
##### Close to System Tray
The launcher can now be closed to the system tray instead of exiting, keeping it running in the background.
##### Image Optimization Tool
A new server-side tool optimizes stored images to reduce disk usage and increase performance when displayed in the launcher.
##### Play Session Rework
Play session tracking has been reworked to be more reliable. Play sessions are now tracked in realtime with the launcher sending keepalives to the server. If a session is detected as stale (e.g. from a crash or improper shutdown), it will be automatically closed and the playtime will be calculated up to that point. This should result in more accurate playtime tracking and prevent issues with sessions that never end.
If, for some reason, a session is improperly created with a suspiciously long duration, a new server-side tool can be used to clean up these sessions and recalculate playtime under Settings > Tools > **Long Play Session**.
##### Working Directory from PCGamingWiki
Save paths pulled from PCGamingWiki will now attempt to set a working directory automatically.
#### Breaking Changes
##### MySQL/PostgreSQL Database Engine Reinitialization
Previous versions of LANCommander had major issues with MySQL/MariaDB and PostgreSQL database engines that would end up softlocking the server when certain operations were performed. This was caused by connections to the database being disposed of prematurely, causing the data access layer to throw exceptions and fail to recover. This has largely been resolved and should result in a much more stable experience using these other database engines.
However, due to support for MySQL/PostgreSQL falling into neglect, many of the database migrations had become out of sync and would fail to apply correctly. To resolve this, all MySQL/PostgreSQL migrations have been regenerated. This will require deployments using MySQL/PostgreSQL to recreate the database. Normally this type of change would be reserved for a major release, but given the state of the MySQL/PostgreSQL support being completely broken, this change is necessary to provide a stable experience for users of these database engines. If you are using MySQL/PostgreSQL, please make sure to back up your data and be prepared to recreate your database when updating to this version.
#### Improvements
- Performance optimizations for game details were made in the launcher, fixing potentially high CPU usage and RAM allocation with games that have videos or screenshots in the media carousel.
- Video players in the media carousel now only play when in view and pause when scrolled out of view or when the window is inactive.
- Updated Notify.NET and fixed taskbar progress reporting
- Localized remaining time and install progress status
- Adjusted styling in the game description
- Removed dead code and fixed video/screenshot loading that could block the UI
- yt-dlp is now downloaded as a self-contained build removing the dependency on Python for Linux systems.
#### Bug Fixes
- Fixed updating one-to-many relationships on the server. This should resolve various issues with redistributables, tags, genres, and platforms not saving correctly.
- Fixed an extra gap on the compact list scrollbar in the launcher
- Fixed the missing "Starting" text in the play button when a game is launching
- Fixed an exception when adding a game without a SteamGridDB API key configured
- Fixed an error thrown during first-time setup when no storage locations exist
- Regenerated MySQL/MariaDB and PostgreSQL migrations
- Fixed an issue where the identity database context could be disposed of prematurely, causing various issues with user management and authentication when using other database engines
- Improved server process termination on Linux by directly calling `kill` via `libc`
<ReleaseDownloads release="v2.1.3" />
</details>
### 2.1.4
<details>
<summary>View 2.1.4 patch notes</summary>
#### New Features
##### External Auth Provider Enhancements
External authentication providers received a major overhaul. The provider editor now supports auto-discovery of scopes and claim mappings, and claims can be mapped to roles so users are automatically assigned the correct roles when logging in over external auth. Users logging in through an external provider are also auto-provisioned.
##### Auto Redirect to External Provider
A new "Auto Redirect to Provider" setting switches authentication challenges to redirect straight to your external auth provider instead of showing the password login form. If more than one external provider is configured, a minimal provider selection page is shown instead.
##### Repack Non-Streamable ZIP Archives
A new server-side tool in the archive editor can now be used to repack archives that were not created in a streamable format. More information about why this is an issue can be found under the [Archives](/Server/Archives) documentation page.
##### WebP Media Support
Media uploads now support the WebP image format.
##### Redistributable Uninstall Scripts
Redistributables can now define an uninstall script, allowing their runtime dependencies to be cleanly removed.
##### Single Instance Launcher
The launcher now ensures only a single instance can run at a time, preventing conflicts from accidentally opening multiple copies.
#### Improvements
- Local files selected for archive upload can now be moved instead of copied, saving disk space.
- Reworked tool installation and action resolution.
- Install notifications now only display once the entire install chain is complete.
- The "Last Played" text now updates every minute and has been localized.
- Added more logging to archive extraction and made the number of install retry attempts configurable.
- A message is now shown indicating the server needs to be restarted after changes are made to authentication providers.
- Game started/stopped server scripts now run as fire and forget and will not prevent servers from starting.
- Adjusted styling for buttons and dropdowns in the launcher.
- Updated SharpCompress to 0.49.1.
- macOS builds now generate a proper `.app` bundle, and Linux builds now produce an AppImage bundled into the normal workflows.
#### Bug Fixes
- Fixed some situations where saves were not being uploaded/downloaded.
- Fixed an error in the launcher when tool actions were not defined.
- Fixed server game actions not loading correctly from the server.
- Fixed non-standalone addons appearing in the library compact list.
- HQ authentication errors are no longer swallowed.
- Fixed user promotion / role assignment.
- Fixed application icons.
<ReleaseDownloads release="v2.1.4" />
</details>
### 2.1.5
<details>
<summary>View 2.1.5 patch notes</summary>
#### New Features
##### Auto Redirect to External Provider in the Launcher
The launcher now honors the server's "Auto Redirect to Provider" setting. When enabled, the login screen redirects straight to your external authentication provider, and the standard authentication fields and buttons are hidden based on the server's authentication settings.
##### Exit Button in Profile Dropdown
An "Exit" button is now available under the profile dropdown, making it easier to fully quit the launcher.
#### Improvements
- Consolidated the game flyout into a unified context menu for more consistent actions across the library views.
- Tools that have no archive are now hidden from the install overlay.
- Automated testing for various aspects of the server UI (thanks [aaronpowell](https://github.com/aaronpowell)!)
#### Bug Fixes
- Fixed removing games from user libraries using the launcher.
- Fixed tool installation.
- Fixed the clickability of games in the compact library list.
- Fixed updating of roles.
- Fixed saving of authentication settings.
- Fixed admin user creation in first time setup.
<ReleaseDownloads release="v2.1.5" />
</details>
### 2.1.6
<details>
<summary>View 2.1.6 patch notes</summary>
#### New Features
##### User and Role Limits
Roles and individual users can now be assigned limits for save storage, total user storage, and download speed. This gives admins finer control over resource usage on shared servers. Resolves [#85](https://github.com/LANCommander/LANCommander/issues/85), [#84](https://github.com/LANCommander/LANCommander/issues/84), and [#100](https://github.com/LANCommander/LANCommander/issues/).
##### PowerShell Modules
A new "Scripting" section has been added to the server UI where PowerShell modules can be defined. These act as a library of reusable functions that can be called from any script. Modules are automatically synced to the launcher and imported when scripts are executed.
##### Per-Game Tool Tracking
Tools are now tracked on a per-game basis. Tools can be marked to "Always Install", and any tools installed for a game are automatically uninstalled when that game is uninstalled.
##### Admin User Creation Dialog
Admins can now create new users directly from the server with a new user creation dialog. Fixes [#419](https://github.com/LANCommander/LANCommander/issues/419).
##### Database Connection Editor
The connection string input used in first-time setup and server settings has been refactored into a full database connection component, making it easier to configure database connections. Fixes [#256](https://github.com/LANCommander/LANCommander/issues/256).
#### Improvements
- Added "Select All" and "Load More" buttons to the media grabber. Fixes [#417](https://github.com/LANCommander/LANCommander/issues/417).
- Metadata lookups now preserve existing values instead of overwriting them. Fixes [#420](https://github.com/LANCommander/LANCommander/issues/420).
- The Library navigation and library/depot switcher are now hidden in both the web UI and launcher when user libraries are disabled.
- Action `ServerHost` values now default to the LANCommander server address.
#### Bug Fixes
- Fixed the display of UTC times.
- Fixed creation of entities with many-to-many relationships. Ref [#414](https://github.com/LANCommander/LANCommander/issues/414).
- Fixed reconciliation of library games based on whether user libraries are enabled or disabled. Ref [#423](https://github.com/LANCommander/LANCommander/issues/423).
- The profile cache is now invalidated when logging out. Fixes [#422](https://github.com/LANCommander/LANCommander/issues/422).
<ReleaseDownloads release="v2.1.6" />
</details>
### 2.1.7
<details>
<summary>View 2.1.7 patch notes</summary>
#### Improvements
- The launcher now loads your library from a new `/Library/Games` endpoint and displays it immediately, with images rendered directly from the server. The full import still runs in the background, so offline functionality is preserved while the library becomes usable much sooner.
- Depot images are now streamed from a remote image cache instead of being downloaded to disk, reducing UI jank. Fixes [#427](https://github.com/LANCommander/LANCommander/issues/427).
- Game installs and uninstalls are now more reliable: installs run in a consistent order (base game, addons, tools, then redistributables), tools are removed before their game is uninstalled, and the game action bar refreshes after a tool is installed. Ref [#414](https://github.com/LANCommander/LANCommander/issues/414).
- The modify menu now lists installed addons.
- Save upload failures are now logged instead of failing silently.
- A running game process is now terminated as a fallback when no spawned window is detected.
- View data is now loaded before transitioning, smoothing navigation.
#### Bug Fixes
- Save path changes on a game now take effect immediately instead of requiring a server restart. Games are correctly updated when a save path is added, updated, or deleted.
- Fixed installation of games and addons that have no dependent games.
- Fixed importing legacy LCX files that have no save paths defined. Fixes [#426](https://github.com/LANCommander/LANCommander/issues/426).
- Fixed persisted page sizes in data tables.
<ReleaseDownloads release="v2.1.7" />
</details>
### 2.1.8
<details>
<summary>View 2.1.8 patch notes</summary>
#### New Features
##### Runtime Platform Targeting
Actions, scripts, and save paths can now be scoped to a specific runtime platform (Windows, Linux, or macOS). This makes it possible to define platform-specific launch actions, install/uninstall scripts, and save paths on a single game without them conflicting across operating systems. A new `Get-Runtime` PowerShell cmdlet is also available for detecting the current platform from within scripts.
#### Improvements
- The offline mode button has been moved to the titlebar for easier access.
- The game description editor in the server UI is now a full Markdown editor.
- Page functionality has been improved with better menus for adding and deleting pages, and slugs are now generated in PascalCase.
- Client/server version mismatches are now detected and logged, making it easier to diagnose connection issues caused by version drift.
- Data table sort order is now persisted.
#### Bug Fixes
- Images now load from the local cache when the launcher is in offline mode.
- Fixed enumeration of script snippets.
- Fixed PowerShell module loading in the launcher. On Windows the execution policy is set to bypass, and module load failures are now trapped and reported as a warning per module instead of failing the entire script.
<ReleaseDownloads release="v2.1.8" />
</details>
### 2.1.9
<details>
<summary>View 2.1.9 patch notes</summary>
#### Improvements
- Path resolution has been unified across the server so that storage paths are resolved consistently everywhere. A migration aligns existing settings storage paths automatically on upgrade.
- Depot queries have been optimized for better performance.
- Server notifications now use a shorter timeout so a slow or unreachable server no longer holds up the launcher.
- Updated SharpCompress to the latest version. This should resolve most extraction issues for games with large archives.
#### Bug Fixes
- Fixed detection of the primary display's resolution on some Linux multi-display configurations.
- Fixed application path resolution on the server, correcting how saves, media, archives, and updates are located.
- Improved handling of the bypass execution policy for scripts.
- Fixed installation of wine32 and winetricks.
<ReleaseDownloads release="v2.1.9" />
</details>
## Downloads
<ReleaseDownloads release="v2.1.9" />
<details>
<summary>View 2.1.8 downloads</summary>
<ReleaseDownloads release="v2.1.8" />
</details>
<details>
<summary>View 2.1.7 downloads</summary>
<ReleaseDownloads release="v2.1.7" />
</details>
<details>
<summary>View 2.1.6 downloads</summary>
<ReleaseDownloads release="v2.1.6" />
</details>
<details>
<summary>View 2.1.5 downloads</summary>
<ReleaseDownloads release="v2.1.5" />
</details>
<details>
<summary>View 2.1.4 downloads</summary>
<ReleaseDownloads release="v2.1.4" />
</details>
<details>
<summary>View 2.1.3 downloads</summary>
<ReleaseDownloads release="v2.1.3" />
</details>
<details>
<summary>View 2.1.2 downloads</summary>
<ReleaseDownloads release="v2.1.2" />
</details>
<details>
<summary>View 2.1.1 downloads</summary>
<ReleaseDownloads release="v2.1.1" />
</details>
<details>
<summary>View 2.1.0 downloads</summary>
<ReleaseDownloads release="v2.1.0" />
</details>
## Contributors
<ContributorGrid from="v2.0.2" to="v2.1.9" />

View file

@ -0,0 +1,38 @@
---
title: 2.1.1
---
import ReleaseDownloads from '@site/src/components/ReleaseDownloads';
import ContributorGrid from '@site/src/components/ContributorGrid';
# LANCommander 2.1.1 Release Notes
:::info Full Release Notes
This is a patch release for the **2.1 series**. For the complete feature overview and all patch notes, visit the [LANCommander 2.1.0 release notes](./2.1.0).
:::
## New Features
### User Registration in Launcher
User registration has been added back into the launcher's login screen. This was a feature from the old launcher that was missed in the port to Avalonia.
### Game Update Support
The Avalonia launcher's update functionality was only partially-implemented. This has been completed and moved over to the new installation workflow system. Additionally, updates for games can be ignored by clicking the dropdown next to the "Update" button and selecting "Play without updating".
## Improvements
- Game titles are now dimmed in the library when not installed, making it easier to see what's ready to play at a glance
- The games list view and depot now display a helpful message when there are no items, instead of showing a blank screen
- The launcher now downloads media on demand if it doesn't exist locally, and gracefully falls back if LibVLC fails to load
## Bug Fixes
- Fixed bundling of LibVLC on macOS and Windows
- Fixed the display of the empty library view
- Fixed game updating
## Downloads
<ReleaseDownloads release="v2.1.1" />
## Contributors
<ContributorGrid from="v2.1.0" to="v2.1.1" />

View file

@ -0,0 +1,41 @@
---
title: 2.1.2
---
import ReleaseDownloads from '@site/src/components/ReleaseDownloads';
import ContributorGrid from '@site/src/components/ContributorGrid';
# LANCommander 2.1.2 Release Notes
:::info Full Release Notes
This is a patch release for the **2.1 series**. For the complete feature overview and all patch notes, visit the [LANCommander 2.1.0 release notes](./2.1.0).
:::
## New Features
### Redistributable Update Checking
The launcher now checks if installed redistributables are up to date and will re-run them when updates are available on the server. This ensures games always have the correct runtime dependencies.
### Drag and Drop File Import in Script Editor
The script editor now supports drag and drop for `.ps1`, `.reg`, `.ini`, and other text files. PowerShell scripts replace the editor contents, `.reg` files are automatically converted to PowerShell commands, and other text files are inserted as escaped strings.
### Manifest and Script Refresh
When a game has no update available, the launcher will now refresh the manifest and scripts on disk. This ensures local files stay in sync with server-side changes that don't trigger a full update.
## Improvements
- Entire row is now clickable in the compact library list view
- Items per page selection is now persisted in data tables
- Improved process termination handling with fallback for Windows and absolute pathing for `kill` on Linux/macOS
## Bug Fixes
- Fixed padding in the metadata lookup dialog
- Fixed HQ token retrieval on the first-time setup and integrations settings pages
- Fixed local server engine tracking (contributed by @Mavyre)
## Downloads
<ReleaseDownloads release="v2.1.2" />
## Contributors
<ContributorGrid from="v2.1.1" to="v2.1.2" />

View file

@ -0,0 +1,67 @@
---
title: 2.1.3
---
import ReleaseDownloads from '@site/src/components/ReleaseDownloads';
import ContributorGrid from '@site/src/components/ContributorGrid';
# LANCommander 2.1.3 Release Notes
:::info Full Release Notes
This is a patch release for the **2.1 series**. For the complete feature overview and all patch notes, visit the [LANCommander 2.1.0 release notes](./2.1.0).
:::
## New Features
### Allow Registration Setting
Servers now have an "Allow Registration" setting to control whether new users can register accounts. Resolves #408.
### Server Autostop Delay
Server lifecycle management has been moved to a dedicated `ServerManager`, and servers can now be configured with an autostop delay so they shut down after a period of inactivity. Autostart/autostop for servers should be much more reliable now.
### Close to System Tray
The launcher can now be closed to the system tray instead of exiting, keeping it running in the background.
### Image Optimization Tool
A new server-side tool optimizes stored images to reduce disk usage and increase performance when displayed in the launcher.
### Play Session Rework
Play session tracking has been reworked to be more reliable. Play sessions are now tracked in realtime with the launcher sending keepalives to the server. If a session is detected as stale (e.g. from a crash or improper shutdown), it will be automatically closed and the playtime will be calculated up to that point. This should result in more accurate playtime tracking and prevent issues with sessions that never end.
If, for some reason, a session is improperly created with a suspiciously long duration, a new server-side tool can be used to clean up these sessions and recalculate playtime under Settings > Tools > **Long Play Session**.
### Working Directory from PCGamingWiki
Save paths pulled from PCGamingWiki will now attempt to set a working directory automatically.
## Breaking Changes
### MySQL/PostgreSQL Database Engine Reinitialization
Previous versions of LANCommander had major issues with MySQL/MariaDB and PostgreSQL database engines that would end up softlocking the server when certain operations were performed. This was caused by connections to the database being disposed of prematurely, causing the data access layer to throw exceptions and fail to recover. This has largely been resolved and should result in a much more stable experience using these other database engines.
However, due to support for MySQL/PostgreSQL falling into neglect, many of the database migrations had become out of sync and would fail to apply correctly. To resolve this, all MySQL/PostgreSQL migrations have been regenerated. This will require deployments using MySQL/PostgreSQL to recreate the database. Normally this type of change would be reserved for a major release, but given the state of the MySQL/PostgreSQL support being completely broken, this change is necessary to provide a stable experience for users of these database engines. If you are using MySQL/PostgreSQL, please make sure to back up your data and be prepared to recreate your database when updating to this version.
## Improvements
- Performance optimizations for game details were made in the launcher, fixing potentially high CPU usage and RAM allocation with games that have videos or screenshots in the media carousel.
- Video players in the media carousel now only play when in view and pause when scrolled out of view or when the window is inactive.
- Updated Notify.NET and fixed taskbar progress reporting
- Localized remaining time and install progress status
- Adjusted styling in the game description
- Removed dead code and fixed video/screenshot loading that could block the UI
- yt-dlp is now downloaded as a self-contained build removing the dependency on Python for Linux systems.
## Bug Fixes
- Fixed updating one-to-many relationships on the server. This should resolve various issues with redistributables, tags, genres, and platforms not saving correctly.
- Fixed an extra gap on the compact list scrollbar in the launcher
- Fixed the missing "Starting" text in the play button when a game is launching
- Fixed an exception when adding a game without a SteamGridDB API key configured
- Fixed an error thrown during first-time setup when no storage locations exist
- Regenerated MySQL/MariaDB and PostgreSQL migrations
- Fixed an issue where the identity database context could be disposed of prematurely, causing various issues with user management and authentication when using other database engines
- Improved server process termination on Linux by directly calling `kill` via `libc`
## Downloads
<ReleaseDownloads release="v2.1.3" />
## Contributors
<ContributorGrid from="v2.1.2" to="v2.1.3" />

View file

@ -0,0 +1,61 @@
---
title: 2.1.4
---
import ReleaseDownloads from '@site/src/components/ReleaseDownloads';
import ContributorGrid from '@site/src/components/ContributorGrid';
# LANCommander 2.1.4 Release Notes
:::info Full Release Notes
This is a patch release for the **2.1 series**. For the complete feature overview and all patch notes, visit the [LANCommander 2.1.0 release notes](./2.1.0).
:::
## New Features
### External Auth Provider Enhancements
External authentication providers received a major overhaul. The provider editor now supports auto-discovery of scopes and claim mappings, and claims can be mapped to roles so users are automatically assigned the correct roles when logging in over external auth. Users logging in through an external provider are also auto-provisioned.
### Auto Redirect to External Provider
A new "Auto Redirect to Provider" setting switches authentication challenges to redirect straight to your external auth provider instead of showing the password login form. If more than one external provider is configured, a minimal provider selection page is shown instead.
### Repack Non-Streamable ZIP Archives
A new server-side tool in the archive editor can now be used to repack archives that were not created in a streamable format. More information about why this is an issue can be found under the [Archives](/Server/Archives) documentation page.
### WebP Media Support
Media uploads now support the WebP image format.
### Redistributable Uninstall Scripts
Redistributables can now define an uninstall script, allowing their runtime dependencies to be cleanly removed.
### Single Instance Launcher
The launcher now ensures only a single instance can run at a time, preventing conflicts from accidentally opening multiple copies.
## Improvements
- Local files selected for archive upload can now be moved instead of copied, saving disk space.
- Reworked tool installation and action resolution.
- Install notifications now only display once the entire install chain is complete.
- The "Last Played" text now updates every minute and has been localized.
- Added more logging to archive extraction and made the number of install retry attempts configurable.
- A message is now shown indicating the server needs to be restarted after changes are made to authentication providers.
- Game started/stopped server scripts now run as fire and forget and will not prevent servers from starting.
- Adjusted styling for buttons and dropdowns in the launcher.
- Updated SharpCompress to 0.49.1.
- macOS builds now generate a proper `.app` bundle, and Linux builds now produce an AppImage bundled into the normal workflows.
## Bug Fixes
- Fixed some situations where saves were not being uploaded/downloaded.
- Fixed an error in the launcher when tool actions were not defined.
- Fixed server game actions not loading correctly from the server.
- Fixed non-standalone addons appearing in the library compact list.
- HQ authentication errors are no longer swallowed.
- Fixed user promotion / role assignment.
- Fixed application icons.
## Downloads
<ReleaseDownloads release="v2.1.4" />
## Contributors
<ContributorGrid from="v2.1.3" to="v2.1.4" />

View file

@ -0,0 +1,41 @@
---
title: 2.1.5
---
import ReleaseDownloads from '@site/src/components/ReleaseDownloads';
import ContributorGrid from '@site/src/components/ContributorGrid';
# LANCommander 2.1.5 Release Notes
:::info Full Release Notes
This is a patch release for the **2.1 series**. For the complete feature overview and all patch notes, visit the [LANCommander 2.1.0 release notes](./2.1.0).
:::
## New Features
### Auto Redirect to External Provider in the Launcher
The launcher now honors the server's "Auto Redirect to Provider" setting. When enabled, the login screen redirects straight to your external authentication provider, and the standard authentication fields and buttons are hidden based on the server's authentication settings.
### Exit Button in Profile Dropdown
An "Exit" button is now available under the profile dropdown, making it easier to fully quit the launcher.
## Improvements
- Consolidated the game flyout into a unified context menu for more consistent actions across the library views.
- Tools that have no archive are now hidden from the install overlay.
- Automated testing for various aspects of the server UI (thanks [aaronpowell](https://github.com/aaronpowell)!)
## Bug Fixes
- Fixed removing games from user libraries using the launcher.
- Fixed tool installation.
- Fixed the clickability of games in the compact library list.
- Fixed updating of roles.
- Fixed saving of authentication settings.
- Fixed admin user creation in first time setup.
## Downloads
<ReleaseDownloads release="v2.1.5" />
## Contributors
<ContributorGrid from="v2.1.4" to="v2.1.5" />

View file

@ -0,0 +1,49 @@
---
title: 2.1.6
---
import ReleaseDownloads from '@site/src/components/ReleaseDownloads';
import ContributorGrid from '@site/src/components/ContributorGrid';
# LANCommander 2.1.6 Release Notes
:::info Full Release Notes
This is a patch release for the **2.1 series**. For the complete feature overview and all patch notes, visit the [LANCommander 2.1.0 release notes](./2.1.0).
:::
## New Features
### User and Role Limits
Roles and individual users can now be assigned limits for save storage, total user storage, and download speed. This gives admins finer control over resource usage on shared servers. Resolves [#85](https://github.com/LANCommander/LANCommander/issues/85), [#84](https://github.com/LANCommander/LANCommander/issues/84), and [#100](https://github.com/LANCommander/LANCommander/issues/).
### PowerShell Modules
A new "Scripting" section has been added to the server UI where PowerShell modules can be defined. These act as a library of reusable functions that can be called from any script. Modules are automatically synced to the launcher and imported when scripts are executed.
### Per-Game Tool Tracking
Tools are now tracked on a per-game basis. Tools can be marked to "Always Install", and any tools installed for a game are automatically uninstalled when that game is uninstalled.
### Admin User Creation Dialog
Admins can now create new users directly from the server with a new user creation dialog. Fixes [#419](https://github.com/LANCommander/LANCommander/issues/419).
### Database Connection Editor
The connection string input used in first-time setup and server settings has been refactored into a full database connection component, making it easier to configure database connections. Fixes [#256](https://github.com/LANCommander/LANCommander/issues/256).
## Improvements
- Added "Select All" and "Load More" buttons to the media grabber. Fixes [#417](https://github.com/LANCommander/LANCommander/issues/417).
- Metadata lookups now preserve existing values instead of overwriting them. Fixes [#420](https://github.com/LANCommander/LANCommander/issues/420).
- The Library navigation and library/depot switcher are now hidden in both the web UI and launcher when user libraries are disabled.
- Action `ServerHost` values now default to the LANCommander server address.
## Bug Fixes
- Fixed the display of UTC times.
- Fixed creation of entities with many-to-many relationships. Ref [#414](https://github.com/LANCommander/LANCommander/issues/414).
- Fixed reconciliation of library games based on whether user libraries are enabled or disabled. Ref [#423](https://github.com/LANCommander/LANCommander/issues/423).
- The profile cache is now invalidated when logging out. Fixes [#422](https://github.com/LANCommander/LANCommander/issues/422).
## Downloads
<ReleaseDownloads release="v2.1.6" />
## Contributors
<ContributorGrid from="v2.1.5" to="v2.1.6" />

View file

@ -0,0 +1,35 @@
---
title: 2.1.7
---
import ReleaseDownloads from '@site/src/components/ReleaseDownloads';
import ContributorGrid from '@site/src/components/ContributorGrid';
# LANCommander 2.1.7 Release Notes
:::info Full Release Notes
This is a patch release for the **2.1 series**. For the complete feature overview and all patch notes, visit the [LANCommander 2.1.0 release notes](./2.1.0).
:::
## Improvements
- The launcher now loads your library from a new `/Library/Games` endpoint and displays it immediately, with images rendered directly from the server. The full import still runs in the background, so offline functionality is preserved while the library becomes usable much sooner.
- Depot images are now streamed from a remote image cache instead of being downloaded to disk, reducing UI jank. Fixes [#427](https://github.com/LANCommander/LANCommander/issues/427).
- Game installs and uninstalls are now more reliable: installs run in a consistent order (base game, addons, tools, then redistributables), tools are removed before their game is uninstalled, and the game action bar refreshes after a tool is installed. Ref [#414](https://github.com/LANCommander/LANCommander/issues/414).
- The modify menu now lists installed addons.
- Save upload failures are now logged instead of failing silently.
- A running game process is now terminated as a fallback when no spawned window is detected.
- View data is now loaded before transitioning, smoothing navigation.
## Bug Fixes
- Save path changes on a game now take effect immediately instead of requiring a server restart. Games are correctly updated when a save path is added, updated, or deleted.
- Fixed installation of games and addons that have no dependent games.
- Fixed importing legacy LCX files that have no save paths defined. Fixes [#426](https://github.com/LANCommander/LANCommander/issues/426).
- Fixed persisted page sizes in data tables.
## Downloads
<ReleaseDownloads release="v2.1.7" />
## Contributors
<ContributorGrid from="v2.1.6" to="v2.1.7" />

View file

@ -0,0 +1,37 @@
---
title: 2.1.8
---
import ReleaseDownloads from '@site/src/components/ReleaseDownloads';
import ContributorGrid from '@site/src/components/ContributorGrid';
# LANCommander 2.1.8 Release Notes
:::info Full Release Notes
This is a patch release for the **2.1 series**. For the complete feature overview and all patch notes, visit the [LANCommander 2.1.0 release notes](./2.1.0).
:::
## New Features
### Runtime Platform Targeting
Actions, scripts, and save paths can now be scoped to a specific runtime platform (Windows, Linux, or macOS). This makes it possible to define platform-specific launch actions, install/uninstall scripts, and save paths on a single game without them conflicting across operating systems. A new `Get-Runtime` PowerShell cmdlet is also available for detecting the current platform from within scripts.
## Improvements
- The offline mode button has been moved to the titlebar for easier access.
- The game description editor in the server UI is now a full Markdown editor.
- Page functionality has been improved with better menus for adding and deleting pages, and slugs are now generated in PascalCase.
- Client/server version mismatches are now detected and logged, making it easier to diagnose connection issues caused by version drift.
- Data table sort order is now persisted.
## Bug Fixes
- Images now load from the local cache when the launcher is in offline mode.
- Fixed enumeration of script snippets.
- Fixed PowerShell module loading in the launcher. On Windows the execution policy is set to bypass, and module load failures are now trapped and reported as a warning per module instead of failing the entire script.
## Downloads
<ReleaseDownloads release="v2.1.8" />
## Contributors
<ContributorGrid from="v2.1.7" to="v2.1.8" />

View file

@ -0,0 +1,32 @@
---
title: 2.1.9
---
import ReleaseDownloads from '@site/src/components/ReleaseDownloads';
import ContributorGrid from '@site/src/components/ContributorGrid';
# LANCommander 2.1.9 Release Notes
:::info Full Release Notes
This is a patch release for the **2.1 series**. For the complete feature overview and all patch notes, visit the [LANCommander 2.1.0 release notes](./2.1.0).
:::
## Improvements
- Path resolution has been unified across the server so that storage paths are resolved consistently everywhere. A migration aligns existing settings storage paths automatically on upgrade.
- Depot queries have been optimized for better performance.
- Server notifications now use a shorter timeout so a slow or unreachable server no longer holds up the launcher.
- Updated SharpCompress to the latest version. This should resolve most extraction issues for games with large archives.
## Bug Fixes
- Fixed detection of the primary display's resolution on some Linux multi-display configurations.
- Fixed application path resolution on the server, correcting how saves, media, archives, and updates are located.
- Improved handling of the bypass execution policy for scripts.
- Fixed installation of wine32 and winetricks.
## Downloads
<ReleaseDownloads release="v2.1.9" />
## Contributors
<ContributorGrid from="v2.1.8" to="v2.1.9" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 829 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 921 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View file

@ -200,6 +200,36 @@ This cmdlet can be useful if you have a game that might require a persistent ID
Get-UserCustomField -Name "SteamId" Get-UserCustomField -Name "SteamId"
``` ```
## `Get-RedistributableOptions`
Retrieves the resolved options for a redistributable assigned to a game.
### Syntax
```powershell
Get-RedistributableOptions
-Path <string>
-Id <Guid>
-Name <string>
```
### Description
The `Get-RedistributableOptions` cmdlet reads the game manifest and returns the resolved option values for the specified redistributable as a nested `PSObject`. Options are resolved in order: schema defaults, then per-game configured values. Nested options in the schema are represented as nested properties on the returned object.
This cmdlet is useful in [Install](/Scripting/Script Types/Install), [Before Start](/Scripting/Script Types/Before Start), and [Run Wrapper](/Scripting/Script Types/Run Wrapper) scripts where you need to access compatibility shim configuration.
### Example
```powershell
$options = Get-RedistributableOptions -Path $InstallDirectory -Id $GameManifest.Id -Name "umu-launcher"
# Access nested options
Write-Host $options.Game.GAMEID # "umu-default" or admin-configured value
Write-Host $options.Proton.PROTONPATH # "GE-Proton" or admin-configured value
# Use in a script
if ($options.Proton.PROTONPATH -eq "GE-Proton") {
Write-Host "Using default Proton version"
}
```
## `Update-UserCustomField` ## `Update-UserCustomField`
Updates the value of a custom field on a users profile. Updates the value of a custom field on a users profile.
@ -218,6 +248,216 @@ The companion to `Get-UserCustomField`, this cmdlet lets you update or set the v
Update-UserCustomField -Name "SteamId" -Value "34950494" Update-UserCustomField -Name "SteamId" -Value "34950494"
``` ```
## `ConvertFrom-SerializedBase64`
Deserializes a Base64-encoded YAML string back into an object.
### Syntax
```powershell
ConvertFrom-SerializedBase64
-Input <string>
```
### Description
The `ConvertFrom-SerializedBase64` cmdlet takes a Base64-encoded string containing YAML-serialized data, decodes it, and deserializes it back into a PowerShell object. This is the companion to `ConvertTo-SerializedBase64` and is useful for reading data that was previously serialized and encoded for storage or transport. Accepts pipeline input.
### Example
```powershell
$data = ConvertFrom-SerializedBase64 -Input "TmFtZTogSGVsbG8="
# Or via pipeline
"TmFtZTogSGVsbG8=" | ConvertFrom-SerializedBase64
```
## `ConvertTo-SerializedBase64`
Serializes an object to YAML and encodes it as a Base64 string.
### Syntax
```powershell
ConvertTo-SerializedBase64
-Input <object>
```
### Description
The `ConvertTo-SerializedBase64` cmdlet takes any object, serializes it to YAML, and then encodes the result as a Base64 string. This is useful for storing or transmitting structured data in a compact, text-safe format. Accepts pipeline input.
### Example
```powershell
$obj = @{ Name = "Hello"; Value = 42 }
$encoded = ConvertTo-SerializedBase64 -Input $obj
# Or via pipeline
$obj | ConvertTo-SerializedBase64
```
## `Edit-PatchGameSpy`
Patches GameSpy master server references in game files to point to a replacement server.
### Syntax
```powershell
Edit-PatchGameSpy
-Path <string>
-Hostname <string> (optional, default: "openspy.net")
-PublicKey <string> (optional, default: OpenSpy public key)
-BinariesToPatch <string[]> (optional, default: "*.dll", "*.exe")
-TextFilesToPatch <string[]> (optional, default: "*.ini", "*.cfg", "*.conf")
```
### Description
The `Edit-PatchGameSpy` cmdlet scans a game's directory for binary and text files that reference GameSpy master servers and patches them to use a replacement server (OpenSpy by default). For binary files, it replaces the `gamespy.com` hostname and public key at the byte level. For text files, it handles Unreal Engine configuration patterns including UT99 and Unreal 2 master server list entries. The replacement hostname must be exactly 12 characters to match the original `gamespy.com` length.
### Example
```powershell
# Patch all GameSpy references to use OpenSpy (default)
Edit-PatchGameSpy -Path "$InstallDirectory"
# Patch with custom hostname and file patterns
Edit-PatchGameSpy -Path "$InstallDirectory" -Hostname "openspy.net" -BinariesToPatch "*.dll","*.exe","*.so"
```
## `Get-HorizontalFov`
Calculates a horizontal field of view scaled for the current display's aspect ratio.
### Syntax
```powershell
Get-HorizontalFov
-Width <int> (optional, defaults to primary display width)
-Height <int> (optional, defaults to primary display height)
-BaseFov <int> (optional, default: 90)
```
### Description
The `Get-HorizontalFov` cmdlet calculates a scaled horizontal field of view based on the display's aspect ratio relative to a 4:3 baseline. Many older games use a default 90-degree horizontal FOV designed for 4:3 displays. This cmdlet computes the correct horizontal FOV for wider aspect ratios so that the visible area matches what was intended. If `-Width` and `-Height` are not specified, the primary display's resolution is used automatically.
### Example
```powershell
# Get FOV for the current display with default 90-degree base
$fov = Get-HorizontalFov
Write-Host "Horizontal FOV: $fov"
# Get FOV for a specific resolution with a custom base FOV
$fov = Get-HorizontalFov -Width 2560 -Height 1440 -BaseFov 90
Write-Host "Horizontal FOV: $fov" # Returns 106
```
## `Get-VerticalFov`
Calculates a vertical field of view scaled for the current display's aspect ratio.
### Syntax
```powershell
Get-VerticalFov
-Width <int> (optional, defaults to primary display width)
-Height <int> (optional, defaults to primary display height)
-BaseFov <int> (optional, default: 75)
```
### Description
The `Get-VerticalFov` cmdlet calculates a scaled vertical field of view based on the display's aspect ratio relative to a 4:3 baseline. Some games use vertical FOV for their configuration. This cmdlet computes the correct vertical FOV for wider aspect ratios. If `-Width` and `-Height` are not specified, the primary display's resolution is used automatically.
### Example
```powershell
# Get vertical FOV for the current display
$fov = Get-VerticalFov
Write-Host "Vertical FOV: $fov"
# Get vertical FOV for a specific resolution
$fov = Get-VerticalFov -Width 1920 -Height 1080 -BaseFov 75
Write-Host "Vertical FOV: $fov" # Returns 59
```
## `Get-SanitizedPath`
Removes invalid filename characters from a path string.
### Syntax
```powershell
Get-SanitizedPath
-Path <string>
```
### Description
The `Get-SanitizedPath` cmdlet strips invalid filename characters from the provided path string. This is useful when constructing file paths from user input or game titles that may contain characters not allowed in file names. Accepts pipeline input.
### Example
```powershell
$clean = Get-SanitizedPath -Path "Game: The Sequel?"
Write-Host $clean # Returns "Game The Sequel"
# Or via pipeline
"Game: The Sequel?" | Get-SanitizedPath
```
## `Expand-LatestArchive`
Downloads and extracts the latest archive for a game, redistributable, or tool.
### Syntax
```powershell
Expand-LatestArchive
-DestinationPath <string> (optional, defaults to current directory)
-GameId <Guid> (optional, resolved from $GameManifest or $Game)
-RedistributableId <Guid> (optional, resolved from $Redistributable)
-ToolId <Guid> (optional, resolved from $Tool)
```
### Description
The `Expand-LatestArchive` cmdlet extracts the latest archive for a game, redistributable, or tool. When run in a server-side packaging context (where `$LatestArchivePath` is set), it reads directly from the local archive file. When run in a client-side context, it downloads the archive from the LANCommander server via the API. The target ID is automatically resolved from context variables (`$Redistributable`, `$Tool`, `$GameManifest`, or `$Game`) if not explicitly provided. Returns a `DirectoryInfo` object pointing to the extraction destination.
### Example
```powershell
# Extract to the current directory using the context variable
Expand-LatestArchive
# Extract to a specific directory
Expand-LatestArchive -DestinationPath "C:\Games\MyGame"
# Extract a specific game's archive
Expand-LatestArchive -GameId "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -DestinationPath "C:\Staging"
# Extract a redistributable's archive
Expand-LatestArchive -RedistributableId "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
# Extract a tool's archive
Expand-LatestArchive -ToolId "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```
## `New-Package`
Creates a package result object for the packaging pipeline.
### Syntax
```powershell
New-Package
-Path <string>
-Version <string>
-Changelog <string> (optional)
```
### Description
The `New-Package` cmdlet creates a `Package` object with the specified path, version, and optional changelog, and sets it as the script's return value. This cmdlet is used in [Package](/Scripting/Script Types/Package) scripts to define the output of the packaging process. The `-Path` parameter should point to the directory containing the package contents to be archived.
### Example
```powershell
# Create a package from a build output directory
New-Package -Path "C:\Build\Output" -Version "1.0.0" -Changelog "Initial release"
# Minimal usage
New-Package -Path "$BuildDirectory" -Version "2.1.0"
```
## `Out-PlayerAvatar`
Downloads the current player's avatar from the server.
### Syntax
```powershell
Out-PlayerAvatar
```
### Description
The `Out-PlayerAvatar` cmdlet retrieves the current authenticated player's avatar from the LANCommander server. Returns the avatar file path as a string. This cmdlet takes no parameters and must be run within a LANCommander script context where the player is authenticated.
### Example
```powershell
$avatarPath = Out-PlayerAvatar
Write-Host "Avatar saved to: $avatarPath"
```
# Steam-Related Cmdlets # Steam-Related Cmdlets
The following cmdlets provide functionality for interacting with SteamCMD and the Steam Store API. These cmdlets enable you to install Steam games, manage SteamCMD profiles, search for games, and retrieve Steam assets. The following cmdlets provide functionality for interacting with SteamCMD and the Steam Store API. These cmdlets enable you to install Steam games, manage SteamCMD profiles, search for games, and retrieve Steam assets.

View file

@ -0,0 +1,39 @@
---
title: Run Wrapper
---
# Overview
Run Wrapper scripts provide a way for [compatibility shim redistributables](/Server/Redistributables#compatibility-shims) to control how a game executable is launched. Unlike a [Command Template](/Server/Redistributables#commandtemplate), which simply rewrites the executable path and arguments, a Run Wrapper script has full control over the launch process and can perform complex operations like DLL injection, file copying, or environment setup before starting the game.
Run Wrapper scripts are defined on a redistributable, not on individual games. When a game is launched that has a redistributable with a Run Wrapper script, the script is executed instead of the normal process launch.
## Variables
When a Run Wrapper script is executed, the following variables are available within the runtime:
| Name | Type | Description |
|:-------------------------:|:---------------------------------------:|:-------------------------------------------------------------:|
| `$InstallDirectory` | `string` | The install directory of the game |
| `$GameManifest` | `LANCommander.SDK.GameManifest` | The game manifest containing metadata about the game |
| `$ExecutablePath` | `string` | The resolved path to the game executable |
| `$Arguments` | `string` | The resolved command-line arguments for the executable |
| `$WorkingDirectory` | `string` | The resolved working directory for the executable |
| `$ServerAddress` | `string` | The source LANCommander server address |
Additionally, all resolved option values from the redistributable's option schema are available. Use the `Get-RedistributableOptions` cmdlet to access them as a structured object.
## Example
This example shows a Run Wrapper script for a DLL injection-based compatibility tool:
```powershell
# Copy the compatibility DLL to the game directory
$shimPath = Join-Path $InstallDirectory ".interposer"
if (Test-Path $shimPath) {
Copy-Item "$shimPath\*.dll" -Destination $InstallDirectory -Force
}
# Get the configured options
$options = Get-RedistributableOptions -Path $InstallDirectory -Id $GameManifest.Id -Name "MyShim"
# Launch the game
Start-Process -FilePath $ExecutablePath -ArgumentList $Arguments -WorkingDirectory $WorkingDirectory -Wait
```

View file

@ -0,0 +1,51 @@
---
title: Archives
---
# Archives
Games, redistributables, and tools are distributed to clients as ZIP archives. When a launcher installs a game it **streams the archive straight from the server and extracts it on the fly**. This keeps installs fast and avoids needing double the disk space, but it means the archive has to be readable from start to finish without seeking backwards.
Most ZIP files satisfy this without any special effort. A small number of archives, however, are written in a layout that a streaming reader cannot extract reliably. This page explains how to create streaming-safe archives and how to fix existing ones.
## Why some archives fail to install
A streaming reader discovers each file's boundaries as the bytes arrive. For that to work, every entry must declare its size up front, in its **local file header**.
Some archiving tools instead write entries in a *streaming* layout, where the size is unknown when the entry starts and is recorded afterwards in a trailing **data descriptor**. For compressed entries this is fine as the compressed bytes cannot be mistaken for the data descriptor. However, if you store an uncompressed entry that _happens to be another archive_, this can confuse the streaming reader and cause it to improperly determine the size of the entry being extracted.
:::info
The problematic combination is specifically **stored (uncompressed) + streaming data descriptor**. A stored entry whose size *is* in its local header installs fine at any size, and compressed entries are unaffected.
:::
## Creating streaming-safe archives
The safest rule of thumb: **create archives with a tool writing to a file** (not piping to a stream), and let large already-compressed payloads be stored with their sizes recorded normally. Writing to a real file lets the tool go back and fill in each entry's size in its local header instead of using a streaming data descriptor.
| Tool | Recommendation |
|------|----------------|
| **7-Zip** (GUI or `7z`) | Safe by defaul. Use a normal `Add to archive` / `7z a archive.zip files` and write to a _local disk_, not a network share. |
| **Windows Explorer** (Send to → Compressed folder) | Safe by default. |
| **Info-ZIP `zip`** | Safe when writing to a file (`zip -r archive.zip folder`). Avoid piping to stdout (`zip - ...`), which forces streaming data descriptors. |
| **PowerShell `Compress-Archive`** | Safe by default, do not write to a network share. |
For payloads larger than 4 GiB, make sure the tool produces a **ZIP64** archive (all the tools above do this automatically when needed).
:::info
Future versions of the launcher will have a built-in packaging tool to help in the creation of archives.
:::
## Checking and repacking existing archives
The server can detect and fix archives that use the problematic layout. On a game's **Archives** tab, each uploaded archive has a **Check Streaming Compatibility** action (the shield icon).
1. Click **Check Streaming Compatibility** on an archive.
2. If the archive is safe, you'll get a confirmation message and nothing else happens.
3. If it contains stored entries written with a streaming data descriptor, you'll be prompted to **repack** it.
4. Choosing to repack queues a background job that rewrites the archive into a streaming-safe layout. Compression is preserved per entry so the repack does not waste time re-compressing already-compressed data. The job runs in the background and can take a while for multi-gigabyte archives.
Repacking rewrites the file in place once complete and recalculates its reported sizes. File contents (and their CRCs) are unchanged; only the archive's internal layout is corrected.
:::warning
Repacking reads and rewrites the entire archive, so it temporarily needs free disk space roughly equal to the archive's size in the same storage location.
:::

View file

@ -45,6 +45,9 @@ The "General" panel of the game editor contains most of the metadata fields for
| Collections | The list of collections that the game belongs to | Tag List | | Collections | The list of collections that the game belongs to | Tag List |
| Redistributables | A selectable list of redistributables that the game requires to be installed | Multi Select | | Redistributables | A selectable list of redistributables that the game requires to be installed | Multi Select |
#### Redistributable Options
When a game has redistributables assigned that define an [Option Schema](/Server/Redistributables#option-schema), additional form fields appear below the Redistributables selection. These fields are generated from the schema and allow you to configure per-game option values for each compatibility shim. For example, you might set the `GAMEID` for umu-launcher or the `PROTONPATH` for a specific Proton version. See [Redistributables - Compatibility Shims](/Server/Redistributables#compatibility-shims) for details.
### Game Types ### Game Types
If you have a game that requires another game to be installed, you may have to specify the game type to modify the behavior of the installation. If you have a game that requires another game to be installed, you may have to specify the game type to modify the behavior of the installation.
@ -80,6 +83,9 @@ In addition to these variables, any [environment variables](https://ss64.com/nt/
Servers may also define custom variables in order to provide direct connection details such as IP and port. For more information, see [Servers](/Server/Servers). Servers may also define custom variables in order to provide direct connection details such as IP and port. For more information, see [Servers](/Server/Servers).
#### Option Overrides
If the game has redistributables with an [Option Schema](/Server/Redistributables#option-schema), each action can override specific option values. This is useful when different actions need different compatibility settings. For example, a "Dedicated Server" action might need a different Proton verb than the "Play" action. Click the **Option Overrides** button on an action to configure overrides. Any field left empty will use the game-level value. See [Redistributables - Per-Action Overrides](/Server/Redistributables#per-action-overrides) for details.
### Multiplayer ### Multiplayer
The multiplayer panel is used to denote the types of multiplayer available for the game. This is purely additional metadata. Defining these can make it extremely useful in LAN scenarios where you can find the right game for your session's player count. Enter the following modes for *Call of Duty*: The multiplayer panel is used to denote the types of multiplayer available for the game. This is purely additional metadata. Defining these can make it extremely useful in LAN scenarios where you can find the right game for your session's player count. Enter the following modes for *Call of Duty*:
| Type | Min Player | Max Players | Protocol | Description | | Type | Min Player | Max Players | Protocol | Description |

View file

@ -29,5 +29,124 @@ Games can be assigned redistributables in two ways:
- When editing a game, use the **Redistributables** multiselect field to choose any applicable redistributable - When editing a game, use the **Redistributables** multiselect field to choose any applicable redistributable
- When editing a redistributable, you may use the **Games** multiselect field to choose any game that might require the redistributable to be installed - When editing a redistributable, you may use the **Games** multiselect field to choose any game that might require the redistributable to be installed
# Compatibility Shims
Redistributables can also serve as **compatibility shims** — tools that wrap game execution for cross-platform support. Examples include [WINE](https://www.winehq.org/), [umu-launcher](https://github.com/Open-Wine-Components/umu-launcher), and [LANCommander.Interposer](https://github.com/LANCommander/LANCommander.Interposer).
A redistributable becomes a compatibility shim when it has an **Option Schema** defined. The option schema is a YAML document that describes configurable options and how to wrap the game executable at launch time.
## Option Schema
The option schema is defined in the **Option Schema** field on the redistributable's General page. It uses YAML with PascalCase keys and supports the following structure:
```yaml
CommandTemplate: umu-run {exe} {args}
Options:
Game:
Description: Game identification
Options:
GAMEID:
Type: string
IsEnvironmentVariable: true
Default: umu-default
Description: Game ID for protonfixes lookup
Proton:
Description: Proton configuration
Options:
PROTONPATH:
Type: string
IsEnvironmentVariable: true
Default: GE-Proton
Description: Proton version or path
```
### CommandTemplate
Defines how the game executable is wrapped. Use `{exe}` and `{args}` as placeholders for the original executable path and arguments. When a command template is defined, the launcher rewrites the process start info before launching.
### Options
A dictionary of option definitions. Options can be nested to create logical groupings. Group nodes (those with only child `Options` and no `Type`) serve as organizational containers. Leaf nodes (those with a `Type`) are the actual configurable values.
Each option definition supports the following fields:
| Field | Type | Description |
|-------------------------|------------|----------------------------------------------------------------------------------------------------|
| `Type` | `string` | The data type: `string`, `bool`, `int`, `choice`, or `list` |
| `Default` | `string` | The default value if none is configured. For `list`, a YAML sequence (see below). |
| `Description` | `string` | A human-readable description shown in the admin UI |
| `Required` | `bool` | Whether the option must be configured |
| `IsEnvironmentVariable` | `bool` | If `true`, the resolved value is set as a process environment variable using the option's key name |
| `Choices` | `string[]` | Available values for `choice` type options |
| `Options` | `dict` | Child options for creating nested groups |
| `ItemType` | `string` | For scalar `list` options: the type of each item (`string`, `int`, `bool`). Defaults to `string`. |
| `Fields` | `dict` | For composite `list` options: per-row sub-schema. Presence of `Fields` makes the list composite. |
| `MinItems` / `MaxItems` | `int` | For `list` options: lower/upper bounds on the number of rows. Both optional. |
Nested options are flattened using dot-notation keys for storage and resolution (e.g., `Game.GAMEID`). When `IsEnvironmentVariable` is `true`, only the leaf key name is used as the environment variable name (e.g., `GAMEID`, not `Game.GAMEID`).
### List Options
Use `Type: list` when an option needs to hold a variable number of values — for example, repeated INI entries like `ListFactories[0]=…`, `ListFactories[1]=…`, etc.
A list option is either **scalar** (a list of plain values) or **composite** (a list of records). The shape of each row is determined entirely by the schema; how the values are emitted into the target config is up to the redistributable's scripts.
**Scalar list** — each row is a single value:
```yaml
Options:
AllowedHosts:
Type: list
ItemType: string
Default:
- localhost
- example.com
```
**Composite list** — each row is a record with named fields. A list-level `Default:` seeds initial rows; per-field `Default:` inside `Fields` is used to prefill new rows when an admin clicks "+ Add Item":
```yaml
Options:
MasterServers:
Type: list
DisplayName: Master Servers
Fields:
Address:
Type: string
Default: master.example.com
Port:
Type: int
Default: 28900
GameName:
Type: string
Default: unreal
MinItems: 1
MaxItems: 16
Default:
- { Address: master.oldunreal.com, Port: 28900, GameName: unreal }
- { Address: master.hlkclan.net, Port: 28900, GameName: unreal }
```
**Consuming list values in scripts.** `Get-RedistributableOptions` hydrates list values into native PowerShell arrays — scalar lists become typed arrays (`string[]`/`int[]`/`bool[]`), composite lists become arrays of `PSObject`s keyed by `Fields`. The script decides the on-disk format:
```powershell
$opts = Get-RedistributableOptions -Path $InstallDirectory -Id $GameId -Name "UBrowser"
$lines = @()
for ($i = 0; $i -lt $opts.MasterServers.Count; $i++) {
$s = $opts.MasterServers[$i]
$lines += "ListFactories[$i]=UBrowser.UBrowserGSpyFact,MasterServerAddress=$($s.Address),MasterServerTCPPort=$($s.Port),GameName=$($s.GameName)"
}
$lines | Set-Content (Join-Path $InstallDirectory "System/UnrealTournament.ini")
```
**Environment variables.** `IsEnvironmentVariable: true` is ignored for `Type: list` because environment variables are scalar. Read list values from `Get-RedistributableOptions` in a script instead.
## Per-Game Options
When a game is assigned a redistributable that has an option schema, the game's **Redistributables** page will display form fields for each option. Administrators can configure values specific to that game (e.g., setting the correct `GAMEID` for protonfixes). These values are stored on the game-redistributable relationship and override the schema defaults.
## Resolution Order
Option values are resolved in the following order, with later values taking precedence:
1. **Schema defaults** — the `Default` value defined in the option schema
2. **Per-game values** — configured by the admin on the game's Redistributables page
## Run Wrapper Scripts
For compatibility tools that require more complex execution logic than a simple command template (e.g., DLL injection), redistributables can define a [Run Wrapper](/Scripting/Script Types/Run Wrapper) script. This script receives the executable path, arguments, working directory, and all resolved option values, and is responsible for launching the process.
## Accessing Options in Scripts
Options can be accessed within any game script using the `Get-RedistributableOptions` cmdlet. See the [Cmdlets](/Scripting/Cmdlets) documentation for details.
# Install Process # Install Process
When a game is installed via the [SDK](/SDK/Overview) or [launcher](/Launcher/Overview), it includes a list of redistributables that have been assigned. For each of these redistributables, the client will execute the [Detect Install](/Scripting/Script Types/Detect Install) script. If the script has determined that there is no prior installation, the client will then download the archive and extract it to the user's temp directory. It will then execute the [Install](/Scripting/Script Types/Install) script with the working directory set to the destination of the archive's extraction. When a game is installed via the [SDK](/SDK/Overview) or [launcher](/Launcher/Overview), it includes a list of redistributables that have been assigned. For each of these redistributables, the client will execute the [Detect Install](/Scripting/Script Types/Detect Install) script. If the script has determined that there is no prior installation, the client will then download the archive and extract it to the user's temp directory. It will then execute the [Install](/Scripting/Script Types/Install) script with the working directory set to the destination of the archive's extraction.

View file

@ -13,6 +13,13 @@ Scopes:
- email - email
``` ```
:::tip
Because Authentik exposes an OpenID Connect configuration URL, you can use the **Discover**
button on the provider to map the standard claims and add the base scopes automatically.
See the [Authentication overview](/Server/Settings/Authentication/Overview#discovery-oidc)
for details.
:::
Make sure to set your redirect URLs appropriately. LANCommander expects the following redirect URL scheme: Make sure to set your redirect URLs appropriately. LANCommander expects the following redirect URL scheme:
```http(s)://<ServerAddress>/SignInOIDC``` ```http(s)://<ServerAddress>/SignInOIDC```

View file

@ -0,0 +1,132 @@
---
title: Authentication
sidebar_label: Overview
sidebar_position: 1
---
# Authentication
LANCommander can delegate sign-in to external identity providers in addition to its
built-in local accounts. Two provider protocols are supported:
- **OpenID Connect (OIDC)** — recommended. The provider exposes a discovery document
(the *well-known configuration URL*) that LANCommander uses to resolve all of its
endpoints automatically.
- **OAuth2** — for providers that do not offer OIDC discovery. You supply each endpoint
(authorization, token, user info) by hand.
:::info
SAML is listed in the provider type list but is **not implemented**. Selecting it will
prevent the provider from being registered.
:::
Providers are configured under **Settings → Authentication → External Providers**. A
**server restart is required** for changes to authentication providers to take effect.
## Configuring a provider
Each provider shares a common set of fields, plus a few that depend on the type.
| Field | Applies to | Description |
| --- | --- | --- |
| Name | All | Display name shown on the login button. |
| Color / Icon | All | Styling for the login button. |
| Type | All | `OAuth2` or `OpenIdConnect`. |
| Client ID / Client Secret | All | Credentials issued by the provider. |
| Configuration Endpoint | OIDC | The provider's `.well-known/openid-configuration` URL. |
| Authorization / Token / User Info Endpoint | OAuth2 | The provider's individual endpoints. |
| Scopes | All | Scopes requested during sign-in (see below). |
| Claim Mappings | All | How provider claims map onto LANCommander users (see below). |
### Redirect URLs
When registering LANCommander with your provider, configure the redirect (callback) URL
to match the protocol:
| Type | Redirect URL |
| --- | --- |
| OpenID Connect | `http(s)://<ServerAddress>/SignInOIDC` |
| OAuth2 | `http(s)://<ServerAddress>/SignInOAuth` |
:::info
If you see `Correlation failed.` errors in the logs, review your
[cookie policy settings](/Server/Settings/Authentication/Security).
:::
## Scopes
Scopes determine which information the provider releases during sign-in. At minimum an
OIDC provider needs `openid`; `profile` and `email` are commonly added so the user's
name and email claims are returned. Some providers expose a `roles` or `groups` scope
for [role synchronization](#role-synchronization).
## Claim mappings
A **claim mapping** projects a claim returned by the provider onto a destination claim
that LANCommander understands and applies to the user on login.
- **Claim** (the source) is a key in the provider's user-info response, e.g.
`preferred_username`.
- **Destination** (the target) is one of the well-known names below.
For OIDC providers the configured claim mappings run over the user-info endpoint
response, so make sure the scopes you request actually cause those claims to be returned.
### Recognized destinations
| Destination | Maps to | Notes |
| --- | --- | --- |
| `nameidentifier` | External unique ID | **Required** — links the provider login to a LANCommander account. |
| `name` | Username | |
| `email` | Email address | |
| `alias` | Display alias | |
| `role` (or `roles`) | Role name(s) | Array values are expanded into multiple roles; nested keys are supported with dotted paths (e.g. `realm_access.roles`). Each value is used directly as a role name. |
The full `http://schemas.xmlsoap.org/...` claim URIs are also accepted for `name`,
`email`, and `nameidentifier`. When no username claim is available (or it collides with
an existing local account), the user is sent to manual registration to finish linking.
## Discovery (OIDC)
For OpenID Connect providers, the **Discover** button next to the claim mappings reads
the provider's discovery document and configures the provider for you:
- **Standard claims are mapped automatically.** When the provider advertises them, the
following are mapped:
| Destination | Source claim (first advertised wins) |
| --- | --- |
| `nameidentifier` | `sub` |
| `email` | `email` |
| `name` | `preferred_username``name``username` |
| `alias` | `nickname``name` |
| `role` | `roles``groups` |
- **Base scopes are added automatically.** `openid` is always added (it is required for
the OIDC flow); `profile`, `email`, `roles`, and `groups` are added when the provider
advertises them.
- Any other advertised claims appear as clickable suggestions you can add as mappings,
and as autocomplete options while editing a mapping.
Discovery never overwrites mappings or scopes you have already configured, and re-running
it adds nothing new.
:::info
The discovery document's `claims_supported` and `scopes_supported` lists are **advisory**.
They are optional in the OIDC spec and many providers under-report them, so treat the
results as suggestions — you can always add claims and scopes manually.
:::
## Role synchronization
When a provider login supplies role claims (mapped to `role`), LANCommander syncs the
user's roles on every login:
- Roles named in the claims that don't yet exist are created automatically.
- Roles the user no longer has in the claims are removed — **except** the Administrator
role and the configured default role, which are never removed automatically.
## Provider examples
See the [External Providers](/Server/Settings/Authentication/External%20Providers/Authentik)
section for ready-to-use configuration examples.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View file

@ -1,8 +0,0 @@
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="LANCommander.Launcher.Avalonia.Tests.TestApp"
RequestedThemeVariant="Dark">
<Application.Styles>
<FluentTheme />
</Application.Styles>
</Application>

View file

@ -1 +0,0 @@
global using static LANCommander.Launcher.Avalonia.Helpers.Localization;

View file

@ -1,268 +0,0 @@
using System;
using System.Collections.Generic;
using System.Threading;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Input;
using Avalonia.Threading;
using Microsoft.Extensions.Logging;
namespace LANCommander.Launcher.Avalonia.Input;
/// <summary>
/// Polls SDL2 for gamepad input on a background thread and injects
/// the equivalent keyboard events into Avalonia's input pipeline.
/// Only affects the app when it has focus — no OS-level input injection.
/// </summary>
public sealed class GamepadService : IDisposable
{
private static readonly TimeSpan RepeatDelay = TimeSpan.FromMilliseconds(400);
private static readonly TimeSpan RepeatInterval = TimeSpan.FromMilliseconds(120);
private const short DeadZone = 8_000;
private readonly ILogger<GamepadService> _logger;
private Thread? _thread;
private CancellationTokenSource? _cts;
private bool _sdlInitialized;
private readonly Dictionary<int, IntPtr> _controllers = new();
// Per-axis repeat state (Key.None = centered)
private Key _axisXKey = Key.None;
private Key _axisYKey = Key.None;
private DateTime _axisXStart, _axisYStart;
private DateTime _axisXRepeat, _axisYRepeat;
public GamepadService(ILogger<GamepadService> logger)
{
_logger = logger;
}
public void Start()
{
_cts = new CancellationTokenSource();
_thread = new Thread(PollLoop) { IsBackground = true, Name = "GamepadPollThread" };
_thread.Start();
}
public void Stop() => _cts?.Cancel();
// -------------------------------------------------------------------------
// Background poll loop
// -------------------------------------------------------------------------
private void PollLoop()
{
try
{
if (Sdl2.SDL_Init(Sdl2.SDL_INIT_GAMECONTROLLER) < 0)
{
_logger.LogWarning("SDL_Init failed — gamepad navigation disabled");
return;
}
_sdlInitialized = true;
_logger.LogInformation("SDL2 gamepad subsystem initialized");
for (var i = 0; i < Sdl2.SDL_NumJoysticks(); i++)
TryOpenController(i);
while (!_cts!.IsCancellationRequested)
{
while (Sdl2.SDL_PollEvent(out var ev) != 0)
HandleEvent(ref ev);
TickAxisRepeat();
Thread.Sleep(8); // ~120 Hz
}
}
catch (DllNotFoundException)
{
_logger.LogWarning("SDL2 native library not found — gamepad navigation disabled");
}
catch (OperationCanceledException) { }
catch (Exception ex)
{
_logger.LogError(ex, "Unexpected error in gamepad poll loop");
}
finally
{
foreach (var handle in _controllers.Values)
Sdl2.SDL_GameControllerClose(handle);
_controllers.Clear();
if (_sdlInitialized)
Sdl2.SDL_Quit();
}
}
// -------------------------------------------------------------------------
// SDL event dispatch
// -------------------------------------------------------------------------
private void HandleEvent(ref Sdl2.SDL_Event ev)
{
switch (ev.type)
{
case Sdl2.SDL_CONTROLLERDEVICEADDED:
TryOpenController(ev.cdevice.which);
break;
case Sdl2.SDL_CONTROLLERDEVICEREMOVED:
CloseController(ev.cdevice.which);
break;
case Sdl2.SDL_CONTROLLERBUTTONDOWN:
OnButton(ev.cbutton.button);
break;
case Sdl2.SDL_CONTROLLERAXISMOTION:
OnAxis(ev.caxis.axis, ev.caxis.value);
break;
}
}
private void TryOpenController(int joystickIndex)
{
if (!Sdl2.SDL_IsGameController(joystickIndex)) return;
var handle = Sdl2.SDL_GameControllerOpen(joystickIndex);
if (handle == IntPtr.Zero) return;
_controllers[joystickIndex] = handle;
_logger.LogInformation("Gamepad {Index} connected", joystickIndex);
}
private void CloseController(int instanceId)
{
var handle = Sdl2.SDL_GameControllerFromInstanceID(instanceId);
if (handle != IntPtr.Zero)
Sdl2.SDL_GameControllerClose(handle);
_controllers.Remove(instanceId);
_logger.LogInformation("Gamepad {InstanceId} disconnected", instanceId);
}
// -------------------------------------------------------------------------
// Button → key mapping
// A / Start → Enter (confirm / activate)
// B → Escape (back)
// D-pad → arrow keys
// LB / RB → Page Up / Page Down
// -------------------------------------------------------------------------
private void OnButton(byte button)
{
var key = button switch
{
Sdl2.SDL_CONTROLLER_BUTTON_A => Key.Return,
Sdl2.SDL_CONTROLLER_BUTTON_START => Key.Return,
Sdl2.SDL_CONTROLLER_BUTTON_B => Key.Escape,
Sdl2.SDL_CONTROLLER_BUTTON_DPAD_UP => Key.Up,
Sdl2.SDL_CONTROLLER_BUTTON_DPAD_DOWN => Key.Down,
Sdl2.SDL_CONTROLLER_BUTTON_DPAD_LEFT => Key.Left,
Sdl2.SDL_CONTROLLER_BUTTON_DPAD_RIGHT => Key.Right,
Sdl2.SDL_CONTROLLER_BUTTON_LEFTSHOULDER => Key.PageUp,
Sdl2.SDL_CONTROLLER_BUTTON_RIGHTSHOULDER => Key.PageDown,
_ => Key.None
};
if (key != Key.None)
SimulateKey(key);
}
// -------------------------------------------------------------------------
// Left-stick axes → arrow keys with initial delay + auto-repeat
// -------------------------------------------------------------------------
private void OnAxis(byte axis, short value)
{
if (axis == Sdl2.SDL_CONTROLLER_AXIS_LEFTX)
{
var key = value < -DeadZone ? Key.Left
: value > DeadZone ? Key.Right
: Key.None;
if (key != _axisXKey)
{
_axisXKey = key;
if (key != Key.None)
{
_axisXStart = _axisXRepeat = DateTime.UtcNow;
SimulateKey(key);
}
}
}
else if (axis == Sdl2.SDL_CONTROLLER_AXIS_LEFTY)
{
var key = value < -DeadZone ? Key.Up
: value > DeadZone ? Key.Down
: Key.None;
if (key != _axisYKey)
{
_axisYKey = key;
if (key != Key.None)
{
_axisYStart = _axisYRepeat = DateTime.UtcNow;
SimulateKey(key);
}
}
}
}
private void TickAxisRepeat()
{
var now = DateTime.UtcNow;
if (_axisXKey != Key.None
&& now - _axisXStart > RepeatDelay
&& now - _axisXRepeat > RepeatInterval)
{
_axisXRepeat = now;
SimulateKey(_axisXKey);
}
if (_axisYKey != Key.None
&& now - _axisYStart > RepeatDelay
&& now - _axisYRepeat > RepeatInterval)
{
_axisYRepeat = now;
SimulateKey(_axisYKey);
}
}
// -------------------------------------------------------------------------
// Inject a key press into Avalonia's input pipeline via public interfaces.
// IInputManager and IKeyboardDevice are both public; only the concrete
// InputManager class and KeyboardDevice.Instance were internalized.
// -------------------------------------------------------------------------
private static void SimulateKey(Key key)
{
Dispatcher.UIThread.Post(() =>
{
var window = (Application.Current?.ApplicationLifetime
as IClassicDesktopStyleApplicationLifetime)?.MainWindow;
if (window is null) return;
var focused = window.FocusManager?.GetFocusedElement() as InputElement;
if (focused is null) return;
focused.RaiseEvent(new KeyEventArgs { RoutedEvent = InputElement.KeyDownEvent, Key = key });
focused.RaiseEvent(new KeyEventArgs { RoutedEvent = InputElement.KeyUpEvent, Key = key });
}, DispatcherPriority.Input);
}
// -------------------------------------------------------------------------
public void Dispose()
{
Stop();
_cts?.Dispose();
}
}

View file

@ -1,128 +0,0 @@
using System;
using System.Runtime.InteropServices;
namespace LANCommander.Launcher.Avalonia.Input;
/// <summary>
/// Minimal SDL2 P/Invoke bindings for gamepad input.
/// Requires SDL2 to be present at runtime (SDL2.dll on Windows,
/// libSDL2-2.0.so.0 on Linux, libSDL2.dylib on macOS).
/// </summary>
internal static partial class Sdl2
{
private const string LibName = "SDL2";
static Sdl2()
{
NativeLibrary.SetDllImportResolver(typeof(Sdl2).Assembly, (name, assembly, path) =>
{
if (name != LibName)
return IntPtr.Zero;
var nativeName = RuntimeInformation.IsOSPlatform(OSPlatform.Linux)
? "libSDL2-2.0.so.0"
: RuntimeInformation.IsOSPlatform(OSPlatform.OSX)
? "libSDL2.dylib"
: "SDL2.dll";
return NativeLibrary.TryLoad(nativeName, assembly, path, out var handle)
? handle
: IntPtr.Zero;
});
}
// Init flags
public const uint SDL_INIT_GAMECONTROLLER = 0x00002000;
// Event types
public const uint SDL_CONTROLLERAXISMOTION = 0x650;
public const uint SDL_CONTROLLERBUTTONDOWN = 0x651;
public const uint SDL_CONTROLLERBUTTONUP = 0x652;
public const uint SDL_CONTROLLERDEVICEADDED = 0x653;
public const uint SDL_CONTROLLERDEVICEREMOVED = 0x654;
// Axes
public const byte SDL_CONTROLLER_AXIS_LEFTX = 0;
public const byte SDL_CONTROLLER_AXIS_LEFTY = 1;
public const byte SDL_CONTROLLER_AXIS_TRIGGERLEFT = 4;
public const byte SDL_CONTROLLER_AXIS_TRIGGERRIGHT = 5;
// Buttons
public const byte SDL_CONTROLLER_BUTTON_A = 0;
public const byte SDL_CONTROLLER_BUTTON_B = 1;
public const byte SDL_CONTROLLER_BUTTON_X = 2;
public const byte SDL_CONTROLLER_BUTTON_Y = 3;
public const byte SDL_CONTROLLER_BUTTON_BACK = 4;
public const byte SDL_CONTROLLER_BUTTON_START = 6;
public const byte SDL_CONTROLLER_BUTTON_LEFTSHOULDER = 9;
public const byte SDL_CONTROLLER_BUTTON_RIGHTSHOULDER = 10;
public const byte SDL_CONTROLLER_BUTTON_DPAD_UP = 11;
public const byte SDL_CONTROLLER_BUTTON_DPAD_DOWN = 12;
public const byte SDL_CONTROLLER_BUTTON_DPAD_LEFT = 13;
public const byte SDL_CONTROLLER_BUTTON_DPAD_RIGHT = 14;
// SDL_Event is a 56-byte union; we overlay only the sub-structs we care about.
[StructLayout(LayoutKind.Explicit, Size = 56)]
public struct SDL_Event
{
[FieldOffset(0)] public uint type;
[FieldOffset(0)] public SDL_ControllerAxisEvent caxis;
[FieldOffset(0)] public SDL_ControllerButtonEvent cbutton;
[FieldOffset(0)] public SDL_ControllerDeviceEvent cdevice;
}
[StructLayout(LayoutKind.Sequential)]
public struct SDL_ControllerAxisEvent
{
public uint type;
public uint timestamp;
public int which; // joystick instance id
public byte axis;
byte _pad1, _pad2, _pad3;
public short value;
ushort _pad4;
}
[StructLayout(LayoutKind.Sequential)]
public struct SDL_ControllerButtonEvent
{
public uint type;
public uint timestamp;
public int which;
public byte button;
public byte state;
byte _pad1, _pad2;
}
[StructLayout(LayoutKind.Sequential)]
public struct SDL_ControllerDeviceEvent
{
public uint type;
public uint timestamp;
public int which; // joystick index on ADDED; instance id on REMOVED
}
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_Init(uint flags);
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SDL_Quit();
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_PollEvent(out SDL_Event sdlEvent);
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_NumJoysticks();
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
public static extern bool SDL_IsGameController(int joystick_index);
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr SDL_GameControllerOpen(int joystick_index);
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SDL_GameControllerClose(IntPtr gamecontroller);
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr SDL_GameControllerFromInstanceID(int joyid);
}

View file

@ -1,45 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
<ApplicationIcon>LANCommanderDark.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Avalonia" />
<PackageReference Include="Avalonia.Desktop" />
<PackageReference Include="Avalonia.Themes.Fluent" />
<PackageReference Include="Avalonia.Fonts.Inter" />
<PackageReference Include="Avalonia.ReactiveUI" />
<PackageReference Include="Avalonia.Controls.ItemsRepeater" />
<PackageReference Include="Avalonia.Svg.Skia" />
<PackageReference Include="AvaloniaUI.DiagnosticsSupport" />
<PackageReference Include="CommunityToolkit.Mvvm" />
<PackageReference Include="HotAvalonia" PrivateAssets="All" Publish="True" />
<PackageReference Include="ByteSize" />
<PackageReference Include="LiveChartsCore" />
<PackageReference Include="LiveChartsCore.SkiaSharpView" />
<PackageReference Include="LiveChartsCore.SkiaSharpView.Avalonia" />
<PackageReference Include="Microsoft.Extensions.Http" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
<PackageReference Include="Notify.NET" />
<PackageReference Include="PDFtoImage" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LANCommander.Launcher.Services\LANCommander.Launcher.Services.csproj" />
<ProjectReference Include="..\LANCommander.Launcher.Settings\LANCommander.Launcher.Settings.csproj" />
</ItemGroup>
<ItemGroup>
<AvaloniaResource Include="Assets\**" />
<AvaloniaXaml Remove="Theme\ColorPalette.axaml" />
<AvaloniaResource Include="Theme\ColorPalette.axaml" />
<AvaloniaXaml Remove="Theme\LANCommander.axaml" />
<AvaloniaResource Include="Theme\LANCommander.axaml" />
</ItemGroup>
</Project>

View file

@ -1,198 +0,0 @@
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using System;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Avalonia.Controls;
using LANCommander.Launcher.Avalonia.Services;
using LANCommander.Launcher.Avalonia.ViewModels;
using LANCommander.Launcher.Avalonia.Views;
using LANCommander.Launcher.Data;
using LANCommander.Launcher.Services;
using LANCommander.Launcher.Services.Extensions;
using LANCommander.SDK;
using LANCommander.SDK.Extensions;
using LANCommander.SDK.Services;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace LANCommander.Launcher.Avalonia;
class Program
{
// Used to pass the service provider and args into ScriptDebugApp
internal static IServiceProvider? HeadlessServiceProvider;
internal static string[]? HeadlessArgs;
[STAThread]
public static void Main(string[] args)
{
if (args.Any(a => a.Equals("RunScript", StringComparison.OrdinalIgnoreCase)))
{
RunHeadlessAsync(args).GetAwaiter().GetResult();
return;
}
// If a protocol arg like "lancommander://game/{guid}" is present, this
// is a secondary instance spawned by a notification click. Forward the
// navigation request to the already-running instance, then exit.
foreach (var arg in args)
{
var gameId = SingleInstanceService.ParseProtocolArg(arg);
if (gameId.HasValue)
{
SingleInstanceService.TrySendToServer($"navigate-game:{gameId}");
return;
}
}
BuildAvaloniaApp()
#if DEBUG
.WithDeveloperTools()
#endif
.StartWithClassicDesktopLifetime(args);
}
// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.WithInterFont()
.LogToTrace();
static async Task RunHeadlessAsync(string[] args)
{
IConfiguration configuration = new ConfigurationBuilder().ReadFromFile<Settings.Settings>();
var settings = new Settings.Settings();
configuration.Bind(settings);
var services = new ServiceCollection();
services.Configure<Settings.Settings>(configuration);
services.AddLANCommanderClient<Settings.Settings>();
services.AddLANCommanderLauncher();
services.AddSingleton<InstallService>();
services.AddSingleton<SingleInstanceService>();
var serviceProvider = services.BuildServiceProvider();
if (settings.Debug.EnableScriptDebugging)
{
HeadlessServiceProvider = serviceProvider;
HeadlessArgs = args;
AppBuilder.Configure<ScriptDebugApp>()
.UsePlatformDetect()
.WithInterFont()
.LogToTrace()
.StartWithClassicDesktopLifetime(args);
}
else
{
using var scope = serviceProvider.CreateScope();
var connectionClient = scope.ServiceProvider.GetRequiredService<IConnectionClient>();
var commandLineService = scope.ServiceProvider.GetRequiredService<CommandLineService>();
var settingsProvider = scope.ServiceProvider.GetRequiredService<SettingsProvider<Settings.Settings>>();
var databaseContext = scope.ServiceProvider.GetRequiredService<DatabaseContext>();
await connectionClient.ConnectAsync().ConfigureAwait(false);
if (!await connectionClient.PingAsync().ConfigureAwait(false))
await connectionClient.EnableOfflineModeAsync().ConfigureAwait(false);
if (settingsProvider.CurrentValue.Games.InstallDirectories.Length == 0)
{
settingsProvider.Update(static s => s.Games.InstallDirectories = GetOSPlatform() switch
{
var platform when platform == OSPlatform.Windows => [Path.Combine(Path.GetPathRoot(AppContext.BaseDirectory) ?? "C:", "Games")],
var platform when platform == OSPlatform.Linux => [Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Games")],
var platform when platform == OSPlatform.OSX => [Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Games")],
_ => throw new NotSupportedException("Unsupported OS platform")
});
}
await databaseContext.Database.MigrateAsync().ConfigureAwait(false);
await commandLineService.ParseCommandLineAsync(args);
}
}
private static OSPlatform GetOSPlatform()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
return OSPlatform.Windows;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
return OSPlatform.Linux;
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
return OSPlatform.OSX;
throw new NotSupportedException("Unsupported OS platform");
}
}
/// <summary>
/// Minimal Avalonia application used when EnableScriptDebugging is true.
/// Shows only a PowerShellConsoleWindow and runs the requested script inside it.
/// </summary>
internal class ScriptDebugApp : Application
{
public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
desktop.ShutdownMode = ShutdownMode.OnMainWindowClose;
var vm = new PowerShellConsoleViewModel("Script Debugger", string.Empty);
var window = new PowerShellConsoleWindow { DataContext = vm };
vm.CloseAction = () => window.Close();
desktop.MainWindow = window;
window.Show();
_ = RunScriptAsync(window, Program.HeadlessServiceProvider!, Program.HeadlessArgs!);
}
base.OnFrameworkInitializationCompleted();
}
private static async Task RunScriptAsync(
PowerShellConsoleWindow window,
IServiceProvider serviceProvider,
string[] args)
{
try
{
using var scope = serviceProvider.CreateScope();
var connectionClient = scope.ServiceProvider.GetRequiredService<IConnectionClient>();
var commandLineService = scope.ServiceProvider.GetRequiredService<CommandLineService>();
var settingsProvider = scope.ServiceProvider.GetRequiredService<SettingsProvider<Settings.Settings>>();
var databaseContext = scope.ServiceProvider.GetRequiredService<DatabaseContext>();
await connectionClient.ConnectAsync().ConfigureAwait(false);
if (!await connectionClient.PingAsync().ConfigureAwait(false))
await connectionClient.EnableOfflineModeAsync().ConfigureAwait(false);
if (settingsProvider.CurrentValue.Games.InstallDirectories.Length == 0)
{
settingsProvider.Update(static s => s.Games.InstallDirectories = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
? [Path.Combine(Path.GetPathRoot(AppContext.BaseDirectory) ?? "C:", "Games")]
: [Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Games")]);
}
await databaseContext.Database.MigrateAsync().ConfigureAwait(false);
await commandLineService.ParseCommandLineAsync(args).ConfigureAwait(false);
}
catch (Exception ex)
{
window.ConsoleControl.OnOutput(LogLevel.Error, $"Fatal error: {ex.Message}");
}
}
}

View file

@ -1,112 +0,0 @@
using System;
using System.Runtime.InteropServices;
using Microsoft.Extensions.Logging;
namespace LANCommander.Launcher.Avalonia.Services;
public class TaskbarProgressService
{
private readonly ILogger<TaskbarProgressService> _logger;
private ITaskbarList3? _taskbarList;
private IntPtr _hwnd;
public TaskbarProgressService(ILogger<TaskbarProgressService> logger)
{
_logger = logger;
}
public void Initialize(IntPtr hwnd)
{
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) return;
_hwnd = hwnd;
try
{
_taskbarList = (ITaskbarList3)new TaskbarListInstance();
_taskbarList.HrInit();
}
catch (Exception ex)
{
_logger.LogWarning(ex, "Failed to initialize ITaskbarList3");
_taskbarList = null;
}
}
public void SetProgress(float progress)
{
if (_taskbarList == null || _hwnd == IntPtr.Zero) return;
try
{
const ulong total = 100_000;
var completed = (ulong)(progress * total);
_taskbarList.SetProgressState(_hwnd, TBPFLAG.TBPF_NORMAL);
_taskbarList.SetProgressValue(_hwnd, completed, total);
}
catch (Exception ex)
{
_logger.LogWarning(ex, "Failed to set taskbar progress");
}
}
public void SetIndeterminate()
{
if (_taskbarList == null || _hwnd == IntPtr.Zero) return;
try
{
_taskbarList.SetProgressState(_hwnd, TBPFLAG.TBPF_INDETERMINATE);
}
catch (Exception ex)
{
_logger.LogWarning(ex, "Failed to set indeterminate taskbar progress");
}
}
public void ClearProgress()
{
if (_taskbarList == null || _hwnd == IntPtr.Zero) return;
try
{
_taskbarList.SetProgressState(_hwnd, TBPFLAG.TBPF_NOPROGRESS);
}
catch (Exception ex)
{
_logger.LogWarning(ex, "Failed to clear taskbar progress");
}
}
// ── COM interop ──────────────────────────────────────────────────────────
[Flags]
private enum TBPFLAG
{
TBPF_NOPROGRESS = 0x00,
TBPF_INDETERMINATE = 0x01,
TBPF_NORMAL = 0x02,
TBPF_ERROR = 0x04,
TBPF_PAUSED = 0x08,
}
[ComImport]
[Guid("ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
private interface ITaskbarList3
{
void HrInit();
void AddTab(IntPtr hwnd);
void DeleteTab(IntPtr hwnd);
void ActivateTab(IntPtr hwnd);
void SetActiveAlt(IntPtr hwnd);
void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fullscreen);
void SetProgressValue(IntPtr hwnd, ulong completed, ulong total);
void SetProgressState(IntPtr hwnd, TBPFLAG state);
}
[ComImport]
[Guid("56fdf344-fd6d-11d0-958a-006097c9a090")]
[ClassInterface(ClassInterfaceType.None)]
private class TaskbarListInstance { }
}

View file

@ -1,9 +0,0 @@
namespace LANCommander.Launcher.Avalonia.ViewModels.Components;
/// <summary>Represents a single screenshot or video in the game detail media carousel.</summary>
public class GameMediaItemViewModel
{
public string Path { get; set; } = string.Empty;
public bool IsVideo { get; set; }
public string MimeType { get; set; } = string.Empty;
}

View file

@ -1,57 +0,0 @@
using System.Collections.ObjectModel;
using System.Linq;
using CommunityToolkit.Mvvm.ComponentModel;
using LANCommander.SDK.Enums;
namespace LANCommander.Launcher.Avalonia.ViewModels;
public partial class InstallOptionsViewModel : ViewModelBase
{
// ── Install directory ──────────────────────────────────────────────────────
[ObservableProperty]
private ObservableCollection<string> _installDirectories = new();
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(HasMultipleDirectories))]
private string _selectedInstallDirectory = string.Empty;
public bool HasMultipleDirectories => InstallDirectories.Count > 1;
// ── Addons ────────────────────────────────────────────────────────────────
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(HasAddons))]
private ObservableCollection<InstallAddonItemViewModel> _addons = new();
public bool HasAddons => Addons.Count > 0;
// ── Result ────────────────────────────────────────────────────────────────
/// <summary>The addons the user chose to install.</summary>
public SDK.Models.Game[] SelectedAddons =>
Addons.Where(a => a.IsSelected).Select(a => a.Game).ToArray();
}
public partial class InstallAddonItemViewModel : ViewModelBase
{
public SDK.Models.Game Game { get; }
public string Title => Game.Title ?? "Unknown";
public string TypeLabel => Game.Type switch
{
GameType.Expansion => "Expansion",
GameType.Mod => "Mod",
_ => Game.Type.ToString()
};
[ObservableProperty]
private bool _isSelected;
public InstallAddonItemViewModel(SDK.Models.Game game, bool selectedByDefault = false)
{
Game = game;
IsSelected = selectedByDefault;
}
}

View file

@ -1,127 +0,0 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.Input;
using LANCommander.Launcher.Avalonia.ViewModels.Components;
using LANCommander.Launcher.Services;
using LANCommander.SDK.Enums;
using LANCommander.SDK.Services;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace LANCommander.Launcher.Avalonia.ViewModels;
public partial class LibraryViewModel : GamesCollectionViewModel
{
private readonly IServiceProvider _serviceProvider;
private readonly ILogger<LibraryViewModel> _logger;
public override string ViewTitle => "My Library";
public override bool ShowInLibraryFilter => false;
public override bool ShowInstalledFilter => true;
public LibraryViewModel(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
_logger = serviceProvider.GetRequiredService<ILogger<LibraryViewModel>>();
}
public override Task LoadGamesAsync() => LoadLibraryAsync();
[RelayCommand]
private async Task LoadLibraryAsync()
{
IsLoading = true;
HasError = false;
StatusMessage = "Loading library...";
Games.Clear();
_allGames.Clear();
AvailableGenres.Clear();
AvailableTags.Clear();
AvailableDevelopers.Clear();
AvailablePublishers.Clear();
_logger.LogInformation("Loading library (offline: {IsOffline})...", IsOfflineMode);
try
{
using var scope = _serviceProvider.CreateScope();
var libraryService = scope.ServiceProvider.GetRequiredService<LibraryService>();
var mediaService = scope.ServiceProvider.GetRequiredService<MediaService>();
var gameService = scope.ServiceProvider.GetRequiredService<GameService>();
var items = await libraryService.GetItemsAsync();
foreach (var item in items ?? [])
{
if (item.DataItem is not LANCommander.Launcher.Data.Models.Game game)
continue;
string? coverPath = null;
var coverMedia = game.Media?.FirstOrDefault(m => m.Type == MediaType.Cover);
if (coverMedia != null && mediaService.FileExists(coverMedia))
coverPath = mediaService.GetImagePath(coverMedia);
_allGames.Add(new GameItemViewModel(game, coverPath, inLibrary: true, showInLibraryBadge: false));
}
PopulateGenres();
PopulateTags();
PopulateDevelopers();
PopulatePublishers();
ApplyFilters();
_logger.LogInformation("Loaded {Count} library games", _allGames.Count);
}
catch (Exception ex)
{
_logger.LogError(ex, "Failed to load library");
StatusMessage = $"Failed to load library: {ex.Message}";
HasError = true;
}
finally
{
IsLoading = false;
}
}
protected override async Task ViewGameDetailsAsync(GameItemViewModel? gameItem)
{
if (gameItem == null) return;
try
{
using var scope = _serviceProvider.CreateScope();
if (IsOfflineMode)
{
var gameService = scope.ServiceProvider.GetRequiredService<GameService>();
var localGame = await gameService.GetAsync(gameItem.Id);
if (localGame != null)
{
var sdkGame = new SDK.Models.Game
{
Id = localGame.Id,
Title = localGame.Title ?? "Unknown",
SortTitle = localGame.SortTitle,
Description = localGame.Description,
ReleasedOn = localGame.ReleasedOn ?? DateTime.MinValue
};
RaiseGameSelected(sdkGame);
}
}
else
{
var gameClient = scope.ServiceProvider.GetRequiredService<GameClient>();
var game = await gameClient.GetAsync(gameItem.Id);
if (game != null)
RaiseGameSelected(game);
}
}
catch (Exception ex)
{
_logger.LogError(ex, "Failed to fetch game {GameId}", gameItem.Id);
}
}
}

View file

@ -1,105 +0,0 @@
using System;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using LANCommander.Launcher.Services;
using LANCommander.SDK.Providers;
using LANCommander.SDK.Services;
namespace LANCommander.Launcher.Avalonia.ViewModels;
public partial class LoginViewModel : ViewModelBase
{
private readonly IConnectionClient _connectionClient;
private readonly AuthenticationService _authenticationService;
private readonly SettingsProvider<Settings.Settings> _settingsProvider;
[ObservableProperty]
private string _username = string.Empty;
[ObservableProperty]
private string _password = string.Empty;
[ObservableProperty]
private string _statusMessage = string.Empty;
[ObservableProperty]
private bool _isLoading;
[ObservableProperty]
private bool _hasError;
[ObservableProperty]
private string _serverAddress = string.Empty;
[ObservableProperty]
private bool _isServerOffline;
public event EventHandler? LoginSucceeded;
public event EventHandler? ChangeServerRequested;
public LoginViewModel(
IConnectionClient connectionClient,
AuthenticationService authenticationService,
SettingsProvider<Settings.Settings> settingsProvider)
{
_connectionClient = connectionClient;
_authenticationService = authenticationService;
_settingsProvider = settingsProvider;
ServerAddress = _connectionClient.GetServerAddress()?.ToString() ?? "Not connected";
}
[RelayCommand]
private async Task LoginAsync()
{
if (IsServerOffline)
{
StatusMessage = "Server is offline. Please try again later or change server.";
HasError = true;
return;
}
if (string.IsNullOrWhiteSpace(Username) || string.IsNullOrWhiteSpace(Password))
{
StatusMessage = "Please enter username and password";
HasError = true;
return;
}
IsLoading = true;
HasError = false;
StatusMessage = "Logging in...";
try
{
var serverAddress = _connectionClient.GetServerAddress();
if (serverAddress == null)
{
StatusMessage = "No server configured";
HasError = true;
return;
}
await _authenticationService.Login(serverAddress, Username, Password);
StatusMessage = "Login successful!";
LoginSucceeded?.Invoke(this, EventArgs.Empty);
}
catch (Exception ex)
{
StatusMessage = $"Login failed: {ex.Message}";
HasError = true;
}
finally
{
IsLoading = false;
}
}
[RelayCommand]
private void ChangeServer()
{
ChangeServerRequested?.Invoke(this, EventArgs.Empty);
}
}

View file

@ -1,76 +0,0 @@
using System;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using LANCommander.SDK.Providers;
using LANCommander.SDK.Services;
namespace LANCommander.Launcher.Avalonia.ViewModels;
public partial class ServerSelectionViewModel : ViewModelBase
{
private readonly IConnectionClient _connectionClient;
private readonly SettingsProvider<Settings.Settings> _settingsProvider;
[ObservableProperty]
private string _serverAddress = string.Empty;
[ObservableProperty]
private string _statusMessage = string.Empty;
[ObservableProperty]
private bool _isLoading;
[ObservableProperty]
private bool _hasError;
public event EventHandler? ServerConnected;
public ServerSelectionViewModel(
IConnectionClient connectionClient,
SettingsProvider<Settings.Settings> settingsProvider)
{
_connectionClient = connectionClient;
_settingsProvider = settingsProvider;
// Load saved server address if available
if (_settingsProvider.CurrentValue.Authentication?.ServerAddress != null)
ServerAddress = _settingsProvider.CurrentValue.Authentication.ServerAddress.ToString();
}
[RelayCommand]
private async Task ConnectAsync()
{
if (string.IsNullOrWhiteSpace(ServerAddress))
{
StatusMessage = "Please enter a server address";
HasError = true;
return;
}
IsLoading = true;
HasError = false;
StatusMessage = "Testing connection...";
try
{
// UpdateServerAddressAsync discovers and validates the server internally
// (pings candidate URIs). If it returns without throwing, the server is reachable.
await _connectionClient.UpdateServerAddressAsync(ServerAddress);
ServerAddress = _connectionClient.GetServerAddress().ToString();
StatusMessage = "Connected!";
ServerConnected?.Invoke(this, EventArgs.Empty);
}
catch (Exception ex)
{
StatusMessage = $"Connection failed: {ex.Message}";
HasError = true;
}
finally
{
IsLoading = false;
}
}
}

View file

@ -1,7 +0,0 @@
using CommunityToolkit.Mvvm.ComponentModel;
namespace LANCommander.Launcher.Avalonia.ViewModels;
public abstract partial class ViewModelBase : ObservableObject
{
}

View file

@ -1,174 +0,0 @@
using System;
using System.IO;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Media.Imaging;
using Avalonia.Threading;
using LANCommander.Launcher.Avalonia.Converters;
namespace LANCommander.Launcher.Avalonia.Views.Components;
public partial class Cover : UserControl
{
private static readonly HttpClient _httpClient = new();
public static readonly StyledProperty<string?> SourceProperty =
AvaloniaProperty.Register<Cover, string?>(nameof(Source));
public static readonly StyledProperty<string?> TitleProperty =
AvaloniaProperty.Register<Cover, string?>(nameof(Title));
public static readonly StyledProperty<object?> OverlayProperty =
AvaloniaProperty.Register<Cover, object?>(nameof(Overlay));
public static readonly DirectProperty<Cover, bool> HasCoverProperty =
AvaloniaProperty.RegisterDirect<Cover, bool>(nameof(HasCover), o => o.HasCover);
public static readonly DirectProperty<Cover, double> FallbackFontSizeProperty =
AvaloniaProperty.RegisterDirect<Cover, double>(nameof(FallbackFontSize), o => o.FallbackFontSize);
private bool _hasCover;
private double _fallbackFontSize = 12;
private CancellationTokenSource? _loadCts;
public string? Source
{
get => GetValue(SourceProperty);
set => SetValue(SourceProperty, value);
}
public string? Title
{
get => GetValue(TitleProperty);
set => SetValue(TitleProperty, value);
}
/// <summary>
/// Content rendered on top of the cover image (e.g. badges, labels).
/// </summary>
public object? Overlay
{
get => GetValue(OverlayProperty);
set => SetValue(OverlayProperty, value);
}
public bool HasCover
{
get => _hasCover;
private set => SetAndRaise(HasCoverProperty, ref _hasCover, value);
}
public double FallbackFontSize
{
get => _fallbackFontSize;
private set => SetAndRaise(FallbackFontSizeProperty, ref _fallbackFontSize, value);
}
public Cover()
{
InitializeComponent();
}
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
{
base.OnPropertyChanged(change);
if (change.Property == SourceProperty)
{
LoadImage(change.GetNewValue<string?>());
}
}
protected override Size MeasureOverride(Size availableSize)
{
if (!HasCover && !double.IsInfinity(availableSize.Width))
{
var constrained = new Size(availableSize.Width, availableSize.Width * 1.5);
base.MeasureOverride(constrained);
return constrained;
}
return base.MeasureOverride(availableSize);
}
protected override Size ArrangeOverride(Size finalSize)
{
var result = base.ArrangeOverride(finalSize);
UpdateFallbackFontSize(result);
return result;
}
private void UpdateFallbackFontSize(Size size)
{
var minDimension = Math.Min(size.Width, size.Height);
FallbackFontSize = Math.Max(8, minDimension * 0.09);
}
private void LoadImage(string? source)
{
_loadCts?.Cancel();
_loadCts?.Dispose();
_loadCts = null;
if (string.IsNullOrEmpty(source))
{
SetBitmap(null);
return;
}
if (Uri.TryCreate(source, UriKind.Absolute, out var uri) &&
(uri.Scheme == "http" || uri.Scheme == "https"))
{
var cts = new CancellationTokenSource();
_loadCts = cts;
_ = LoadRemoteImageAsync(uri, cts.Token);
}
else
{
LoadLocalImage(source);
}
}
private void LoadLocalImage(string path)
{
var bitmap = FilePathToBitmapConverter.Instance.Convert(
path, typeof(Bitmap), null, System.Globalization.CultureInfo.InvariantCulture) as Bitmap;
SetBitmap(bitmap);
}
private async Task LoadRemoteImageAsync(Uri uri, CancellationToken ct)
{
try
{
var data = await _httpClient.GetByteArrayAsync(uri, ct);
if (ct.IsCancellationRequested) return;
using var stream = new MemoryStream(data);
var bitmap = Bitmap.DecodeToWidth(stream, 320, BitmapInterpolationMode.HighQuality);
if (ct.IsCancellationRequested)
{
bitmap.Dispose();
return;
}
await Dispatcher.UIThread.InvokeAsync(() => SetBitmap(bitmap));
}
catch
{
if (!ct.IsCancellationRequested)
await Dispatcher.UIThread.InvokeAsync(() => SetBitmap(null));
}
}
private void SetBitmap(Bitmap? bitmap)
{
HasCover = bitmap != null;
if (CoverImage != null)
CoverImage.Source = bitmap;
}
}

View file

@ -1,44 +0,0 @@
using System.Windows.Input;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
namespace LANCommander.Launcher.Avalonia.Views.Components;
public partial class CoverButton : UserControl
{
public static readonly StyledProperty<ICommand?> CommandProperty =
AvaloniaProperty.Register<CoverButton, ICommand?>(nameof(Command));
public static readonly StyledProperty<object?> CommandParameterProperty =
AvaloniaProperty.Register<CoverButton, object?>(nameof(CommandParameter));
public ICommand? Command
{
get => GetValue(CommandProperty);
set => SetValue(CommandProperty, value);
}
public object? CommandParameter
{
get => GetValue(CommandParameterProperty);
set => SetValue(CommandParameterProperty, value);
}
public CoverButton()
{
InitializeComponent();
}
protected override void OnPointerEntered(PointerEventArgs e)
{
base.OnPointerEntered(e);
ZIndex = 100;
}
protected override void OnPointerExited(PointerEventArgs e)
{
base.OnPointerExited(e);
ZIndex = 0;
}
}

View file

@ -1,61 +0,0 @@
using System;
using System.Collections.Specialized;
using Avalonia.Controls;
using Avalonia.Threading;
using LANCommander.Launcher.Avalonia.ViewModels.Components;
namespace LANCommander.Launcher.Avalonia.Views.Components;
public partial class GameActionBarView : UserControl
{
private GameActionBarViewModel? _vm;
private int _injectedItemCount;
public GameActionBarView()
{
InitializeComponent();
DataContextChanged += OnDataContextChanged;
}
private MenuFlyout? PlayFlyout => PlaySplitButton.Flyout as MenuFlyout;
private void OnDataContextChanged(object? sender, EventArgs e)
{
if (_vm != null)
_vm.SecondaryActions.CollectionChanged -= OnSecondaryActionsChanged;
_vm = DataContext as GameActionBarViewModel;
if (_vm != null)
_vm.SecondaryActions.CollectionChanged += OnSecondaryActionsChanged;
RefreshSecondaryItems();
}
private void OnSecondaryActionsChanged(object? sender, NotifyCollectionChangedEventArgs e)
=> Dispatcher.UIThread.Post(RefreshSecondaryItems);
private void RefreshSecondaryItems()
{
var flyout = PlayFlyout;
if (flyout is null || _vm is null) return;
// Remove previously injected items (always at the front of the flyout)
for (var i = 0; i < _injectedItemCount; i++)
flyout.Items.RemoveAt(0);
_injectedItemCount = 0;
if (_vm.SecondaryActions.Count == 0) return;
var idx = 0;
foreach (var action in _vm.SecondaryActions)
{
flyout.Items.Insert(idx++, new MenuItem { Header = action.Name, Command = action.RunCommand });
_injectedItemCount++;
}
// Separator between secondary actions and static items
flyout.Items.Insert(idx, new Separator());
_injectedItemCount++;
}
}

View file

@ -1,11 +0,0 @@
using Avalonia.Controls;
namespace LANCommander.Launcher.Avalonia.Views;
public partial class GameDetailView : UserControl
{
public GameDetailView()
{
InitializeComponent();
}
}

View file

@ -1,19 +0,0 @@
using Avalonia.Controls;
using Avalonia.Input;
using LANCommander.Launcher.Avalonia.ViewModels;
namespace LANCommander.Launcher.Avalonia.Views;
public partial class GamesRowView : UserControl
{
public GamesRowView()
{
InitializeComponent();
}
private void OnGameTapped(object? sender, TappedEventArgs e)
{
if (DataContext is GamesCollectionViewModel vm && vm.SelectedGame is not null)
vm.ViewGameDetailsCommand.Execute(vm.SelectedGame);
}
}

View file

@ -1,105 +0,0 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LANCommander.Launcher.Avalonia.ViewModels"
x:Class="LANCommander.Launcher.Avalonia.Views.InstallOptionsOverlay"
x:DataType="vm:InstallOptionsViewModel">
<!-- Full-window dim backdrop -->
<Grid Background="#AA000000">
<!-- Centered card -->
<Border Background="{DynamicResource SystemControlBackgroundChromeMediumBrush}"
Width="460"
MaxHeight="600"
HorizontalAlignment="Center"
VerticalAlignment="Center"
BoxShadow="0 8 40 8 #88000000">
<StackPanel Spacing="0">
<!-- ── Install directory ──────────────────────────────────── -->
<Border IsVisible="{Binding HasMultipleDirectories}"
Padding="20,16,20,0">
<StackPanel Spacing="8">
<TextBlock Text="Install Location"
FontSize="13" FontWeight="SemiBold" />
<ComboBox ItemsSource="{Binding InstallDirectories}"
SelectedItem="{Binding SelectedInstallDirectory}"
HorizontalAlignment="Stretch" />
</StackPanel>
</Border>
<!-- ── Addons ─────────────────────────────────────────────── -->
<Border IsVisible="{Binding HasAddons}"
Padding="20,16,20,0">
<StackPanel Spacing="8">
<DockPanel>
<Button DockPanel.Dock="Right"
Content="None"
Background="Transparent"
Padding="8,2"
FontSize="12"
Click="DeselectAllAddons_Click" />
<Button DockPanel.Dock="Right"
Content="All"
Background="Transparent"
Padding="8,2"
FontSize="12"
Margin="0,0,4,0"
Click="SelectAllAddons_Click" />
<TextBlock Text="Optional Add-ons"
FontSize="13" FontWeight="SemiBold"
VerticalAlignment="Center" />
</DockPanel>
<ScrollViewer MaxHeight="280"
HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto">
<ItemsControl ItemsSource="{Binding Addons}">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="vm:InstallAddonItemViewModel">
<Border Padding="10,8"
Margin="0,0,0,3"
Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}">
<DockPanel>
<CheckBox DockPanel.Dock="Left"
IsChecked="{Binding IsSelected}"
VerticalAlignment="Center"
Margin="0,0,10,0" />
<TextBlock DockPanel.Dock="Right"
Text="{Binding TypeLabel}"
FontSize="11"
Opacity="0.55"
VerticalAlignment="Center" />
<TextBlock Text="{Binding Title}"
FontSize="13"
VerticalAlignment="Center"
TextTrimming="CharacterEllipsis" />
</DockPanel>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</StackPanel>
</Border>
<!-- ── Buttons ────────────────────────────────────────────── -->
<Border Padding="20,16">
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Right"
Spacing="8">
<Button Content="Cancel"
Width="90"
Click="Cancel_Click" />
<Button Content="Install"
Width="90"
Classes="Primary"
Click="Confirm_Click" />
</StackPanel>
</Border>
</StackPanel>
</Border>
</Grid>
</UserControl>

View file

@ -1,41 +0,0 @@
using System;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Interactivity;
using LANCommander.Launcher.Avalonia.ViewModels;
namespace LANCommander.Launcher.Avalonia.Views;
public partial class InstallOptionsOverlay : UserControl
{
public event EventHandler<bool?>? DialogClosed;
public InstallOptionsOverlay()
{
InitializeComponent();
}
private void Confirm_Click(object? sender, RoutedEventArgs e) => Close(true);
private void Cancel_Click(object? sender, RoutedEventArgs e) => Close(false);
private void Close(bool? result)
{
var layer = OverlayLayer.GetOverlayLayer(this);
DialogClosed?.Invoke(this, result);
layer?.Children.Remove(this);
}
private void SelectAllAddons_Click(object? sender, RoutedEventArgs e)
{
if (DataContext is InstallOptionsViewModel vm)
foreach (var addon in vm.Addons)
addon.IsSelected = true;
}
private void DeselectAllAddons_Click(object? sender, RoutedEventArgs e)
{
if (DataContext is InstallOptionsViewModel vm)
foreach (var addon in vm.Addons)
addon.IsSelected = false;
}
}

View file

@ -1,122 +0,0 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LANCommander.Launcher.Avalonia.ViewModels"
xmlns:svg="using:Avalonia.Svg.Skia"
x:Class="LANCommander.Launcher.Avalonia.Views.LoginView"
x:DataType="vm:LoginViewModel">
<Grid>
<!-- Background image (set from code-behind) -->
<Image x:Name="BackgroundImage" Stretch="UniformToFill" />
<!-- Dark overlay for readability -->
<Border Background="#AA000000" />
<!-- Login panel -->
<Border Padding="40" VerticalAlignment="Center" HorizontalAlignment="Center">
<StackPanel Spacing="20" Width="400" VerticalAlignment="Center">
<svg:Svg Path="/Assets/logo.svg"
Width="350"
HorizontalAlignment="Center" />
<Grid x:Name="ServerAddress">
<Grid.Styles>
<!-- When NOT hovered -->
<Style Selector="Grid#ServerAddress Border#TextView">
<Setter Property="Opacity" Value="1"/>
</Style>
<Style Selector="Grid#ServerAddress Border#ButtonView">
<Setter Property="Opacity" Value="0"/>
</Style>
<!-- When hovered -->
<Style Selector="Grid#ServerAddress:pointerover Border#TextView">
<Setter Property="Opacity" Value="0"/>
</Style>
<Style Selector="Grid#ServerAddress:pointerover Border#ButtonView">
<Setter Property="Opacity" Value="1"/>
</Style>
</Grid.Styles>
<!-- Text -->
<Border x:Name="TextView">
<Border.Transitions>
<Transitions>
<DoubleTransition Property="Opacity" Duration="0:0:0.1"/>
</Transitions>
</Border.Transitions>
<TextBlock Text="{Binding ServerAddress}"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<!-- Button -->
<Border x:Name="ButtonView">
<Border.Transitions>
<Transitions>
<DoubleTransition Property="Opacity" Duration="0:0:0.1"/>
</Transitions>
</Border.Transitions>
<Button Content="Change"
Classes="Glass"
Command="{Binding ChangeServerCommand}"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
</Grid>
<StackPanel Spacing="8">
<TextBlock Text="Username" FontWeight="SemiBold" Foreground="White" />
<TextBox x:Name="UsernameTextBox"
Watermark="Enter your username"
Classes="Glass"
Text="{Binding Username}"
IsEnabled="{Binding !IsLoading}">
<TextBox.KeyBindings>
<KeyBinding Gesture="Return" Command="{Binding LoginCommand}" />
</TextBox.KeyBindings>
</TextBox>
</StackPanel>
<StackPanel Spacing="8">
<TextBlock Text="Password" FontWeight="SemiBold" Foreground="White" />
<TextBox Watermark="Enter your password"
Classes="Glass"
PasswordChar="•"
Text="{Binding Password}"
IsEnabled="{Binding !IsLoading}">
<TextBox.KeyBindings>
<KeyBinding Gesture="Return" Command="{Binding LoginCommand}" />
</TextBox.KeyBindings>
</TextBox>
</StackPanel>
<Button Command="{Binding LoginCommand}"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Center"
Classes="Primary Large"
IsVisible="{Binding !IsLoading}"
IsEnabled="{Binding !IsLoading}">
<Panel>
<TextBlock Text="Sign In" />
</Panel>
</Button>
<StackPanel HorizontalAlignment="Center" Spacing="12" IsVisible="{Binding IsLoading}">
<ProgressBar IsIndeterminate="True"
Width="200"
Height="4" />
<TextBlock Text="{Binding StatusMessage}"
Foreground="White"
Opacity="0.75"
FontSize="12"
HorizontalAlignment="Center" />
</StackPanel>
</StackPanel>
</Border>
</Grid>
</UserControl>

View file

@ -1,38 +0,0 @@
using System;
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Media.Imaging;
using Avalonia.Platform;
namespace LANCommander.Launcher.Avalonia.Views;
public partial class LoginView : UserControl
{
private static readonly string[] Backgrounds =
{
"avares://LANCommander.Launcher.Avalonia/Assets/backgrounds/aoe2.jpg",
"avares://LANCommander.Launcher.Avalonia/Assets/backgrounds/ns2.jpg",
"avares://LANCommander.Launcher.Avalonia/Assets/backgrounds/css.jpg",
"avares://LANCommander.Launcher.Avalonia/Assets/backgrounds/bfme2.jpg",
"avares://LANCommander.Launcher.Avalonia/Assets/backgrounds/soldat2.jpg",
"avares://LANCommander.Launcher.Avalonia/Assets/backgrounds/ut2004.jpg",
};
public LoginView()
{
InitializeComponent();
Loaded += OnLoaded;
}
private void OnLoaded(object? sender, RoutedEventArgs e)
{
try
{
var uri = new Uri(Backgrounds[Random.Shared.Next(Backgrounds.Length)]);
BackgroundImage.Source = new Bitmap(AssetLoader.Open(uri));
}
catch { /* silently ignore missing assets */ }
UsernameTextBox.Focus();
}
}

View file

@ -1,63 +0,0 @@
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;
namespace LANCommander.Launcher.Avalonia.Views;
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void ResizeGrip_PointerPressed(object? sender, PointerPressedEventArgs e)
{
if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) return;
if (WindowState != WindowState.Normal) return;
if (sender is not Border { Name: var name }) return;
var edge = name switch
{
"ResizeNW" => WindowEdge.NorthWest,
"ResizeN" => WindowEdge.North,
"ResizeNE" => WindowEdge.NorthEast,
"ResizeW" => WindowEdge.West,
"ResizeE" => WindowEdge.East,
"ResizeSW" => WindowEdge.SouthWest,
"ResizeS" => WindowEdge.South,
"ResizeSE" => WindowEdge.SouthEast,
_ => (WindowEdge?)null
};
if (edge.HasValue) BeginResizeDrag(edge.Value, e);
}
private void TitleBarDragRegion_PointerPressed(object? sender, PointerPressedEventArgs e)
{
if (e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
BeginMoveDrag(e);
}
private void TitleBarDragRegion_DoubleTapped(object? sender, TappedEventArgs e)
{
WindowState = WindowState == WindowState.Maximized
? WindowState.Normal
: WindowState.Maximized;
}
private void MinimizeButton_Click(object? sender, RoutedEventArgs e)
{
WindowState = WindowState.Minimized;
}
private void MaximizeButton_Click(object? sender, RoutedEventArgs e)
{
WindowState = WindowState == WindowState.Maximized
? WindowState.Normal
: WindowState.Maximized;
}
private void CloseButton_Click(object? sender, RoutedEventArgs e)
{
Close();
}
}

View file

@ -1,38 +0,0 @@
using System;
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Media.Imaging;
using Avalonia.Platform;
namespace LANCommander.Launcher.Avalonia.Views;
public partial class ServerSelectionView : UserControl
{
private static readonly string[] Backgrounds =
{
"avares://LANCommander.Launcher.Avalonia/Assets/backgrounds/aoe2.jpg",
"avares://LANCommander.Launcher.Avalonia/Assets/backgrounds/ns2.jpg",
"avares://LANCommander.Launcher.Avalonia/Assets/backgrounds/css.jpg",
"avares://LANCommander.Launcher.Avalonia/Assets/backgrounds/bfme2.jpg",
"avares://LANCommander.Launcher.Avalonia/Assets/backgrounds/soldat2.jpg",
"avares://LANCommander.Launcher.Avalonia/Assets/backgrounds/ut2004.jpg",
};
public ServerSelectionView()
{
InitializeComponent();
Loaded += OnLoaded;
}
private void OnLoaded(object? sender, RoutedEventArgs e)
{
try
{
var uri = new Uri(Backgrounds[Random.Shared.Next(Backgrounds.Length)]);
BackgroundImage.Source = new Bitmap(AssetLoader.Open(uri));
}
catch { /* silently ignore missing assets */ }
ServerAddressTextBox.Focus();
}
}

Some files were not shown because too many files have changed in this diff Show more