Skip to content

Commit

Permalink
Autobuilds: Create AppImage for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmitti committed Jun 11, 2023
1 parent feb3d86 commit 4def4e6
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ jobs:
cd build
cp clonk c4group ../output
- name: "Linux: Create AppImage"
if: ${{ matrix.env == 'Linux' }}
run: |
tools/make_AppImage.sh
- name: "Mac: Create Bundle"
if: ${{ matrix.env == 'Mac' }}
run: |
Expand Down Expand Up @@ -152,6 +157,7 @@ jobs:
if: ${{ matrix.env == 'Linux' }}
run: |
cd output
mv clonk.AppImage clonk
tar czf LegacyClonk-$CONFIG_SUFFIX.tar.gz *
- name: "Pack: Mac"
Expand Down
23 changes: 23 additions & 0 deletions src/res/io.github.legacyclonk.LegacyClonk.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[Desktop Entry]
Name=LegacyClonk
Type=Application
Comment=A highly versatile multiplayer game of strategy, action, skill, and endless fun.
Icon=legacyclonk
Categories=Game;ActionGame;
MimeType=application/x-vnd.clonk.c4key;application/vnd.clonk.c4group;application/vnd.clonk.c4group.definition;application/vnd.clonk.c4group.folder;application/vnd.clonk.c4group.player;application/vnd.clonk.c4group.update;application/vnd.clonk.c4group.scenario;x-scheme-handler/clonk;
StartupNotify=true
StartupWMClass=LegacyClonk
Exec=clonk %u
Actions=join;lobby;console;

[Desktop Action join]
Name=Join Game
Exec=clonk /startup:net

[Desktop Action lobby]
Name=Create Lobby
Exec=clonk /startup:netscen

[Desktop Action console]
Name=Developer Mode
Exec=clonk /console
12 changes: 12 additions & 0 deletions tools/make_AppImage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -e

LINUXDEPLOY_VERSION=1-alpha-20220822-1

curl -L -o linuxdeploy "https://github.com/linuxdeploy/linuxdeploy/releases/download/$LINUXDEPLOY_VERSION/linuxdeploy-x86_64.AppImage"
curl -L -O "https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh"
chmod +x linuxdeploy linuxdeploy-plugin-gtk.sh

convert -resize 512x512 src/res/lc.png legacyclonk.png

OUTPUT=output/clonk.AppImage ./linuxdeploy --plugin gtk --desktop-file=src/res/io.github.legacyclonk.LegacyClonk.desktop --icon-file=legacyclonk.png --appdir=AppDir --executable=build/clonk --output=appimage

0 comments on commit 4def4e6

Please sign in to comment.