Adds Services/SelfUpdateService.cs implementing the Chrome-style pattern:
1. Download new exe to "<current>.new"
2. Rename running exe to "<current>.old" (NTFS allows MoveFile on a
running exe -- it resolves processes by handle, not by path)
3. Rename ".new" to canonical path
4. Spawn the new exe with our argv
5. Environment.Exit(0)
6. Next start of the new exe runs CleanupAfterUpdate() in App.OFIC()
which deletes the leftover ".old"
UI: the existing "Download" banner button is now "Install update". Click
runs the self-update flow with a percent/MB progress label; any failure
(network, AV write-block, dir not writable) falls back to opening the
URL in the browser so users always have a path forward.
Bumps to 0.4.7. Also fixes a stale fallback URL that pointed at
sijbers.uk/pack/... -- now correctly points at bns.sijbers.uk/launcher/.
Brass & Sigil Launcher
A custom Minecraft Java Edition launcher built for distributing the private "Brass & Sigil" modpack (Create + aeronautics + tech + magic + Distant Horizons) to a small friend group.
NOT AN OFFICIAL MINECRAFT PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.
What it does
- Fetches a JSON manifest from a self-hosted server and syncs the modpack files (mods, configs, resourcepacks) to the player's local install directory. SHA-1 hashing ensures only changed files are downloaded.
- Authenticates each player with their own personal Microsoft account via
the standard MSAL OAuth + Xbox Live + Minecraft Services chain, using the
open-source
CmlLib.Core.Auth.Microsoftlibrary without modification. - Installs the appropriate Minecraft Java Edition version and Forge mod loader, then launches the game with the player's authenticated session.
Stack
- C# / .NET 8
- Avalonia 12 -- desktop UI
- CmlLib.Core 4.x -- Minecraft install + launch
- CmlLib.Core.Auth.Microsoft 3.x + XboxAuthNet.Game.Msal -- Microsoft auth
- CmlLib.Core.Installer.Forge -- Forge support
Build
Requires the .NET 8 SDK.
dotnet build
To produce the shippable single-file executable (~46 MB):
dotnet publish -c Release -r win-x64 --self-contained true
Output: bin/Release/net8.0/win-x64/publish/ModpackLauncher.exe -- a single
file with no other dependencies, ready to send to a friend.
Configuration
The repo ships with a launcher-config.template.json. Copy it to
launcher-config.json and fill in real values before building:
Copy-Item launcher-config.template.json launcher-config.json
launcher-config.json is gitignored so local values (manifest URL, Azure
client ID) never get committed.
Fields
| Field | Purpose |
|---|---|
packName |
Display name shown in the launcher |
manifestUrl |
URL of the hosted manifest JSON |
installDirName |
Folder name under %APPDATA% for game files |
memoryMinMB / memoryMaxMB |
JVM memory defaults |
msalClientId |
Azure App Registration client ID for Microsoft auth |
The config is embedded into the exe at build time, so the launcher ships
as a single self-contained file. A sidecar launcher-config.json placed
beside the exe will override the embedded copy at runtime (handy for testing).
Manifest format
See manifest.example.json for the schema. Minimum:
{
"name": "Brass & Sigil",
"version": "1.0.0",
"minecraft": { "version": "1.20.1" },
"loader": { "type": "forge", "version": "47.2.0" },
"files": [
{ "path": "mods/example.jar", "url": "https://...", "sha1": "..." }
]
}
The launcher diffs the manifest against the local install dir using SHA-1
hashes and downloads only what has changed. Files removed from the manifest
are pruned from managed folders (mods/, config/, resourcepacks/,
shaderpacks/, kubejs/, defaultconfigs/).
Privacy
The launcher does not collect, store, or transmit any user data beyond what the standard Microsoft and Minecraft authentication APIs require. Auth tokens are cached locally via the MSAL token cache. No telemetry, no analytics, no third-party services beyond Microsoft and Mojang.
Local data is written to:
%APPDATA%\BrassAndSigil\-- launcher settings + log file%APPDATA%\<installDirName>\-- modpack and Minecraft installation
License
MIT -- see LICENSE.
Author
Matt Sijbers -- https://sijbers.uk/matt / project page