Skip to content

Let the app, AppImageUpdate and GearLever update DiscCompressor Pro (2.3.0) - #13

Merged
cursor[bot] merged 3 commits into
mainfrom
cursor/appimage-updates-da23
Sep 30, 2026
Merged

cursor[bot] merged 3 commits into
mainfrom
cursor/appimage-updates-da23

Conversation

@pwnedbygary

@pwnedbygary pwnedbygary commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

AppImageHub's test of AppImage/appimage.github.io#7753 warned that the AppImage has no update information, so AppImageUpdate and similar tools can't update it. This PR embeds that information and publishes the .zsync file next to the AppImage. It also gives the app its own updater for the installed Windows app and the AppImage.

What changes

  • Update information in the AppImage. The runtime's .upd_info section now holds gh-releases-zsync|pwnedbygary|DiscCompressor-Pro|latest|DiscCompressorPro-*-x86_64.AppImage.zsync, built from homepage in package.json. scripts/appimage-tools.mjs writes it into electron-builder's runtime before electron-builder puts the runtime at the start of the AppImage, so the block map and checksums electron-builder adds cover the final file. scripts/appimage-zsync.mjs checks the embedded text and runs zsyncmake with a relative URL. CI installs zsync, fails if the file is missing and uploads it. The release job already uploads every file in the build artifacts, so no change was needed there.
  • Built-in updater (electron-updater 6.8.10, GitHub provider). It reads latest.yml (Windows installer) or latest-linux.yml from the latest published release. electron-builder writes those files, plus app-update.yml in the app, because of the new publish section. CI checks and uploads them. electron-builder still never publishes anything itself (--publish never).
    • The status bar shows "Version X is available", "Downloading update · N%" or "Version X is ready". Clicking it opens Help → About, where a new Updates card downloads the update and restarts into it. Nothing is downloaded until the user clicks, and a downloaded update is also installed when the app quits.
    • "Restart to update" is disabled while the queue or a job is running. The main process also refuses the restart in that case.
    • The portable EXE and an AppImage in a folder the app can't write to can't replace themselves, so the card links to the release page instead. Builds run from source never check.
    • The app checks 10 s after it starts and then once a day, measured by the wall clock so sleep can't postpone it indefinitely. Settings → Updates turns this off. electron-updater normally sends a random per-install ID (x-user-staging-id) with each request; here every copy sends the same all-zero ID.
    • AppImage downloads are differential, using electron-builder's embedded block map. The Windows installer is downloaded whole, since it has no block map (differentialPackage: false, as before), and never through the web installer.
    • After installing, electron-updater starts the new AppImage while the old instance is still quitting. The new instance now waits up to 5 s for the single-instance lock instead of exiting.
  • Notices. electron-updater and its dependencies are bundled into the main process, which adds 18 packages to THIRD_PARTY_NOTICES.txt. lazy-val ships no licence file, only "license": "MIT" in its package.json, so it gets the standard MIT text with its author's name.
  • README. A new Updates section, and build notes covering the update information and zsyncmake.
  • Version 2.3.0.

Not changed:

  • glibc. AppImageHub's line "not self-contained: uses the C library of the system; references glibc 2.25" is catalog metadata, not a warning. Only Electron's own executable needs glibc 2.25 (from 2017); chdman and maxcso are static. Bundling glibc isn't done for Electron apps and would break GPU drivers.
  • The screenshot warning is fixed in #14.
  • Existing installs. 2.2.2 and earlier have no updater, so users need to update to 2.3.0 by hand once.

How it was verified

  • AppImageUpdate. --appimage-updateinformation prints the embedded text. appimageupdatetool (2.0.0-alpha-1, 2025-10-18) updated an earlier build, whose update information pointed at a local server, to the current build. It reused 119,836,672 bytes of the old file and downloaded 154,058, and the result was byte-identical to the served AppImage. The gh-releases-zsync lookup on GitHub can only be tried once a published release has the file.
  • In-app update, end to end on Linux. I built 2.3.0 and 2.3.1 AppImages with a temporary config pointing the updater at a local server. On start, 2.3.0 found 2.3.1 by itself. The status bar pill opened About, "Download update" fetched only the changed blocks, and "Restart to update" (clicked twice, to test that it only runs once) replaced the file with DiscCompressorPro-2.3.1-x86_64.AppImage and started 2.3.1, which reported "You have the latest version." I ran this again on the final code with the same result.
  • Windows. I couldn't run the NSIS update locally. CI builds the installer and checks latest.yml; the installer update path (--updated /S --force-run) and the portable/installed detection were checked in review.
  • Tests. npm run check passes with 253 tests, and each commit passes on its own. actionlint passes. New tests cover the update-support detection, every state change of the updater (including errors, running the download and install only once, the busy check, and hourly/daily scheduling across sleep), settings, IPC, and the renderer store.
  • Independent reviews (two). Their bugs are fixed: pressing install twice could delete the AppImage, and errors were labelled by the wrong step. So are their should-fix items and nits.

2.3.0 finds 2.3.1

2.3.1 downloaded, ready to restart

Restarted as 2.3.1

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

cursoragent and others added 3 commits September 30, 2026 19:15
AppImageHub asks for it, and AppImageUpdate and GearLever read it. The
runtime's .upd_info section now names the .zsync file of the latest
release's AppImage (gh-releases-zsync). It is written into
electron-builder's runtime before electron-builder puts the runtime at
the start of the AppImage and computes the AppImage's checksums.

scripts/appimage-zsync.mjs checks the embedded information and writes
the .zsync file with zsyncmake; CI installs zsync, checks that the file
was written and uploads it with the AppImage, so the release has it.

Co-authored-by: pwnedbygary <pwnedbygary@users.noreply.github.com>
The installed Windows app and the AppImage now find, download and
install new releases with electron-updater. It reads the latest.yml and
latest-linux.yml that electron-builder writes for its GitHub publish
configuration, which CI checks and uploads with the installers;
electron-builder itself still never publishes.

Nothing is downloaded without asking. The status bar says when a new
version is out, Help -> About downloads it and restarts into it, and a
downloaded update is also installed when the app quits. Restarting is
refused while jobs are running. The portable EXE, and an AppImage in a
folder the app cannot write to, link to the release page instead. The
app checks shortly after it starts and then once a day, which Settings
-> Updates turns off, and every copy sends the same staging ID.

After an update the new AppImage waits for the old instance to release
the single-instance lock. electron-updater and its dependencies are
bundled into the app, so their licences join the notices; lazy-val has
no licence file, only "MIT" in its package.json, and gets the standard
MIT text naming its author.

Co-authored-by: pwnedbygary <pwnedbygary@users.noreply.github.com>
Co-authored-by: pwnedbygary <pwnedbygary@users.noreply.github.com>
@pwnedbygary
pwnedbygary marked this pull request as ready for review September 30, 2026 19:54
@cursor
cursor Bot merged commit 51f6de1 into main Sep 30, 2026
5 checks passed
@cursor
cursor Bot deleted the cursor/appimage-updates-da23 branch September 30, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants