Skip to content

Packaging

Zaldaryon edited this page Jul 24, 2026 · 10 revisions

Packaging

This page is for developers building release packages. End users just run the installer (see Installation).

What a Release Package Contains

Unlike the old model (full game copy ~700MB), Optimum now ships as a small set of files (~15MB) that install alongside vanilla:

File Purpose
Optimum.exe Launcher entry point
Optimum.dll Runtime patcher (cache, assembly loading)
Optimum.Patcher.dll Cecil patcher (method transplant)
VintagestoryLib.Donor.dll Compiled fork (source of optimized methods)
Mono.Cecil*.dll Cecil library
Installer scripts Platform-specific install/uninstall

Building a Release

# 1. Build the donor DLL (requires bootstrap)
make build

# 2. Publish the launcher (self-contained set of files)
dotnet publish Optimum.Launcher -c Release

# 3. The output is in Optimum.Launcher/bin/Release/net10.0/publish/

Platform Installers

Each platform has an installer script that copies the published files into the user's VS directory:

Script Platform
scripts/install-windows.ps1 Windows (GUI, Programs & Features)
scripts/install-linux.sh Linux (interactive terminal)
scripts/install-macos.sh macOS (interactive terminal)
scripts/uninstall.sh Linux/macOS removal
scripts/uninstall.ps1 Windows removal

Legacy Packaging (for source-distributed releases)

The old packaging scripts still exist for producing standalone archives (useful for GitHub Release zip attachments):

./scripts/package-linux.sh                     # tar.gz with full game
./scripts/package-linux.sh --format appimage   # AppImage
./scripts/package-macos.sh --arch arm64        # macOS .dmg

These produce the old-model packages where the vanilla client is overlaid with patched DLLs. They require the full build toolchain.

GitHub Release Workflow

For a release:

  1. Build: make build
  2. Publish launcher: dotnet publish Optimum.Launcher -c Release
  3. Create release zip with the installer + published files
  4. Tag: git tag -a v0.2.12 -m "Optimum v0.2.12"
  5. Push: git push --tags
  6. gh release create v0.2.12 --title "Optimum v0.2.12" --notes-file CHANGELOG.md Optimum-v0.2.12-installer.zip

Host x Target

The runtime patcher model is platform-agnostic — the same Optimum.dll + Donor.dll work on all platforms. Only Optimum.exe (the native host) differs per platform (it's a standard .NET apphost).

Build on Targets
Any .NET 10 host All platforms (framework-dependent)
With -r win-x64 Self-contained Windows x64
With -r linux-x64 Self-contained Linux x64
With -r osx-arm64 Self-contained macOS ARM

Clone this wiki locally