diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 7ef0986c1..778d8b060 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -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: | @@ -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" diff --git a/src/res/io.github.legacyclonk.LegacyClonk.desktop b/src/res/io.github.legacyclonk.LegacyClonk.desktop new file mode 100644 index 000000000..318d5c995 --- /dev/null +++ b/src/res/io.github.legacyclonk.LegacyClonk.desktop @@ -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 diff --git a/tools/make_AppImage.sh b/tools/make_AppImage.sh new file mode 100755 index 000000000..2d6bd2626 --- /dev/null +++ b/tools/make_AppImage.sh @@ -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