~hristoast/mgba-appimage

470f93d211d37e7c418f2a81025a31f894b96ee9 — Hristos N. Triantafillou 1 year, 8 months ago e68c33b
Add AppStream data
3 files changed, 32 insertions(+), 5 deletions(-)

M Dockerfile
M Makefile
M make-appimage.sh
M Dockerfile => Dockerfile +1 -1
@@ 6,7 6,7 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
    apt-get upgrade -y && \
	apt-get install -y \
    cmake curl fuse g++ git make \
    appstream cmake curl fuse g++ git make \
    libavcodec-dev libavfilter-dev libavformat-dev libavresample-dev libavutil-dev libpostproc-dev libswresample-dev libswscale-dev \
    libedit-dev libelf-dev libepoxy-dev libminizip-dev libpng-dev libsdl2-dev libsqlite3-dev libzip-dev \
    libqt5multimedia5-plugins qt5-default qtbase5-dev qtmultimedia5-dev

M Makefile => Makefile +4 -1
@@ 1,6 1,9 @@
.DEFAULT_GOAL: all

all: build run
all: clean build run

clean:
	rm -frv ./out/*

build:
	docker build -t mgbaappimage:0 .

M make-appimage.sh => make-appimage.sh +27 -3
@@ 1,10 1,11 @@
#!/usr/bin/env bash
set -ex
set -x
export VERSION="${mgba_version}"

# Now create the AppImage
mkdir -p /AppDir/usr/{bin,lib,share}
mkdir -p /AppDir/usr/share/mgba
mkdir /AppDir/usr/share/metainfo

# Assemble the AppDir
cp /src/build/qt/mgba-qt /AppDir/usr/bin/


@@ 14,13 15,36 @@ cp /src/res/nointro.dat /AppDir/usr/share/mgba/
#TODO: how to make packed shaders visible?
# cp -r /src/res/shaders /AppDir/usr/share/mgba/

cat > /AppDir/usr/share/metainfo/io.mgba.qt.appdata.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
	<id>io.mgba.qt</id>
	<metadata_license>MIT</metadata_license>
	<project_license>MPL-2.0</project_license>
	<name>mGBA</name>
	<summary>mGBA is an emulator for running Game Boy Advance games</summary>
	<description>
		<p>mGBA is an emulator for running Game Boy Advance games. It aims to be faster and more accurate than many existing Game Boy Advance emulators, as well as adding features that other emulators lack. It also supports Game Boy and Game Boy Color games.</p>
	</description>
	<launchable type="desktop-id">io.mgba.qt.desktop</launchable>
	<url type="homepage">https://mgba.io/</url>
	<provides>
		<id>io.mgba.qt</id>
	</provides>
</component>
EOF

mv /src/res/mgba-qt.desktop /src/res/io.mgba.qt.desktop

# Make it
/linuxdeploy-x86_64.AppImage \
    --appdir=/AppDir --output=appimage \
    --desktop-file=/src/res/mgba-qt.desktop \
    --desktop-file=/src/res/io.mgba.qt.desktop \
    --deploy-deps-only=/AppDir/usr/bin \
    --icon-file=/src/res/mgba.png \
    --plugin=qt > linuxdeploy.log

# Copy stuff to the expected out dir
cp  -r /src/res/shaders mGBA-${mgba_version}-x86_64.AppImage linuxdeploy.log /mnt/
mv linuxdeploy.log /mnt/
mv /src/res/shaders /mnt/
mv mGBA-${mgba_version}-x86_64.AppImage /mnt/