Build static runtime AppImages with electron-builder#9339
Merged
FreeTubeBot merged 1 commit intoJul 2, 2026
Conversation
PikachuEXE
approved these changes
Jun 29, 2026
PikachuEXE
left a comment
Member
There was a problem hiding this comment.
Launched in a linux VM (using Build workflow run afterwards
efb4f5ff-1298-471a-8973-3d47447115dc
approved these changes
Jun 29, 2026
ChunkyProgrammer
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Type
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_infosection, 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
objcopyandddto 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