launcher

command module
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

launcher

An open-source launcher for Diablo II: Lord of Destruction private servers.

Each server is described by a JSON profile: name, branding, gateways, where its game files come from, the optional components and settings it offers, and how the game starts. Servers get listed by a reviewed pull request adding their profile to servers/. Players pin up to three favourite servers and switch between them with a click or Ctrl+1, 2 and 3. Each server is installed into its own folder inside the player's Diablo II install, which is otherwise never modified.

Status

Working end to end against a local test server: install, update, components (maphack, D2GL), declarative settings, news, ladder, multibox with D2GL box profiles, pinned servers, adding servers by URL or a diablo2org://add link, and bringing across the old SlashDiablo launcher's settings. Not yet tried against a real server, and Play has only been tested in unit tests so far.

Phase
1. Spec and skeleton Done: spec draft 0.1, schemas, CI
2. SlashDiablo on the new launcher Done locally; needs SlashDiablo to publish manifests and add its profile
3. Multi-server Done: listing, catalog, pinning, per-server branding, add by URL
4. Hardening Update check, tagged releases, code signing and bug reports done
5. Reach Other servers, Linux

For server teams

Your files stay on your own web host. You publish a manifest next to them, write a profile, and open a pull request. servers/README.md walks through it; in short:

d2pack manifest -server myserver -version 2026.10.01 -url https://files.example.com/live ./live
d2pack init -id myserver -name "My Server" -gateway play.example.com -manifest https://files.example.com/live/manifest.json
d2pack check -profile myserver.json ./live/manifest.json

Blizzard's base archives are always left out of a manifest. -once marks files the player owns after the first install, such as maphack settings, and -only builds a component's manifest from a full install. When you patch, rebuild and re-upload the manifest; no pull request is needed.

With components, d2pack build <plan.json> builds every channel and component version's manifest in one go, ready to upload. See examples/slashdiablo/build.json.

Development

You need Go 1.25 or newer, Node 24, and the Wails CLI at the version CI uses:

go install github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-beta.26
cd frontend && npm install && cd ..
Command What it does
wails3 dev Run with live reload
wails3 build Build bin/launcher.exe
wails3 package INSTALL_SCOPE=user Build a per-user installer, no admin needed
go test ./internal/... Run the tests, including every example and listed profile
go run ./cmd/listing Regenerate servers/index.json after changing servers/
Releases and code signing

Pushing a v1.2.3 tag builds a release: the installer, d2pack.exe and SHA256SUMS.txt go on a GitHub release. Tagged builds are code signed through SSL.com's eSigner, so Windows names the publisher rather than warning about an unknown one. NSIS signs the launcher, its uninstaller and the installer as it builds them, and CI signs d2pack.exe and checks every signature before anything is published. Other builds aren't signed, since each signing counts against the eSigner plan (about four per release).

Signing needs four repository secrets: ES_USERNAME and ES_PASSWORD (the SSL.com account), ES_CREDENTIAL_ID (the certificate's eSigner credential) and ES_TOTP_SECRET (the eSigner authenticator-app secret). build/windows/sign.ps1 does the signing, and can be run by hand on Windows with the same four set as environment variables.

Local test environment

testenv/dev.ps1 builds three test servers from a working SlashDiablo install, serves them over HTTPS on 127.0.0.1:8667, and starts the launcher against them with its own data folder and a sandbox Diablo II folder made of hard links to your archives:

.\testenv\dev.ps1 -Source "C:\Games\Diablo II" -Art ..\slashdiablo-launcher\qml\assets

-Art is optional: the old launcher's qml\assets folder, for SlashDiablo's key art. Your Diablo II folder is only read. Pressing Play does write the Battle.net registry values, as a real launch would.

Setting LAUNCHER_DEVTOOLS_PORT opens WebView2's DevTools protocol on that port, so a script can drive and screenshot the page.

These development settings (LAUNCHER_LISTING_DIR, LAUNCHER_DEV_CA, LAUNCHER_UPDATES_URL and LAUNCHER_DEVTOOLS_PORT) only work in untagged builds, such as wails3 build or CI's artifacts from main. A tagged release logs and ignores them, so nothing on a player's machine can point the launcher at another listing, trust another certificate or open its page to other programs. LAUNCHER_DATA_DIR works in both: it only moves the launcher's own folder.

Logs and bug reports

The launcher logs to logs\launcher.log in its data folder (%LOCALAPPDATA%\diablo2org\launcher), keeping three older files of up to 1 MB each, and writes any crash to logs\crash.log. Settings, General, Bug report shows players what a report holds, then saves it as a zip: those logs, state.json, the newest Diablo II crash logs (D2*.txt) from each server folder, and any files a server's profile asks for in report.files, with the user folder replaced by %USERPROFILE%. Nothing is uploaded, unless the current server's profile sets report.url: then the button sends a report holding only that server's files there, and saves it in reports\ if it can't (SPEC 3.4).

Layout
  • internal/spec: parses and checks profiles, manifests and listing entries against the schemas in schema/, plus the rules a schema can't express.
  • internal/fetch: the only code that touches the network. HTTPS to allowed hosts only, redirects included; status, size and hashes checked.
  • internal/sync: brings a server folder in line with a manifest, never writing a file in place.
  • internal/install: the base install, server folders and hard-linked archives.
  • internal/settings: surgical edits to ini and BH settings files.
  • internal/launch: Battle.net registry values and starting boxes.
  • internal/logs, internal/report: the log file, crash capture and bug reports.
  • internal/core: everything the launcher does, independent of the UI.
  • internal/app: the thin services the frontend calls.
  • frontend/: Svelte 5, TypeScript and Tailwind.
  • cmd/d2pack, cmd/listing: tools for server teams and maintainers.
  • cmd/devsite, cmd/devserve: the local test environment.

Licence

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
build
legacydl command
Command legacydl fetches the blizzard-legacy-dl binary the launcher ships with, pinned by version and SHA-256 in build/legacy-dl.json, and its licence for the app's notices.
Command legacydl fetches the blizzard-legacy-dl binary the launcher ships with, pinned by version and SHA-256 in build/legacy-dl.json, and its licence for the app's notices.
windows/stampinfo command
Command stampinfo writes a copy of build/windows/info.json with a release's version, so a tagged build's exe shows that version in its file properties rather than the version in config.yml.
Command stampinfo writes a copy of build/windows/info.json with a release's version, so a tagged build's exe shows that version in its file properties rather than the version in config.yml.
cmd
d2pack command
Command d2pack is for server teams: it writes a starter server profile and builds the file manifests the launcher downloads from.
Command d2pack is for server teams: it writes a starter server profile and builds the file manifests the launcher downloads from.
devserve command
Command devserve serves a folder over HTTPS on 127.0.0.1 for local testing, since the launcher only fetches over HTTPS.
Command devserve serves a folder over HTTPS on 127.0.0.1 for local testing, since the launcher only fetches over HTTPS.
devsite command
Command devsite builds a local test environment: a sandbox Diablo II folder, three test servers built from a real install, their profiles in a listing, and a launcher data folder with them pinned.
Command devsite builds a local test environment: a sandbox Diablo II folder, three test servers built from a real install, their profiles in a listing, and a launcher data folder with them pinned.
listing command
Command listing regenerates servers/index.json from servers/*.json.
Command listing regenerates servers/index.json from servers/*.json.
internal
app
Package app holds the services the frontend calls.
Package app holds the services the frontend calls.
auth
Package auth logs players in to servers whose realm issues single-use tickets: jaenster's d2up realm stack and its login service, authd.
Package auth logs players in to servers whose realm issues single-use tickets: jaenster's d2up realm stack and its login service, authd.
basegame
Package basegame installs the Diablo II base game, classic and Lord of Destruction, from Blizzard's own CDN, by running the blizzard-legacy-dl that ships beside the launcher.
Package basegame installs the Diablo II base game, classic and Lord of Destruction, from Blizzard's own CDN, by running the blizzard-legacy-dl that ships beside the launcher.
cdkey
Package cdkey tidies the CD keys a player types in and keeps them out of anything the launcher writes down.
Package cdkey tidies the CD keys a player types in and keeps them out of anything the launcher writes down.
compat
Package compat sets Windows compatibility flags on a server's Game.exe, for the player's own account, so no administrator rights are needed.
Package compat sets Windows compatibility flags on a server's Game.exe, for the player's own account, so no administrator rights are needed.
core
Package core is what the launcher does, independent of any UI: it loads servers, keeps their folders up to date, reads and writes their settings, and starts them.
Package core is what the launcher does, independent of any UI: it loads servers, keeps their folders up to date, reads and writes their settings, and starts them.
fetch
Package fetch is the only code that talks to the network.
Package fetch is the only code that talks to the network.
install
Package install manages the player's Diablo II base install and the per-server folders inside it.
Package install manages the player's Diablo II base install and the per-server folders inside it.
launch
Package launch starts the game for a server: it points Battle.net at the server's gateway, then starts each box from the server's folder.
Package launch starts the game for a server: it points Battle.net at the server's gateway, then starts each box from the server's folder.
logs
Package logs writes the launcher's log file and catches crashes, so a player's problem can be looked at afterwards.
Package logs writes the launcher's log file and catches crashes, so a player's problem can be looked at afterwards.
mpq
Package mpq reads just enough of Blizzard's MPQ archives to make a 1.14 base archive usable by a pre-1.14 game: it finds an archive's (attributes) member, tells whether it's in the 1.14 format, and writes a copy of the archive with that member unlisted.
Package mpq reads just enough of Blizzard's MPQ archives to make a 1.14 base archive usable by a pre-1.14 game: it finds an archive's (attributes) member, tells whether it's in the 1.14 format, and writes a copy of the archive with that member unlisted.
pack
Package pack is the server side of the spec: it builds a file manifest from a folder and writes a starter server profile.
Package pack is the server side of the spec: it builds a file manifest from a folder and writes a starter server profile.
paths
Package paths checks the relative paths servers use for files inside their folder.
Package paths checks the relative paths servers use for files inside their folder.
report
Package report builds a bug report: a zip of the launcher's logs, crash traces and state, with the game's own crash logs and any files a server asks for, that a player can attach when asking for help.
Package report builds a bug report: a zip of the launcher's logs, crash traces and state, with the game's own crash logs and any files a server asks for, that a player can attach when asking for help.
settings
Package settings reads and writes the file-backed settings a server declares in its profile.
Package settings reads and writes the file-backed settings a server declares in its profile.
spec
Package spec parses and checks the documents servers publish: the server profile and file manifests.
Package spec parses and checks the documents servers publish: the server profile and file manifests.
store
Package store keeps the launcher's own state in its data folder: the player's choices, pinned signing keys, and caches.
Package store keeps the launcher's own state in its data folder: the player's choices, pinned signing keys, and caches.
sync
Package sync brings a server folder in line with a file manifest.
Package sync brings a server folder in line with a file manifest.
updates
Package updates checks whether a newer launcher has been released, and finds its installer so the launcher can download and run it.
Package updates checks whether a newer launcher has been released, and finds its installer so the launcher can download and run it.
wine
Package wine runs the game's Windows binaries on macOS and Linux: it finds or downloads a Wine runtime, keeps a private prefix for the launcher, and maps paths between the host and Windows.
Package wine runs the game's Windows binaries on macOS and Linux: it finds or downloads a Wine runtime, keeps a private prefix for the launcher, and maps paths between the host and Windows.
Package schema embeds the JSON Schemas that define the documents servers publish, so the launcher validates against exactly the files in this folder.
Package schema embeds the JSON Schemas that define the documents servers publish, so the launcher validates against exactly the files in this folder.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL