spacedrive/scripts/appimage
Vítor Vasconcellos 556ddbd4f8
Port AppImage build to use appimage-builder (#1785)
* Initial port to appimage-builder

* Almost

* Fix appimage build on arm64

* Custom patch for external binaries run under appimage
 - Disable bubblewrap sandbox when running under appimage
 - Change cwd to APPDIR when running under appimage

* AppImage Works (for the first lunch, then it crashes with Stack Smash 😭)

* Fix stack smashing, now AppImage almos fully works \o/ (gstreamer is still broken)
 - Temporarily disable the volume watcher when running under appimage (Workaround for the stack smash error)
 - Wrap gnu lic version check for appimage under conditional compile for glibc targets
 - Add error handling for the justUpdatedCheck
 - Fix VITE_LANDING_ORIGIN being undefined

* On non glibc systems default to runtime/compat

* Use glibc version 2.8 instead of 0 for non-gnu systems

* Fix video playback not working due to broken GstRegistry

* Build and publish new AppImage release artifact
 - Fix model location when building deb
 - Improve model path resolution logic
 - Remove patchelf dependency from setup script
 - Fix incorrectly ignore gstreamer dependency in AppImage recipe

* Fix clippy complaining about `get_path_relative_to_exe`
 - Read GLIBC_FAKE_VERSION or use 2.8 for musl in appimage (while the code is there, this is not really supported for now)

* Remove appimage tauri target from release CI

* Remove setup-buildx-action, not relly needed

* typo fix

* Fix git describe command running on cwd instead of the repo root dir

* Attempt fix weird git permissions errors in CI+docker

* Pass CI env to docker appimage

* Only use git after installing it

* Pass target to appimage build script

* Fix permission after creating appimage

* -_-

* Swap envvar with github ci var

* Format

* Add instruction on how to manually build an AppImage

* Fix typos

* docs: add note about running podman with `--privileged` if there's a permission denied error

* docs: fix typo and link directly to appimage-building `README.md`

* refactor: streamline code and make it a bit cleaner

---------

Co-authored-by: jake <77554505+brxken128@users.noreply.github.com>
2024-01-22 10:52:26 +00:00
..
.gitignore Port AppImage build to use appimage-builder (#1785) 2024-01-22 10:52:26 +00:00
AppImageBuilder.yml Port AppImage build to use appimage-builder (#1785) 2024-01-22 10:52:26 +00:00
build_appimage.sh Port AppImage build to use appimage-builder (#1785) 2024-01-22 10:52:26 +00:00
README.md Port AppImage build to use appimage-builder (#1785) 2024-01-22 10:52:26 +00:00

AppImage build script and files

This directory contains the script and recipe to build an AppImage from a Spacedrive .deb using appimage-builder.

Instructions (Requires a Linux environment)

  • Install one of the following container runtimes:

  • Set up your development environment following the steps in the CONTRIBUTING guide

  • Build a production release of Spacedrive by invoking pnpm tauri in a terminal window inside the Spacedrive repository root

    After the build finishes you should end up with a .deb archive in target/release/bundle/deb

  • Change your current work directory to scripts/appimage

  • Execute the build_appimage.sh script inside a debian:bookworm container

    • Podman: podman run --rm -v "$(CDPATH='' cd ../.. && pwd -P):/srv" -w /srv debian:bookworm scripts/appimage/build_appimage.sh

      • You may have to run Podman with podman run --privileged if you get a permission denied error
    • Docker: docker run --rm -v "$(CDPATH='' cd ../.. && pwd -P):/srv" -w /srv debian:bookworm scripts/appimage/build_appimage.sh

      If you are running a system with selinux enforcing you will need mount the /srv volume with the Z flag to avoid Permission denied errors. more info

    After the script finishes you should end up with an .AppImage executable in target/release/bundle/appimage