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.