Skip to content

Build static runtime AppImages with electron-builder#9339

Merged
FreeTubeBot merged 1 commit into
FreeTubeApp:developmentfrom
absidue:electron-builder-appimage
Jul 2, 2026
Merged

Build static runtime AppImages with electron-builder#9339
FreeTubeBot merged 1 commit into
FreeTubeApp:developmentfrom
absidue:electron-builder-appimage

Conversation

@absidue

@absidue absidue commented Jun 28, 2026

Copy link
Copy Markdown
Member

Pull Request Type

  • Other

Description

Currently we build AppImages with the old AppImage runtime with electron-builder, then in a second step we unpack those appimages and recreate them with the static runtime using appimagetool. There are a few issues with that approach firstly recent-ish releases of electron-builder received support for building AppImages with the static runtime itself (will be the default in electron-builder 27), secondly appimagetool doesn't have versionsed releases so we are currently just downloading whichever the latest version is when the workflow runs in the build and release workflows, which is not great for security and lastly it means that if you build FreeTube locally you need to manually perform those extra steps to get a static runtime AppImage of FreeTube.

This pull request switches to telling electron-builder to create static runtime AppImages and removes the extra unpack and rebuild steps. In the release workflow we were also using appimagetool to inject the AppImageUpdate update information, as that is just writing to a specific offset in the binary and calling zsyncmake it didn't seem worth keeping appimagetool just for that, so I replicated it with a few bash commands (find the offset of the .upd_info section, open the file, write the info to that offset, close the file, run zsyncmake). Even with doing those steps ourselves in bash it still speeds up the workflow as that only takes 1 second, whereas the previous extra steps averaged around 40 seconds).

Also yes the node eval call is a bit silly but I did try to use objcopy and dd to write the update information but both resulted in appimageupdatetool saying that the AppImage was corrupted, so I went with that node JavaScript line instead.

Testing

I don't have a Linux machine to test if the AppImage runs correctly (I would assume so but it is probably still worth testing), so if someone with a Linux VM could test the AppImage (just check if it launches) from the linked build workflow that would be very helpful.

Desktop

  • OS: Windows
  • OS Version: 11

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) June 28, 2026 16:15
@github-actions github-actions Bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jun 28, 2026

@PikachuEXE PikachuEXE left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Launched in a linux VM (using Build workflow run afterwards

@FreeTubeBot FreeTubeBot merged commit 7e1cdef into FreeTubeApp:development Jul 2, 2026
6 checks passed
@github-actions github-actions Bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jul 2, 2026
@absidue absidue deleted the electron-builder-appimage branch July 2, 2026 10:12
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.

5 participants