Skip to content

Commit

Permalink
CI: AppImage build (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
qurious-pixel committed Jul 18, 2023
1 parent 71d9853 commit bd943c0
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,35 @@ jobs:
name: Mesen (Linux - ${{ matrix.os }} - ${{ matrix.compiler }})
path: bin/linux-x64/Release/linux-x64/publish/Mesen

appimage:
runs-on: ubuntu-20.04

steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.x

- name: Install dependencies
run: |
sudo apt-get update -qy
sudo apt-get install -qy libsdl2-dev libfuse2 # The compilers are already installed on GitHub's runners.
- name: Build Mesen (AppImage)
run: |
Linux/appimage/appimage.sh
- name: Upload Mesen (AppImage)
uses: actions/upload-artifact@v3
with:
name: Mesen (Linux x64 - AppImage)
path: Mesen.AppImage


macos:
strategy:
matrix:
Expand Down
Binary file added Linux/appimage/Mesen.48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions Linux/appimage/Mesen.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Desktop Entry]
Version=1.0
Icon=Mesen
Exec=Mesen %f
Terminal=false
Type=Application
Categories=Game;Emulator;
Name=Mesen
GenericName=Multi-system emulator
Comment=Multi-system emulator (NES, SNES, GB, PCE)
20 changes: 20 additions & 0 deletions Linux/appimage/appimage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

export PUBLISHFLAGS="-r linux-x64 --no-self-contained false -p:PublishSingleFile=true -p:PublishReadyToRun=true"
make -j$(nproc) -O LTO=true STATICLINK=true SYSTEM_LIBEVDEV=false

curl -SL https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -o appimagetool

mkdir -p AppDir/usr/bin
cp bin/linux-x64/Release/linux-x64/publish/Mesen AppDir/usr/bin
chmod +x AppDir/usr/bin
ln -sr AppDir/usr/bin/Mesen AppDir/AppRun

cp Linux/appimage/Mesen.48x48.png AppDir/Mesen.png
cp Linux/appimage/Mesen.desktop AppDir/Mesen.desktop
mkdir -p AppDir/usr/share/applications && cp ./AppDir/Mesen.desktop ./AppDir/usr/share/applications
mkdir -p AppDir/usr/share/icons && cp ./AppDir/Mesen.png ./AppDir/usr/share/icons
mkdir -p AppDir/usr/share/icons/hicolor/48x48/apps && cp ./AppDir/Mesen.png ./AppDir/usr/share/icons/hicolor/48x48/apps

chmod a+x appimagetool
./appimagetool AppDir/ Mesen.AppImage
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ CFLAGS = -fPIC -Wall $(MESENFLAGS)
OBJFOLDER := obj.$(MESENPLATFORM)
RELEASEFOLDER := bin/$(MESENPLATFORM)/Release

PUBLISHFLAGS := -r $(MESENPLATFORM) --no-self-contained true -p:PublishSingleFile=true
PUBLISHFLAGS ?= -r $(MESENPLATFORM) --no-self-contained true -p:PublishSingleFile=true

CORESRC := $(shell find Core -name '*.cpp')
COREOBJ := $(CORESRC:.cpp=.o)
Expand Down

0 comments on commit bd943c0

Please sign in to comment.