a1331212cb
Self-hosted Minecraft modpack distribution + administration system.
- launcher/ Avalonia 12 desktop client; single-file win-x64 publish.
Microsoft auth via XboxAuthNet, manifest+SHA-1 mod sync,
portable install path, sidecar settings.
- server/ brass-sigil-server daemon (.NET 8, linux-x64). Wraps the
MC subprocess, embedded Kestrel admin panel with cookie
auth + rate limiting, RCON bridge, scheduled backups,
BlueMap CLI integration with player markers + skin proxy,
friend-side whitelist request flow, world wipe with seed
selection (keep current / random / custom).
- pack/ pack.lock.json (Modrinth + manual CurseForge entries),
data-only tweak source under tweaks/, build outputs in
overrides/ (gitignored).
- scripts/ Build-Pack / Build-Tweaks / Update-Pack / Check-Updates
plus Deploy-Brass.ps1 unified one-shot deploy with
version-bump pre-flight and daemon-state detection.
46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
using System;
|
|
using System.IO;
|
|
|
|
namespace ModpackLauncher.Services;
|
|
|
|
public static class FileLog
|
|
{
|
|
private static readonly object _lock = new();
|
|
|
|
public static string LogPath { get; } = BuildPath();
|
|
|
|
private static string BuildPath()
|
|
{
|
|
var dir = Path.Combine(
|
|
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
|
"BrassAndSigil"
|
|
);
|
|
Directory.CreateDirectory(dir);
|
|
return Path.Combine(dir, "launcher.log");
|
|
}
|
|
|
|
public static void Init()
|
|
{
|
|
try
|
|
{
|
|
// Truncate per launch so we always have the most recent run.
|
|
File.WriteAllText(LogPath,
|
|
$"=== ModpackLauncher launched {DateTime.Now:yyyy-MM-dd HH:mm:ss} ==={Environment.NewLine}");
|
|
}
|
|
catch { }
|
|
}
|
|
|
|
public static void Write(string message)
|
|
{
|
|
try
|
|
{
|
|
lock (_lock)
|
|
{
|
|
File.AppendAllText(LogPath,
|
|
$"[{DateTime.Now:HH:mm:ss}] {message}{Environment.NewLine}");
|
|
}
|
|
}
|
|
catch { }
|
|
}
|
|
}
|