The app asks the project's Gitea release list about five seconds after startup and every six hours. A stable release beats a newer prerelease, and a release is offered only when its tag is newer than the running build and it carries a .capsule asset for this target. A capsule is a ZIP with capsule.json and a payload. Every payload file carries its size and BLAKE3 digest in the manifest, and staging rejects absolute paths, parent segments, undeclared entries, digest mismatches, and versions that are not newer. The verified payload is stored under the app data directory, so a download survives a restart. The manifest and archive format live in crates/capsule-format, shared by the app's verifier and the release tool. Settings > Advanced shows the state, the notes, and the download and install buttons. The status bar shows an accent chip while an update is waiting. Install copies the app to a temp helper, asks the daemon to stop, and quits. The helper waits for the process, swaps the files with a rollback copy of each old file, removes stale files, and starts the new app. A failed swap puts the old files back and logs the reason. --check-updates runs the release check from a shell. The release tool in tools/capsule builds a capsule from the same files the installer puts down, using packager.toml, so a release does not need an installed copy. docs/updates.md covers the format and the release steps.
47 lines
2.5 KiB
TOML
47 lines
2.5 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.
|
|
# After packaging, build the matching update capsule from the same release files and upload it
|
|
# to the Gitea release:
|
|
# cargo run --manifest-path ../tools/capsule/Cargo.toml -- --config packager.toml
|
|
# See ../docs/updates.md for the format and the release steps.
|
|
"$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.3"
|
|
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" },
|
|
# The C++ runtime the exes and every OBS plugin import. Windows ships the UCRT but not these,
|
|
# so a machine without the VC++ redistributable would not start the app.
|
|
{ src = "vendor/vcruntime/*.dll", target = "." },
|
|
]
|
|
|
|
[nsis]
|
|
compression = "lzma"
|
|
installer-mode = "currentUser"
|