Skip to content

Commit

Permalink
Build AppImage too
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Dec 23, 2023
1 parent 3721f64 commit bbf2b6c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 4 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ jobs:
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0

- name: Install GTK4 (Ubuntu)
run: sudo apt-get install --no-install-recommends -y libgtk-4-dev
# FUSE is needed for AppImage to run
run: sudo apt-get install --no-install-recommends -y libgtk-4-dev libfuse2
if: runner.os == 'Linux'

- name: Configure GTK4 cache (Windows)
Expand Down Expand Up @@ -200,14 +201,30 @@ 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)
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # @v3.1.1
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'
Expand All @@ -217,5 +234,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'
25 changes: 23 additions & 2 deletions docs/INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`).

Expand All @@ -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

Expand Down

0 comments on commit bbf2b6c

Please sign in to comment.