From f4ff5e2b9ad35f812da8c1125950d51fa8fe57c5 Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Sat, 23 Dec 2023 03:28:58 +0200 Subject: [PATCH] Build AppImage too --- .github/workflows/release.yml | 18 +++++++++++++++++- docs/INSTALLATION.md | 25 +++++++++++++++++++++++-- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a9f966c7..18b383e1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -200,7 +200,22 @@ jobs: - name: Package (Linux) run: | + # Build Debian package cargo deb --target ${{ matrix.build.target }} --profile production --no-build --no-strip + + # And build AppImage as well + wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage + chmod +x linuxdeploy*.AppImage + NO_STRIP=1 ./linuxdeploy-x86_64.AppImage \ + --appdir AppDir \ + --executable target/${{ matrix.build.target }}/production/space-acres \ + --desktop-file res/linux/space-acres.desktop \ + --icon-file res/linux/space-acres.png \ + --output appimage + + # Rename AppImage to be consistent with other files + version=$(grep -Po 'version = "\K.*?(?=")' -m 1 Cargo.toml) + mv Space_Acres-x86_64.AppImage space-acres-$version-x86_64.AppImage if: runner.os == 'Linux' - name: Upload installer to artifacts (Linux) @@ -208,6 +223,7 @@ jobs: with: name: installer-${{ matrix.build.suffix }} path: | + space-acres-*.AppImage target/${{ matrix.build.target }}/debian/*.deb if-no-files-found: error if: runner.os == 'Linux' @@ -217,5 +233,5 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} with: - asset_paths: '["target/${{ matrix.build.target }}/debian/*.deb"]' + asset_paths: '["space-acres-*.AppImage", "target/${{ matrix.build.target }}/debian/*.deb"]' if: runner.os == 'Linux' && github.event_name == 'push' && github.ref_type == 'tag' diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md index 357b9d85..652ac177 100644 --- a/docs/INSTALLATION.md +++ b/docs/INSTALLATION.md @@ -59,6 +59,12 @@ for your architecture (most likely X64). ## Linux +Currently, there are two ways to get Space Acres on Linux: +* by installing `.deb` package on Ubuntu +* by running `.AppImage` bundle directly on any modern Linux distribution (including Ubuntu if you want to) + +### Ubuntu + For **Ubuntu 22.04 or newer** (older versions not supported) go to [the latest release](https://github.com/nazar-pc/space-acres/releases/latest) and download attached file with `.deb` extension for your architecture (most likely `amd64`). @@ -72,9 +78,24 @@ Replace `Downloads` with correct name of downloads directory if you have non-Eng downloaded file into a custom location. In case you have multiple versions of Space Acres downloaded, you might want to replace `space-acres*.deb` with a full name of the file you've downloaded. -There are no official packages for other Linux distributions yet and if you build from source you hopefully know what +### Other Linux + +For other distributions AppImage is available too, go to [the latest release](https://github.com/nazar-pc/space-acres/releases/latest) and download attached +file with `.AppImage` extension for your architecture (most likely `x86_64`). + +Then open terminal and run following commands to switch to downloads directory and make it executable: +```bash +cd Downloads +chmod +x space-acres-*.AppImage +``` + +After this either use `./space-acres-*.AppImage` in the terminal or double-click on the file in the file manager to open +the app. In case you have multiple versions of Space Acres downloaded, you might want to replace +`space-acres-*.AppImage` with a full name of the file you've downloaded. + +There are no other Linux packages at the moment and if you build from source you hopefully know what you are doing. -Consider [contributing to Linux packaging](https://github.com/nazar-pc/space-acres/issues/6) though! +Consider contributing to Linux packaging though! ## macOS