Files
leaguerecorder/app/packager.toml
T
vhaudiquet 61862ef792 app: make the packager config build the NSIS installer
Three faults kept `cargo packager` from producing anything. "$schema"
was unquoted, which made TOML reject the file so the tool found no
config at all. Without `name`, cargo-packager sets its working
directory to the config *file* before reading the crate name and dies
with ERROR_DIRECTORY. Without `binaries`, it has no main binary; a
config file gets no auto-detection from Cargo.toml, so the binary and
its directory are named here.

The resource list shipped a piece of OBS (obs.dll, its plugins, two of
three libobs DLLs) and none of its data, so the packaged daemon would
have loaded obs.dll without avcodec, libcurl or the module data. It
now copies every DLL the daemon loads, the plugin and module data, and
the obs-*.exe helpers, all from the daemon's release build.

The installer built from this puts the app and the daemon in one
directory: on the dev machine the installed pair answers --probe in a
second with a fresh data directory, and OBS 32.1.0 loads from the
shipped files without downloading anything.
2026-11-19 21:45:53 +01:00

40 lines
2.1 KiB
TOML

# cargo-packager configuration for the NSIS installer (`cargo packager --release`).
#
# The app exe is the cargo binary. Everything the daemon needs at run time sits beside it in the
# install root: the daemon, OBS and its data are built into record-daemon/target/release by the
# daemon's own build and copied from there. The app downloads ffmpeg itself on the first export.
"$schema" = "https://raw.githubusercontent.com/crabnebula-dev/cargo-packager/main/crates/packager/schema.json"
name = "leaguerecorder"
product-name = "League Recorder"
identifier = "v.leaguerecorder"
version = "0.3.0"
description = "Records League of Legends games through the record-daemon."
out-dir = "dist"
# A config file is not read from Cargo.toml, so the binary has to be named. The app crate
# builds one.
binaries-dir = "target/release"
binaries = [{ path = "leaguerecorder", main = true }]
before-packaging-command = "cargo build --release && cargo build --release --manifest-path ../record-daemon/Cargo.toml"
formats = ["nsis"]
icons = ["icons/icon.ico"]
# Everything the daemon loads from beside its exe: the binary, obs.dll and the DLLs it pulls in
# (ffmpeg, x264, curl, srt, …), the module data and the plugins with their data. Shipping the
# whole set keeps a first run offline; the daemon can also fetch OBS when a piece is missing.
resources = [
{ src = "../record-daemon/target/release/record-daemon.exe", target = "record-daemon.exe" },
{ src = "../record-daemon/target/release/*.dll", target = "." },
{ src = "../record-daemon/target/release/obs-*.exe", target = "." },
{ src = "../record-daemon/target/release/data", target = "data" },
{ src = "../record-daemon/target/release/obs-plugins", target = "obs-plugins" },
{ src = "../record-daemon/target/release/win-capture", target = "win-capture" },
{ src = "../record-daemon/target/release/rtmp-services", target = "rtmp-services" },
{ src = "../record-daemon/target/release/iconengines", target = "iconengines" },
{ src = "../record-daemon/target/release/styles", target = "styles" },
]
[nsis]
compression = "lzma"
installer-mode = "currentUser"