Skip to content

Conversation

@derspotter
Copy link

This PR implements a self-update mechanism for the Linux AppImage.

Changes:

  • Added AppImageUpdater class (inherits OCUpdater) to handle AppImage-specific update logic.
  • Implemented detection of AppImage environment (APPIMAGE env var).
  • Added manual handling of 302 Found redirects to support GitHub Releases downloads.
  • Added buffer clearing logic to prevent binary corruption when servers send HTML bodies with redirects.
  • Implemented a temporary bash script mechanism to replace the running AppImage file and restart the application.
  • Updated Updater::create factory to instantiate AppImageUpdater on Linux when applicable.
  • Updated CMakeLists.txt and build-appimage.sh to include the new files and ensure clean builds.

Fixes:

  • Fixes issues where the updater would not follow GitHub release redirects.
  • Fixes binary corruption issues caused by writing redirect responses to the file.
  • Enables seamless updates for AppImage users.

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.

1 participant