Commit graph

72 commits

Author SHA1 Message Date
Pat Hartl
217fcfa0b6 Merge branch 'main' into release/2.2.0
# Conflicts:
#	LANCommander.Server.Services/ActionService.cs
#	LANCommander.Server.Services/SavePathService.cs
2026-07-22 17:13:51 -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
f538ae4c81 Handle version mismatching 2026-07-07 01:50:25 -05:00
Pat Hartl
0dc76c51b8 Replace Automapper with Mapperly 2026-07-02 18:09:14 -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
90d04d1e5e Fix silent errors thrown on upload, fix SDK chunk uploading 2026-06-03 19:28:27 -05:00
Pat Hartl
0ef795ac3d Fix write all scripts 2026-05-23 22:13:23 -05:00
Pat Hartl
e5a8d39bf3 Replace INI parsing 2026-05-16 18:14:41 -05:00
Pat Hartl
4f3b3efb96 Normalize file paths when writing text files 2026-03-27 19:00:03 -04:00
Pat Hartl
46ba19558f Fix display resolution variable injection for Linux 2026-03-27 18:59:44 -04:00
Aaron Powell
f8bc4edd18 Fix auth token race condition causing NullReferenceException after login
ApiRequestBuilder.UseAuthenticationToken() was reading the token eagerly
at construction time (line 22 initializer). After login, configRefresher.RefreshAsync()
calls OnReload() which invalidates the IOptionsMonitor cache. The next
CurrentValue access creates a new Settings from the YAML file, which hasn't
been persisted yet (1-second debounce), so the token is null.

Fix: read the token lazily from tokenProvider at the point of use instead
of capturing it at construction time. Remove the now-unused _token field.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-21 15:09:55 +11:00
Pat Hartl
2d27c2db65 Fix saving script actual contents 2026-03-11 20:12:09 -05:00
Pat Hartl
da0d1d6d7a Replace custom admin directive with PowerShell standard directive 2026-03-10 18:15:35 -05:00
Pat Hartl
46bbf85093 First pass of adding tool installation to launcher 2026-02-10 18:04:49 -06:00
Pat Hartl
120e14d40c Add Tools section to server app
Allows users to upload additional tools and tie them to games. This can be useful for software like map editors, trainers, etc.
2026-02-08 02:24:53 -06:00
Pat Hartl
397919ff0a Don't move user data if running in container with unmounted volume 2025-12-16 19:35:21 -06:00
Pat Hartl
a8ffbb601b Safely move contents to new data directory 2025-12-16 00:55:15 -06:00
Pat Hartl
b93c0f6732
Merge pull request #374 from LANCommander/development
Refactored Importing / Legacy Game Importing
2025-12-05 14:40:12 -06:00
Pat Hartl
414f728181 Inherit IKeyedModel, restrict ManifestHelper.Write to only manifests 2025-12-04 23:43:25 -06:00
Aaron Powell
d0f6782d3e Adding a file name when uploading
The file name is ignored by the server, but if you don't add one, you can't attach a file to the form
2025-12-04 13:35:27 +11:00
Aaron Powell
eb4adabb35 Adding some resiliance to the download queue 2025-12-01 22:40:47 +11:00
Pat Hartl
a281ef473e Fix script debugging in launcher, fix cmdlet registration 2025-11-26 22:38:04 -06:00
Pat Hartl
ffa8ba2399 Add cmdlet to patch GameSpy games 2025-11-26 18:45:19 -06:00
Pat Hartl
edc3e706d1 Check if the game archive can stream before trying to download 2025-11-20 22:05:02 -06:00
Pat Hartl
17c45d9821 Fix token secret not loading from config 2025-11-20 01:21:23 -06:00
Pat Hartl
256b46e823 Fix storage of authentication token 2025-11-19 00:36:03 -06:00
Pat Hartl
d25003481c Avoid exception stream progress update 2025-10-26 17:05:24 -05:00
Pat Hartl
c4217d7b41 Refactor HTTP streaming
Greatly reduces the amount of memory usage when streaming from the server by:
1. Shedding use of an internal MemoryStream
2. Using HttpCompletionOption.ResponseHeadersRead to start reading the stream without loading all of the HttpContent into memory
2025-10-09 02:16:20 -05:00
Pat Hartl
4968481460 Standardize YAML serializers 2025-10-06 19:23:49 -05:00
Pat Hartl
0466fd38bd Use SettingsProvider 2025-10-02 20:07:44 -05:00
Pat Hartl
ab73e9c4e0 Rework SettingsProvider 2025-10-02 19:41:47 -05:00
Pat Hartl
4cbf672bb1 Fix auth, API response deserialization 2025-10-01 18:45:30 -05:00
Pat Hartl
5cab1f3618 Remove old SettingsService, replace with Options pattern 2025-09-29 19:49:09 -05:00
Pat Hartl
7f99fb481c Use Options pattern, 2025-09-26 00:51:02 -05:00
Pat Hartl
d875377f15 Rename SDK services -> clients, implement new configuration, use dependency injection for clients 2025-09-24 20:58:23 -05:00
Pat Hartl
a648852292 Implement SDK using dependency injection
- API requests are now made through the ApiRequestBuilder with DI supplied via the ApiRequestFactory singleton
- Reliance on RestSharp and WebClient has been removed in favor of HttpClient
- Auth token is now being tracked by the ITokenProvider
- Network information (MAC address, broadcast addresses, IP address) is now supplied with the INetworkInformationProvider singleton
- Connection state is now being maintained by the ConnectionService, with a reliance on RPC (SignalR websocket) reporting actual connection state without relying on pings
- All download streams are now provided as a TrackableStream
- Singleton Client class has been removed. All usage of the SDK should happen via Dependency Injection

This is just a base, non-functional refactor of the SDK to use DI. The following changes to the rest of the codebase need to be made:
- Usage of the SDK client in the launcher needs to be replaced in favor of injecting SDK services
- PowerShell cmdlets need to be able to have services injected. Most likely a separate scope will have to be opened up per PS runtime?
- Usage of the SDK client in the server needs to be replaced in favor of injecting SDK services. This should be minimal and should actually provide benefit when it comes to executing client-like features (scripts mostly) without needing a fully configured client that maintains connection state.
- Configuration of the client needs to be implemented using ILANCommanderConfiguration
2025-09-22 00:29:51 -05:00
Pat Hartl
640f476986
Merge pull request #291 from RattleSN4K3/feature/LibraryGameModifySelective
Library changes to addon installation
2025-08-03 14:03:12 -05:00
Pat Hartl
a5dab5c094 Merge branch 'main' into refactor/optional-import-export
# Conflicts:
#	LANCommander.Server.Services/GameService.cs
#	LANCommander.Server.Services/ImportService.cs
#	LANCommander.Server.Services/Importers/GameImporter.cs
#	LANCommander.Server.Services/UserService.cs
#	LANCommander.Server/UI/Components/AvatarUploader.razor
#	LANCommander.Server/UI/Components/ImportUploadDialog.razor
2025-07-25 18:42:39 -05:00
RattleSN4K3
7cea3df3b4 Update local manifest and scripts of base game on modifying installation 2025-05-27 23:15:07 +02:00
RattleSN4K3
39fea675b7 Utilizing MadMilkman.INI for ini parsing handling multi-value section entries (+ Update-IniValue parameter) 2025-05-13 02:36:37 +02:00
Pat Hartl
d75095aa64 Simplify importer DI, start laying out import dialog 2025-04-10 19:45:41 -05:00
Pat Hartl
d38432f675 Add server scripts to execute on game start/stop, refactor how play sessions are recorded 2025-02-23 15:39:06 -06:00
Pat Hartl
f3708b4f3c Refactor redistributable installation
- Install now extracts the redistributable archive to the game's `.lancommander` directory, under a directory matching the redist's ID
- Scripts are downloaded and saved to the same location
- BeforeStart, AfterStop, and NameChange scripts are now available for redistributables
- Change manifest reading/writing to use async
2025-01-30 23:57:12 -06:00
Pat Hartl
3c022b7044 Track running executable and all spawned children
Implements #106

There's a bit of work to be done on the cancellation. It seems that it takes an awful long time to kill all of the processes. The actual tracking works though. I was able to verify the functionality by launching Red Faction using Dash Faction.
2024-10-29 01:27:51 -05:00
Pat Hartl
781b77f930 Move SDK services to separate namespace 2024-10-04 23:39:07 -05:00
Pat Hartl
e3b238e3f0 Refactor game launching
Changes to game launching:
- Games can now be launched using the SDK
- Games can be stopped by the SDK
- Running games are tracked by the SDK
- Game state in play buttons are now tracked by polling SDK game service
- Library service no longer controls any launching/stopping/tracking
- Actions now are keyed in the manifest
- Game launching occurs in a GameExecutionContext
- Game launching variables have been consolidated
2024-08-26 20:18:54 -05:00
Pat Hartl
29047a4f12 Merge branch 'main' into v1.0.0
# Conflicts:
#	LANCommander.Launcher.Models/LibraryItem.cs
#	LANCommander.SDK/Client.cs
2024-08-10 12:11:04 -05:00
Pat Hartl
c1e9db798e Fix display grabbing 2024-08-08 20:00:21 -05:00
Pat Hartl
d5d3c0b9c6 Fix app crashing if installed game's files are removed 2024-08-08 18:28:33 -05:00