Commit graph

75 commits

Author SHA1 Message Date
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
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
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
52dd3f23ba Add "Package" button to archive page w/ dialog 2026-05-27 20:42:23 -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
2bb95e8a12 Formatting 2026-05-24 00:09:13 -05:00
Pat Hartl
b52f83df1e Add repeatable options with list type 2026-05-18 22:04:03 +00:00
Pat Hartl
97fdb68899 Add display names to option choices 2026-05-17 01:21:05 -05:00
Pat Hartl
e5a8d39bf3 Replace INI parsing 2026-05-16 18:14:41 -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
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
520cf66038 Share HTTP client across sessions 2026-05-09 19:40:49 -05:00
Pat Hartl
59795ff222 Add code completion for built-in cmdlets and variables 2026-05-08 02:02:33 -05:00
Pat Hartl
1c2b068001 Fix regex for checking if script requires admin 2026-03-13 01:33:18 -05:00
Pat Hartl
da0d1d6d7a Replace custom admin directive with PowerShell standard directive 2026-03-10 18:15:35 -05:00
Pat Hartl
322f05cb26 Use steamcmd.net for app info, remove extra Steam cmdlets 2026-02-07 18:58:03 -06:00
Pat Hartl
303f8720f4 ILogger implementation to log to PowerShell 2026-01-28 02:13:19 -06:00
Pat Hartl
87f7e2160c Remove DI from cmdlets, fix SteamCMD login, fix SteamCMD settings 2026-01-28 01:59:27 -06:00
Pat Hartl
16adb724dd Remove install queueing from SteamCMD 2026-01-26 19:43:56 -06:00
Pat Hartl
017f945537 Use full names to fix generated DI code 2026-01-24 17:14:33 -06:00
Pat Hartl
c5506b440f Move Steam integrations to separate assembly, add cmdlets for various Steam actions 2026-01-24 16:37:07 -06:00
Aaron Powell
22113f9ef2 Removing Serilig from the sdk 2025-12-11 16:18:33 +11:00
Pat Hartl
ce183c8eb9 Implement debugger for packaging scripts 2025-12-10 21:46:46 -06:00
Pat Hartl
17fa802c19 Implementation of script debugger component with RPC via SignalR 2025-12-10 20:55:38 -06:00
Pat Hartl
6dfc0906ac Refactor launcher library importing, manifests
Switched the library importing in the launcher to work based on a queue. As a new game is added to the queue, it should find any related data and also add it to the queue. This should result in an easier to maintain importer while reducing the load on the launcher's DAL. This may result in more RAM usage while importing. Local manifests have also been refactored to match manifests in import/export LCX files, removing the old manifest format. This is a large breaking change that will probably break existing game installations. A migration will probably have to be created.
2025-11-29 18:24:27 -06: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
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
d8af75df26 Load all cmdlets defined in code 2025-11-25 23:58:43 -06:00
Pat Hartl
a549f06a85 Fix service registration in CLI. Create abstraction for external script runners. 2025-11-23 20:54:56 -06:00
Pat Hartl
4968481460 Standardize YAML serializers 2025-10-06 19:23:49 -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
11da187920 Add debug handler 2025-09-09 18:39:56 -05:00
RattleSN4K3
9eca901448 Fix uploading game save registry dumping when debugging script 2025-06-28 00:44:51 +02:00
RattleSN4K3
b274904f9f Ensure wrapping value in quotes
MadMilkman.INI does not support it, doing it manually
2025-05-13 20:40:45 +02:00
RattleSN4K3
51ff4ae23b Cleanup, comments and help messages 2025-05-13 20:06:28 +02:00
RattleSN4K3
6b2e3235c1 Allow to add update/add value when section is not existing (adds section) 2025-05-13 19:44:52 +02:00
RattleSN4K3
231c5405ca Added contrary switches to KeepSectionDuplicates and KeepKeyDuplicates 2025-05-13 19:42:54 +02:00
RattleSN4K3
49dd7372ed Changed "Add" parameter to be a switch, a contrary switch is added 2025-05-13 19:42:05 +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
a9827a7636 Fix downloading of avatar
Some checks failed
LANCommander Release / prep (push) Failing after 2s
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_release (push) Has been skipped
LANCommander SDK Release / prep (push) Failing after 1s
LANCommander SDK Release / publish (push) Has been skipped
2025-02-28 18:13:34 -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
bebe4181a3 Add cmdlet for downloading player avatar
Some checks failed
Publish SDK NuGet Package / publish (push) Failing after 50s
LANCommander Release / prep (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
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
Implements #148
2025-01-29 23:11:52 -06:00
Pat Hartl
34c345d8e9 Add cmdlets for calculating FOV 2025-01-23 02:47:02 -06:00
Pat Hartl
0137def923 Add missing user custom field cmdlets
Fixes #163
2025-01-14 17:42:28 -06:00
Pat Hartl
61c25ac005 Avoid null reference exception at end of script exec 2024-10-09 20:22:41 -05:00