Commit graph

56 commits

Author SHA1 Message Date
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
Pat Hartl
968f7da4cf Switch script writing to async 2024-08-08 18:08:52 -05:00
Pat Hartl
4389b61e80 Run download and extract async, fix progress calculations 2024-08-07 18:00:43 -05:00
Pat Hartl
7c54228d75 Ignore unmatched properties when deserializing manifests 2024-05-13 18:41:40 -05:00
Pat Hartl
f14064da6a
Update ScriptHelper.cs 2024-04-25 13:57:12 -05:00
Pat Hartl
b74bbf47b0 Fix location of extracted manifest from saves 2024-01-25 21:24:35 -06:00
Pat Hartl
b9335ebebb Make manifest helper methods generic 2024-01-15 17:45:39 -06:00
Pat Hartl
d955f080b7 Refactored uninstall to only remove files/directories that came from the original install 2024-01-10 01:59:51 -06:00
Pat Hartl
a8ed46bff7 Change location of all metadata/script files in install directory
In order to support mods and expansions, there needs to be another place to hold game scripts and the manifest. These have been moved to the {InstallDir}\.lancommander\{GameId} directory.
2024-01-09 01:22:56 -06:00
Pat Hartl
805878ec0a Don't create script file if script contents are empty 2023-12-29 02:32:57 -06:00
Pat Hartl
9a1dc652a2 Added the ability to export/import most game information 2023-12-14 19:09:00 -06:00
Pat Hartl
7c22aaa139 Record save file paths in manifest. Support regex pathing in upload 2023-11-30 18:25:37 -06:00
Pat Hartl
39dd24e0ba Don't run through download if game already exists on disk 2023-11-17 11:48:45 -06:00
Pat Hartl
eb05364542 Fix reference to static method in ScriptHelper 2023-11-15 23:59:12 -06:00
Pat Hartl
bf2c9ea45a Move script path helpers to ScriptHelper. Execute post-install scripts in Playnite extension. 2023-11-15 23:42:54 -06:00
Pat Hartl
29dcebb70f New PowerShell runtime with the ability to use variables 2023-11-15 22:38:20 -06:00
Pat Hartl
dc2eff4972 Have manifest writer return the file path 2023-11-13 23:07:50 -06:00