2024-08-06 18:24:44 -05:00
|
|
|
|
using CommandLine;
|
|
|
|
|
|
using LANCommander.SDK.Enums;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace LANCommander.Launcher.Models
|
|
|
|
|
|
{
|
2024-10-01 17:56:06 -05:00
|
|
|
|
public enum ArchiveType
|
|
|
|
|
|
{
|
2024-08-12 19:33:26 -05:00
|
|
|
|
Game,
|
|
|
|
|
|
Redistributable,
|
|
|
|
|
|
Server
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-06 18:24:44 -05:00
|
|
|
|
[Verb("RunScript", HelpText = "Run a script for a game")]
|
|
|
|
|
|
public class RunScriptCommandLineOptions
|
|
|
|
|
|
{
|
|
|
|
|
|
[Option("GameId", HelpText = "The GUID of the installed game")]
|
|
|
|
|
|
public Guid GameId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Option("InstallDirectory", HelpText = "The base directory in which the installed game is located")]
|
|
|
|
|
|
public string InstallDirectory { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Option("Type", HelpText = "The type of script to run")]
|
|
|
|
|
|
public ScriptType Type { get; set; }
|
2024-08-06 20:22:33 -05:00
|
|
|
|
|
2024-08-08 17:59:15 -05:00
|
|
|
|
[Option("OldPlayerAlias", HelpText = "The old name to use in a name change script")]
|
|
|
|
|
|
public string OldPlayerAlias { get; set; }
|
2024-08-06 20:22:33 -05:00
|
|
|
|
|
2024-08-08 17:59:15 -05:00
|
|
|
|
[Option("NewPlayerAlias", HelpText = "The new name to use in a name change script")]
|
|
|
|
|
|
public string NewPlayerAlias { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Option("AllocatedKey", HelpText = "The new key to use in a key change script")]
|
|
|
|
|
|
public string AllocatedKey { get; set; }
|
2024-08-06 20:22:33 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-07 01:14:29 -05:00
|
|
|
|
[Verb("Install", HelpText = "Install a game from the server")]
|
|
|
|
|
|
public class InstallCommandLineOptions
|
|
|
|
|
|
{
|
|
|
|
|
|
[Option("GameId", HelpText = "The GUID of the game to install")]
|
|
|
|
|
|
public Guid GameId { get; set; }
|
2024-09-12 19:09:13 -05:00
|
|
|
|
|
|
|
|
|
|
[Option("InstallDirectory", HelpText = "The directory the game folder will be extracted to")]
|
|
|
|
|
|
public string InstallDirectory { get; set; } = "";
|
2024-08-07 01:14:29 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-07 01:47:13 -05:00
|
|
|
|
[Verb("Uninstall", HelpText = "Uninstall a game from the local device")]
|
|
|
|
|
|
public class UninstallCommandLineOptions
|
|
|
|
|
|
{
|
|
|
|
|
|
[Option("GameId", HelpText = "The GUID of the game to uninstall")]
|
|
|
|
|
|
public Guid GameId { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-26 20:19:51 -05:00
|
|
|
|
[Verb("Run", HelpText = "Start a game")]
|
|
|
|
|
|
public class RunCommandLineOptions
|
|
|
|
|
|
{
|
|
|
|
|
|
[Option("GameId", HelpText = "The GUID of the game to run")]
|
|
|
|
|
|
public Guid GameId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Option("ActionId", HelpText = "The GUID of the action to run")]
|
|
|
|
|
|
public Guid ActionId { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-12 19:33:26 -05:00
|
|
|
|
[Verb("Sync", HelpText = "Sync library items from the server")]
|
|
|
|
|
|
public class SyncCommandLineOptions { }
|
|
|
|
|
|
|
2024-10-01 17:56:06 -05:00
|
|
|
|
[Verb("Import", HelpText = "Upload and import a game/redistributable/server to the server (Admin Only)")]
|
2024-08-12 19:33:26 -05:00
|
|
|
|
public class ImportCommandLineOptions
|
|
|
|
|
|
{
|
2024-10-01 17:56:06 -05:00
|
|
|
|
[Option("Path", HelpText = "Path to the import file", Required = true)]
|
2024-08-12 19:33:26 -05:00
|
|
|
|
public string Path { get; set; }
|
|
|
|
|
|
|
2024-10-01 17:56:06 -05:00
|
|
|
|
[Option("Type", HelpText = "The type of import file", Required = true)]
|
|
|
|
|
|
public ArchiveType Type { get; set; }
|
2024-08-12 19:33:26 -05:00
|
|
|
|
}
|
2024-08-06 20:41:21 -05:00
|
|
|
|
|
2024-10-01 17:56:06 -05:00
|
|
|
|
[Verb("Export", HelpText = "Export a game/redistributable/server from the server (Admin Only)")]
|
2024-08-13 17:42:43 -05:00
|
|
|
|
public class ExportCommandLineOptions
|
|
|
|
|
|
{
|
|
|
|
|
|
[Option("Path", HelpText = "The destination path for the LCX export file", Required = true)]
|
|
|
|
|
|
public string Path { get; set; }
|
|
|
|
|
|
|
2024-08-13 18:39:28 -05:00
|
|
|
|
[Option("Id", HelpText = "The ID of the entity to export", Required = true)]
|
|
|
|
|
|
public Guid Id { get; set; }
|
|
|
|
|
|
|
2024-10-01 17:56:58 -05:00
|
|
|
|
[Option("Type", HelpText = "The type of export file", Required = true)]
|
|
|
|
|
|
public ArchiveType Type { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Verb("Upload", HelpText = "Upload an archive to the server (Admin Only)")]
|
|
|
|
|
|
public class UploadCommandLineOptions
|
|
|
|
|
|
{
|
|
|
|
|
|
[Option("Path", HelpText = "Path to the archive file")]
|
|
|
|
|
|
public string Path { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Option("Id", HelpText = "The ID of the entity associated with the archive")]
|
|
|
|
|
|
public Guid Id { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Option("Version", HelpText = "The version of the archive")]
|
|
|
|
|
|
public string Version { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Option("Changelog", HelpText = "Any changes introduces with the archive")]
|
|
|
|
|
|
public string Changelog { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Option("Type", HelpText = "The type of entity associated with the archive")]
|
|
|
|
|
|
public ArchiveType Type { get; set; }
|
2024-08-13 17:42:43 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-06 20:41:21 -05:00
|
|
|
|
[Verb("Login", HelpText = "Login to a LANCommander server")]
|
|
|
|
|
|
public class LoginCommandLineOptions
|
2024-08-06 20:22:33 -05:00
|
|
|
|
{
|
2024-08-06 20:41:21 -05:00
|
|
|
|
[Option("Username", Required = true)]
|
|
|
|
|
|
public string Username { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Option("Password", Required = true)]
|
|
|
|
|
|
public string Password { get; set; }
|
2024-08-06 20:22:33 -05:00
|
|
|
|
|
2024-08-06 20:41:21 -05:00
|
|
|
|
[Option("ServerAddress")]
|
|
|
|
|
|
public string ServerAddress { get; set; }
|
2024-08-06 18:24:44 -05:00
|
|
|
|
}
|
2024-08-06 20:41:21 -05:00
|
|
|
|
|
|
|
|
|
|
[Verb("Logout", HelpText = "Logout and clear local credentials")]
|
|
|
|
|
|
public class LogoutCommandLineOptions { }
|
2024-08-07 17:39:29 -05:00
|
|
|
|
|
|
|
|
|
|
[Verb("ChangeAlias", HelpText = "Change the current logged in user's alias")]
|
|
|
|
|
|
public class ChangeAliasCommandLineOptions
|
|
|
|
|
|
{
|
|
|
|
|
|
[Option("Alias", Required = true)]
|
|
|
|
|
|
public string Alias { get; set; }
|
|
|
|
|
|
}
|
2024-10-01 17:56:58 -05:00
|
|
|
|
}
|