A failed check wiped a candidate whose artifact was already verified, a
prefetch that could not start left the user with no way to skip, and
refusing an install closed the notification and the poll, so the update
disappeared until the next start. Keep the candidate on a failed check,
offer the dialog for a flavour that installs from the browser, and let a
refused install leave the notification and the poll in place.
The prefetch and the install helper shared one handoff file, so either
could consume or delete the other's job; the pending record was shared
between installs. Key both per install and per job, and leave the log to
accumulate across runs instead of truncating it at every start.
The helper held the install lock while it started the new build, whose
own startup could not then settle the records. Release it before the
launch. A launch that failed after a good install no longer rolls the
install back or deletes its record, a cancel before the swap reports a
cancel rather than a failure, and closing the completed helper window no
longer frees the widgets under the queued completion.
Cap the download at the size the release announces, so a redirected body
cannot fill the disk before the digest check.
A stale digest from a downgraded build hid every newer release; trust it
only while the release is not newer, except on Nightly, whose version is
its release timestamp. A JSON integer above INT64_MAX no longer throws.
Check the fresh-install rename instead of the resulting folder, which an
existing executable satisfies; pass the signing shell and script as
separate defines so a path with spaces survives; fall back to the
CMakeCache pin when the signing stamp is compared without the ORCA_
variables set.
The updater installed a prefetched build when the application quit, so an
update happened with no click and no visible moment. Now the startup check
only prefetches, a persistent notification opens the dialog once the helper
has verified the artifact, and the dialog's install button is the only path
to the helper. Install-at-quit and the helper's --install-only mode are gone.
Readiness is the helper's verified marker bound to the artifact digest, not
the file name: the helper renames before verifying, and a nightly reuses one
asset name. Skip deletes the cached artifact under a per-download lock.
Installing an update while the automatic prefetch was still writing the same
.part resumed it in a second process, so the digest failed, and Windows could
not even extract the helper. The manual path now waits for a download this run
started, a complete .part is taken as done, and a helper folder that is busy is
reused instead of deleted.
A release build could ship without the publisher or team id it pins, and the
helper would then accept anything the OS trusts. Configure fails for a release
build without the pin its platform needs, and the macOS package compares what
the helper was built with against the pins it ships under.
The Windows installer deleted the old tree before it wrote the new one, so a
failure left no application and no way to report it. It stages the whole tree
beside the target, verifies it, and swaps it in, reporting 1 for a missing
token, 2 for nothing written and 3 for a tree removed but not replaced. Before
handing a tree to an elevated installer the helper requires that it resolve to
the recorded path, carry no reparse point, and hold an uninstaller signed by the
pinned publisher.
The installed channel is keyed by install root like the digest, and a build
installed by hand infers its channel from its version, so a channel switch no
longer needs a previous in-app install. An inferred switch never takes a
candidate that sorts lower: a hand-installed 2.6.0-rc1 is no longer replaced by
an older stable at quit with nothing shown.
Downloads, the extracted helper and the handoff are per install, so two copies
sharing one cache stop deleting each other's artifact and overwriting each
other's job. A download whose bytes are wrong is dropped; one that cannot be read
is set aside rather than failing every start.
A declined dialog disarms the quit-time install, a check that finds nothing
clears the candidate, and flavours that cannot install in place are told about a
release instead of being ignored. A macOS swap exchanges the bundle in one step
where the filesystem allows it, and a cleanup this user cannot perform is logged
instead of retried forever.
The background check no longer opens the update dialog. What to do with a
candidate is a pure decision now (update_action), so it can be tested: an
automatic check prefetches, a check the user started keeps its dialog and
installs at once, and a skipped version stays quiet unless the user asked.
The helper downloads while the application runs and exits; a second run at
quit installs from the verified file. Prefetch therefore takes no lock and
installs nothing, so it cannot race the run that follows it, and the install
that runs after a quit does not start the application again. A failure leaves
update_failed.txt, which the next start shows as a notification: an update
that asks nothing has no other way to report itself. The artifact a prefetch
left behind is now kept by prepare_download_dir instead of being swept and
downloaded again.
The Windows installer is no longer CPack's. CPack hardcodes
RequestExecutionLevel admin and installs to Program Files, so every update
needed a UAC prompt. packaging/windows/orca-slicer.nsi requests the user's
own level and picks the scope at start: a machine-wide install recorded in
the HKLM uninstall key is replaced under Program Files by the elevated helper
it already runs as, and a fresh install goes to LOCALAPPDATA, where an update
needs no elevation at all. The helper now decides that elevation by probing
the install root, and only asks for it when the tree is not writable. Both
registry views are checked, because installers built before this were 32-bit.
A failed install now sets an error level: a silent update reads the exit code,
and an Abort without one looked like success.
The helper accepted any trusted Authenticode signer on Windows and any
Developer ID signature on macOS, so once an update installs without asking,
nothing said whose build it was. The signer display name and the Apple team
ID are compiled in now and come from the CI signing material: the Windows
publisher is read from the certificate that signs the installer, so the two
cannot drift. An empty value keeps the old behaviour with a warning, which
is what a local build and an unsigned PR artifact want.
installed_artifact was one value per user, so two copies of the application
- a Program Files install and a per-user one, or two channels - overwrote
each other's digest and each read the other's identity. It is keyed by a
hash of the install root now, and a value recorded before the change moves
to the running root on first start.
finish_pending_update() only ran when the preset updater existed, so a
G-code viewer start never restored a backup or consumed the install record.
It runs from every start.
The macOS helper mounted the image on a path named after its pid in
world-writable /tmp, which another local user could create first. mkdtemp
names it, inside the cache.
The lock file recorded its holder's pid, but a held byte-range lock denies
reads through any other handle on Windows, so the pid could not be read
while it mattered: the tests saw "" where the pid should be, and neither
the application nor the helper reads it - the helper waits on
handoff.parent_pid.
The lock now only excludes. Its file stays empty, the Windows lock sits at
offset 0 without a write, and both branches still truncate, so a file left
by an older build loses its stale pid.
The two lock tests assert the properties they exist for: a second taker is
refused while the first holds it, and a file left by a dead process is
taken over and removed.
is_release_download_url was a prefix test, so a URL with ../ segments
passed it and curl collapsed them into another repository's path. It now
takes the asset name and accepts only <prefix><tag>/<asset_name> made of
plain characters, and the downloader sets CURLOPT_PATH_AS_IS.
The install lock took over a stale pid file with a read, a remove and a
create, so two takers could both win, and the file existed empty before
the pid was written. It now holds flock/LockFileEx on an open handle for
the life of the process; the OS drops it when the holder exits.
On Windows the helper waited only for the parent process. A second
OrcaSlicer running from the install folder kept files locked, and the
silent NSIS installer uninstalled first and then failed. The helper now
waits up to 30 s for such processes and refuses before anything changes.
A nightly installed by hand has no recorded digest and was compared with
the release's updated_at, which follows the last asset upload, so it was
offered itself on every check. The release now has to be more than six
hours newer than the build.
The update dialog was destroyed twice when the updater failed to start:
it lived on the stack while the main frame, its parent, was deleted.
It is now scoped before the install starts.
The install record names the install it belongs to, and only that copy
consumes it. It is read first and deleted after the install lock is
taken, so a held lock no longer leaves the download in the cache.
On macOS a user who cannot write the target's parent folder had no way
to stage the new bundle. It is staged in the cache and copied in by the
single administrator step.
On Windows Boost.Filesystem reads a narrow path as the ANSI code page
unless nowide_filesystem() has run, while the handoff write goes through
nowide. The test created the cache directory under one name and wrote
into another. Do what the app does at startup.
The helper exited before reading its handoff because wx's command-line
parser rejected --handoff. Windows portable updates failed on tar.exe
lookup, a working directory inside the install, and the nightly zip's
top-level folder. The AppImage helper now ships with its own libraries.
- Restrict downloads to https GitHub release URLs, verify TLS on the
version check, set CA certificates and FAILONERROR in the downloader.
- Rename the verified download to its asset name, hold it open on
Windows, and relaunch the app when an update fails before the swap.
- Use nowide paths in the helper for non-ASCII Windows user names.
- Roll back by renaming the new tree aside; stage Linux copies beside
the target; drop the predictable macOS marker file.
- Require $APPDIR for AppImage detection; reject read-only macOS volumes.
- Check for updates once after Preferences closes, and drop stale results.
- Offer releases without a matching asset, key Nightly skips by version,
and let Pre-Release offer a newer final release.
- Find pending.json from a .backup copy and keep the backup unless the
new build is running from the target.
- Move the build timestamp into its own generated header so it no
longer invalidates ccache on every CI run.
posix_spawn takes environ from unistd.h on Linux, but Apple platforms keep
it behind _NSGetEnviron() from crt_externs.h, so the macOS build did not
compile.
libcurl's peer.c calls if_nametoindex, which lives in iphlpapi; the helper
is the only target that links libcurl without that library, so it failed
to link on Windows.
The test for dropping another build's partial download asserted the
digest marker was gone, but prepare_download_dir rewrites the marker for
the new build before it downloads, as the next test in the file requires.
Assert the marker now names the new build.
The updater wrote everything it needed under the data directory: the
cache, its records, the downloaded artifact and the extracted helper.
Move the whole root to the OS cache directory, and give a portable
Windows install a suffixed folder there instead of %TEMP%, so a temp
sweep cannot strand a partial download.
Now that a finished install leaves nothing to resume, the next start
deletes the download and each helper run starts a fresh log, so neither
grows by one copy per update.
A partial download is resumed only for the build it was started for: the
digest is recorded beside it, and a .part already as large as the
release is verified again instead of being fetched a second time.
The download preparation lives in libslic3r so it can be tested, with
cases for a matching build, another build, a missing record, an
oversized file, a complete file and a sibling artifact.