Commit graph

45 commits

Author SHA1 Message Date
Pat Hartl
e6c12b4809 Refactor script debugging
Instead of providing delegates to a ScriptClient singleton, script execution now relies on dependency injection for debugging. This can be handled by registering an implementation of IScriptDebugger. Multiple script debuggers are supported. These changes required the creation of a PowerShellScriptFactory to handle DI of the service provider to the script.

In the case of LANCommander, "debugging" scripts really just gives an opportunity for the application to break after a script's execution and provide a poor-man's pty. This could be expanded upon in the future to hook directly into PowerShell's debugging functionality, but would require a substantial refactor to script execution.
2025-11-26 01:09:52 -06:00
Pat Hartl
88686383db Unwrap settings config builder extensions 2025-11-19 19:52:36 -06:00
Pat Hartl
b0025daea0 Prefer IOptions, fix setting duplication bug 2025-11-17 18:01:53 -06:00
Pat Hartl
ede0e814a5 Change how windows are created. Refactor SignalR client to be named subscriber. Call ChatClient static methods on response from SignalR chat client. Fix dependency loop with chat. 2025-10-25 22:00:50 -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
36761bede7 Fix configuration getting wiped on start 2025-10-08 20:45:57 -05:00
Pat Hartl
41f9191745 Register server configuration source refresher 2025-10-08 19:53:05 -05:00
Pat Hartl
cf73dca217 Increase debug logging 2025-10-08 19:51:44 -05:00
Pat Hartl
3783dac472 Reload config on change 2025-10-06 19:24:18 -05:00
Pat Hartl
ab73e9c4e0 Rework SettingsProvider 2025-10-02 19:41:47 -05:00
Pat Hartl
5cab1f3618 Remove old SettingsService, replace with Options pattern 2025-09-29 19:49:09 -05:00
Pat Hartl
aaf65fcf09 Runnable launcher using new client 2025-09-27 16:39:54 -05:00
Pat Hartl
9050722890 Grab settings via authenticated API 2025-09-26 00:51:25 -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
17e45ba75a Add method to safely join path parts onto a URI 2025-09-04 19:46:41 -05:00
Pat Hartl
188926e37b Add new RPC hub, migrate existing SignalR messaging to strongly typed RPC, add chat data migrations 2025-08-28 19:57:23 -05:00
Pat Hartl
8d813bde05 Fix depot items not loading under some circumstances 2025-08-07 02:26:31 -05:00
Pat Hartl
ace43fa09e Revert "Merge branch 'feature/server-process-resource-monitoring'"
This reverts commit 8be2341305, reversing
changes made to cf0fe7c1b6.
2025-07-30 19:29:18 -05:00
Pat Hartl
8be2341305 Merge branch 'feature/server-process-resource-monitoring' 2025-07-30 19:27:38 -05:00
RattleSN4K3
bf1c16f8ff Fix connecting to hostname:port Uri (adds UriExtensions.CreateUri and .TryCreateUri 2025-06-17 00:41:19 +02:00
Pat Hartl
cddf67a613 Resource stats component, better tracking of child processes, fix serialization bugs 2025-06-14 15:33:10 -05:00
RattleSN4K3
73ff5f258a Remove-game-library dialog to remove base game + addons 2025-05-25 22:25:17 +02:00
Pat Hartl
cbc93ca852 Strip end period from file names
Fixes #239
2025-05-04 16:10:32 -05:00
Pat Hartl
041a0069ee Add DiscoveryBeacon, DiscoveryProbe, new beacon message
Adds a discovery beacon and probe to the client and removes BeaconService from the server.
2025-04-23 21:23:33 -05:00
Pat Hartl
885b1b8029 Unit tests for suggested URIs 2025-03-10 23:18:08 -05:00
Pat Hartl
dafd0e31ff Try fallback URIs if server is unreachable, enhance ping
Fixes #208
2025-03-10 21:44:51 -05:00
Pat Hartl
8cda5cad7c Add missing extension
Some checks failed
Publish SDK NuGet Package / publish (push) Failing after 1m36s
LANCommander Release / build_launcher_osx-arm64 (push) Has been cancelled
LANCommander Release / prep (push) Has been cancelled
LANCommander Release / build_launcher_linux-x64 (push) Has been cancelled
LANCommander Release / build_launcher_osx-x64 (push) Has been cancelled
LANCommander Release / build_launcher_win-arm64 (push) Has been cancelled
LANCommander Release / build_launcher_win-x64 (push) Has been cancelled
LANCommander Release / build_server_linux-arm64 (push) Has been cancelled
LANCommander Release / build_server_linux-x64 (push) Has been cancelled
LANCommander Release / build_server_osx-arm64 (push) Has been cancelled
LANCommander Release / build_server_osx-x64 (push) Has been cancelled
LANCommander Release / build_server_win-arm64 (push) Has been cancelled
LANCommander Release / build_server_win-x64 (push) Has been cancelled
LANCommander Release / build_launcher_linux-arm64 (push) Has been cancelled
LANCommander Release / build_release (push) Has been cancelled
2025-02-04 21:37:07 -06:00
Pat Hartl
304f308474 WIP refactor of game importing 2025-01-12 02:54:41 -06:00
Pat Hartl
4c242b07ce Stop operation stopwatch on complete 2024-11-11 18:19:22 -06:00
Pat Hartl
396b0bbb21 Kill game asynchronously 2024-10-29 18:24:01 -05: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
6d6526a5f3 Import mods and expansions, but filter them out
Some checks failed
LANCommander Release / prep (push) Has been cancelled
LANCommander Release / build_launcher_win-arm64 (push) Has been cancelled
LANCommander Release / build_launcher_win-x64 (push) Has been cancelled
LANCommander Release / build_release (push) Has been cancelled
LANCommander Release / build_server_linux-arm64 (push) Has been cancelled
LANCommander Release / build_server_linux-x64 (push) Has been cancelled
LANCommander Release / build_server_osx-arm64 (push) Has been cancelled
LANCommander Release / build_server_osx-x64 (push) Has been cancelled
LANCommander Release / build_server_win-arm64 (push) Has been cancelled
LANCommander Release / build_server_win-x64 (push) Has been cancelled
LANCommander Release / build_launcher_linux-arm64 (push) Has been cancelled
LANCommander Release / build_launcher_linux-x64 (push) Has been cancelled
LANCommander Release / build_launcher_osx-arm64 (push) Has been cancelled
LANCommander Release / build_launcher_osx-x64 (push) Has been cancelled
2024-10-09 17:41:42 -05:00
Pat Hartl
6764b24b2b Fix logging operation when logger doesn't exist 2024-09-20 00:26:14 -05:00
Pat Hartl
d07375c3ee Fix double log and incorrect log level with errors 2024-09-18 20:38:22 -05:00
Pat Hartl
2cd07108bc Add enriching to logger operations. Better script logging 2024-09-17 00:19:57 -05:00
Pat Hartl
9c95065108 Add Seq sink for debug and timed logging on import 2024-09-11 02:05:24 -05:00
Pat Hartl
0732e5d564 Don't replace slashes in action arguments as some may use something other than the path separator char
Some checks failed
LANCommander Playnite Plugin / build (push) Has been cancelled
LANCommander Release / build (push) Has been cancelled
LANCommander / build (push) Has been cancelled
2024-01-26 01:56:21 -06:00
Pat Hartl
4de8eb53d2 Update packages
Some checks failed
LANCommander Playnite Plugin / build (push) Has been cancelled
LANCommander Release / build (push) Has been cancelled
LANCommander / build (push) Has been cancelled
2024-01-07 15:31:09 -06:00
Pat Hartl
ffe6f07753 Add tests for string extensions. Convert/trim path directory separator characters. 2023-12-26 18:06:25 -06:00
Pat Hartl
d4aa1c1e21 Renamed GetArchivePath to GetAcrualPath. Added notes in GameSaveManager for pathing terms. Fixed files getting added to save. Fixed directories getting added to save. Added special folders to expand/deflation of environment variables. 2023-12-23 17:39:37 -06:00
Pat Hartl
c9c8eb6ccf Methods to get correct save paths for archive with tests 2023-12-23 00:11:16 -06:00
Pat Hartl
c571058817 Replace colons in titles with hyphens for file safety 2023-01-07 12:57:58 -06:00
Pat Hartl
ffc51f4e0d Basic download and extract of games 2023-01-06 22:12:03 -06:00