CI: AppImage build (#25)

This commit is contained in:
qurious-pixel 2023-07-18 02:03:03 -07:00 committed by GitHub
parent 71d985344c
commit bd943c0aff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 60 additions and 1 deletions

View file

@ -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:

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

View file

@ -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
Linux/appimage/appimage.sh Executable file
View file

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

View file

@ -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)