When the launcher can't find its per-user folders, it keeps its files in
the temporary folder. The update helper finds the folders again from the
installed exe. It then failed to find them, or found a cache other than
the one holding the update, and stopped after the launcher had quit
without starting the launcher again.
Before the launcher quits, the update now also checks that the helper
finds the cache holding the download, the staging folder and the
helper's copy. Otherwise the update stops with an error and the launcher
keeps running.
Read ProductVersion directly from Windows VERSIONINFO, including fallback string tables.
Validated by Windows and Linux tests, WASM checks, Nix evaluation, and SonarCloud.
Pin third-party actions to full-length commit SHAs (with version comments)
instead of mutable tags/branches to prevent supply-chain tampering via
retagged releases. Resolves SonarCloud rule githubactions:S7637.
* fix(windows): retry busy download renames and log Windows Installer runs
Antivirus scanners often hold a just-written installer open, so renaming
the finished .part file failed with "Access denied (os error 5)". Retry
the rename for a few seconds on Windows errors 5 and 32.
Windows Installer error 1603 carries no detail on its own: run msiexec
with a verbose log beside the package and name it in the error.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(download): honour pause and cancel while retrying a busy rename
Check the stop flag before every rename attempt, so a cancel that lands
while the checksum is being computed, or during a Windows retry backoff,
stops the download instead of installing it. A cancelled download still
throws its partial file away.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The Windows helper runs alongside the launcher and clears the marker when
it refuses an update, which it can do before update() returns. Writing the
marker after scheduling could then put it back and hide the release for
24 hours. update() now writes the marker before the swap and removes it
only when scheduling fails, so it never writes after the helper started.
The new test writes a minimal 64-bit program file that holds only a
VERSIONINFO, with ProductVersion 1.2.3 in the 040904B0 string table and
no \VarFileInfo\Translation entry, and checks that executable_version
reads 1.2.3 from it. Without the fallback string tables it reads no
version.
update wrote the just-updated marker before it scheduled the swap, so a
swap that failed to start (the Windows helper couldn't be copied or
started, an AppImage couldn't be replaced, a package install failed)
still hid that release for 24 hours. The marker is now written only when
the swap was scheduled, on every platform; a failure reaches the user
through the job's error as before and leaves the update on offer.
executable_version looked for ProductVersion only in the languages the
file's \VarFileInfo\Translation lists, so a file without that entry had
no version and its portable install was rolled back. After the listed
languages it now also tries U.S. English in UTF-16, Windows-1252 and no
code page (040904B0, 040904E4, 04090000), as .NET's FileVersionInfo does.
unpack_over copied the new files over the launcher's folder one at a
time, so a copy that failed part way (a locked file, a full disk) left new
and old files mixed, and the helper then started that mix. It now saves
each file it replaces under the staging folder and, when a copy fails,
removes the files the update added and copies the saved ones back before
it returns the error.
When a saved file can't be copied back, the saved files move to a
launcher-update-recovery-<time> folder in the cache, which later updates
leave alone, and the error names it. If that move fails, they stay in the
staging folder, and the next update refuses to run until they are moved.
Calls storytold/craft-common-actions/.github/workflows/sonarcloud.yml@main
with secrets: inherit. Adds SonarCloud badge to README where missing and
removes the redundant sonar-project.properties (config now passed by the
reusable workflow).
On Windows the launcher finished its own update with a detached
powershell.exe started with -ExecutionPolicy Bypass -WindowStyle Hidden.
The script waited for the launcher to exit, ran the new MSI or unpacked
the portable zip with Expand-Archive, deleted the download and started the
new exe. Antivirus heuristics score that sequence, and the command line
sits in the signed exe as a string.
The update helper is now a copy of the launcher itself, put in
<cache>\launcher-update-helper and started with --finish-update. It waits
for the old process with OpenProcess and WaitForSingleObject (winsafe),
runs msiexec /i /passive /norestart and checks its exit code, or unpacks
the portable zip with the checks portable app installs already use, and
then starts the launcher again. main() hands --finish-update to the helper
before logging, the single-instance claim and the window.
The helper finishes only the launcher's own update:
- the exe is this launcher's MSI or portable installation, and the
helper, the download and the staging folder are in that installation's
cache;
- the MSI, every program in the portable zip and the exe it starts carry
a valid Authenticode signature from the helper's own publisher
(verifysign, through WinTrust).
The launcher checks its own signature, the installed exe and the new MSI
before it quits, so an unsigned build reports that it doesn't install
updates instead of closing. A failed update clears the self-update marker,
so the next check offers it again, and the next start logs the error.
After unpacking a portable app, the launcher checks the exe's
ProductVersion against the release. It started a hidden powershell.exe
-NoLogo -NoProfile -NonInteractive -Command to read
FileVersionInfo.ProductVersion, which costs a PowerShell start on every
portable install and is one of the command lines antivirus heuristics
score.
executable_version now reads the ProductVersion string from the file's
VERSIONINFO with GetFileVersionInfo and VerQueryValue (winsafe), in the
first language the file lists, and no process is started.
#663 reworded the settings dialog's note to "On Linux, custom folders use
AppImage format." The meaning is unchanged, so each catalog's existing
translation is reused under the new key. The old wording is still used in
dialogs.rs, so its rows stay.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#677 added "A new version is available. Download it to replace this
version?" without catalog rows, so complete_catalogs_cover_every_ui_literal
failed on main and those languages showed English. Adds the row to all ten
complete catalogs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds .coderabbit.yaml so CodeRabbit no longer reviews or comments on PRs opened by dependabot[bot].
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Craft App releases ship <app>-<ver>-freebsd-aarch64.tar.gz next to the
x86_64 tarball, but the platform tokens had none for FreeBSD on ARM64, so
nothing was picked there and the backend's kept-download tests failed on
the nightly FreeBSD aarch64 job. Pick freebsd-aarch64 on FreeBSD ARM64 the
way freebsd-x86_64 is picked on x86_64 (no cross-arch fallback), with a
core test on SoundCraft v0.10.0's release metadata trimmed to its FreeBSD
tarballs, and add the token to the backend tests' synthetic release.
The inherited-pipe test gave its direct child one second to start a second
test process and fill both pipes; under emulation that takes longer, so
run() killed the child first and the test never reached the case it
checks. Retry with a longer deadline (1 s, 4 s, 16 s) when the child didn't
get that far, let the descendant hold the pipes for 120 s unless stopped,
and still require run() to return within twice its deadline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(linux): only update release Arch packages and delegate AUR/repo packages (#586)
- Only consider release Arch packages (bundle ID starting with 'ai.storyteller.') eligible for launcher updates.
- Keep AUR packages (<app>, <app>-bin, <app>-git) directed to the user's AUR helper (yay/paru).
- Direct repository packages (e.g. Omarchy) to 'sudo pacman -Syu' and add translations across all 10 locales.
- Only self-update launcher if installed as the release Arch package ('ai.storyteller.artcraft-launcher'), preventing conflicts on AUR installs.
- Check pacman DB presence before assuming ArchPkg availability.
* fix(linux): exclude ArchPkg from candidates for non-release Pacman installs
* i18n: add AUR update hint translations across all catalogs
* fix(linux): return empty kinds for AUR packages, preserve can_pacman fallback, and bound pacman queries
* fix(linux): tighten arch package self-update check, streamline hint message, and test deterministically
* fix(linux): require arch availability for new preferred installs
The "Build from source" section linked trunk to https://trunkrs.dev/, which no
longer serves the WAsm bundler: the domain was re-registered and now serves an
unrelated site. The bundler's own repo (trunk-rs/trunk) points at
https://trunk-rs.github.io/trunk/ in its README and in site/config.toml
(base_url), so the link now goes there. No other occurrence of the old URL in
the repo.
egui decodes the colour picture on a background thread the first time it is
asked for, so the first hover over a card showed no icon for a moment, and the
grey-card test (8 frames, no real time) failed on CI's slower Windows runner.
The grey path now starts that load, and the test waits for the decode.
* Add experimental flake.nix for NixOS/Linux development
This adds an experimental flake-based development environment and package entry for ArtCraft Launcher.
What this adds:
- `flake.nix` at the repository root
- Rust toolchain via `rust-overlay`
- Required native Linux libraries for the Rust workspace
- A dev shell via `nix develop`
- A package/app target via `nix run` / `nix build`
Why:
ArtCraft Launcher is a Rust workspace and currently has no Nix flake support. This makes local development and installation much easier for NixOS/Linux users.
Notes:
- This is intentionally minimal and experimental.
- It targets the development environment and local package use.
- Additional refinements may be needed for specific Wayland/X11 setups.
* Fix flake metadata to match ArtCraft Launcher and remove GTK dependency
* add flake.lock
* Update flake.nix: replace deprecated xorg packages with their new names
* added runtimeDependencies and fixed nativeBuildInputs: removed ninja and cmake to resolve conflicts with Cargo on app build, added autoPatchelfHook to auto hook runtimeDependencies into the RPATH of bin; added result in .gitignore to prevent build results from project
* Add X11 support libraries
Added X11 support libraries to the flake configuration.
* Nix: build the flake in CI and document nixGL for other distros
The new Nix workflow builds the flake and checks that every library
winit and wgpu dlopen() at runtime is on the binary's RUNPATH, so a
missing runtimeDependencies entry fails CI instead of failing on
`nix run`. It only runs when the flake, Cargo manifests or lockfile
change.
The README gains a short Nix section: the dev shell, `nix run`, and
nixGL for non-NixOS distros, where a Nix-built program can't load the
host's GPU drivers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Drop the local runtime-libs job; it moves to the shared Nix workflow
Per review: the build-and-RUNPATH check belongs in
storytold/craft-common-actions (opt-in check-runtime-libs), so
.github/workflows/nix.yml goes back to main's shared eval job.
---------
Co-authored-by: SaB131X <sea1024wm@gmail.com>
Co-authored-by: skylar taylor-barrick <hi@skylar.cc>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
- Only consider release Arch packages (bundle ID starting with 'ai.storyteller.') eligible for launcher updates.
- Keep AUR packages (<app>, <app>-bin, <app>-git) directed to the user's AUR helper (yay/paru).
- Direct repository packages (e.g. Omarchy) to 'sudo pacman -Syu' and add translations across all 10 locales.
- Only self-update launcher if installed as the release Arch package ('ai.storyteller.artcraft-launcher'), preventing conflicts on AUR installs.
- Check pacman DB presence before assuming ArchPkg availability.
Main's Arch package option (#565) went into the Linux install-format list in
dialogs.rs, which this branch moved to settings_dialog.rs; it is added there.