mirror of
https://github.com/FalloutCollaborationProject/FCP-Mod-Updater.git
synced 2026-07-27 17:04:05 -07:00
Update Publish
This commit is contained in:
+17
-2
@@ -1,4 +1,6 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using FCPModUpdater.Commands;
|
||||
using Spectre.Console;
|
||||
using Spectre.Console.Cli;
|
||||
|
||||
var app = new CommandApp();
|
||||
@@ -9,7 +11,7 @@ app.Configure(config =>
|
||||
config.SetApplicationVersion("1.0.0");
|
||||
|
||||
config.AddCommand<ScanCommand>("scan")
|
||||
.WithDescription("Scan mods and show interactive menu")
|
||||
.WithDescription("Scan mods and show interactive menu (DEFAULT)")
|
||||
.WithExample("scan")
|
||||
.WithExample("scan", "--directory", "/path/to/RimWorld/Mods");
|
||||
|
||||
@@ -17,6 +19,19 @@ app.Configure(config =>
|
||||
.WithDescription("Update all FCP mods (non-interactive)")
|
||||
.WithExample("update")
|
||||
.WithExample("update", "--directory", "/path/to/RimWorld/Mods");
|
||||
|
||||
});
|
||||
|
||||
return await app.RunAsync(args);
|
||||
app.SetDefaultCommand<ScanCommand>();
|
||||
|
||||
var result = await app.RunAsync(args);
|
||||
|
||||
// On Windows, wait for key press before closing so the window doesn't vanish
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.MarkupLine("[grey]Press any key to exit...[/]");
|
||||
Console.ReadKey(true);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=FCP Mod Manager
|
||||
Comment=Manage RimWorld mods from the Fallout Collaboration Project
|
||||
Exec=./FCPModUpdater scan
|
||||
Icon=utilities-terminal
|
||||
Terminal=true
|
||||
Categories=Game;Utility;
|
||||
@@ -4,6 +4,7 @@ APP_NAME="FCPModUpdater"
|
||||
# Self-contained
|
||||
dotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o ./publish/win-x64-sc ./FCPModUpdater.csproj
|
||||
dotnet publish -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true -o ./publish/linux-x64-sc ./FCPModUpdater.csproj
|
||||
cp ./fcp-mod-manager.desktop ./publish/linux-x64-sc/
|
||||
|
||||
# Archive self-contained builds
|
||||
cd ./publish
|
||||
@@ -14,6 +15,7 @@ cd ..
|
||||
# Framework-dependent
|
||||
dotnet publish -c Release -r win-x64 --self-contained false -p:PublishSingleFile=false -o ./publish/win-x64-fd ./FCPModUpdater.csproj
|
||||
dotnet publish -c Release -r linux-x64 --self-contained false -p:PublishSingleFile=false -o ./publish/linux-x64-fd ./FCPModUpdater.csproj
|
||||
cp ./fcp-mod-manager.desktop ./publish/linux-x64-fd/
|
||||
|
||||
# Archive framework-dependent builds (keep originals)
|
||||
cd ./publish
|
||||
|
||||
Reference in New Issue
Block a user