mirror of
https://github.com/rangermix/TwitchDropsMiner.git
synced 2026-06-04 11:29:38 +00:00
165 lines
5.3 KiB
YAML
165 lines
5.3 KiB
YAML
# Useful links:
|
||
# https://appimage-builder.readthedocs.io/en/latest/reference/recipe.html
|
||
|
||
version: 1
|
||
|
||
script:
|
||
# Clean up any previous builds.
|
||
- rm -rf "$BUILD_DIR" "$TARGET_APPDIR" || true
|
||
- mkdir -p "$BUILD_DIR" "$TARGET_APPDIR"
|
||
- cd "$BUILD_DIR"
|
||
|
||
# Build a recent version of libXft first. This fixes an issue where the app won't start with libXft 2.3.3 if an emoji font is installed on the system.
|
||
- curl -fL https://xorg.freedesktop.org/releases/individual/lib/libXft-2.3.9.tar.xz -o libXft.tar.xz
|
||
- sha256sum libXft.tar.xz
|
||
- tar xvf libXft.tar.xz
|
||
- cd libXft-*
|
||
- ./configure --prefix="$TARGET_APPDIR/usr" --disable-static
|
||
- make -j$(nproc)
|
||
- make install-strip
|
||
|
||
# Package the app.
|
||
- mkdir -p "$TARGET_APPDIR"/usr/{src,share/icons/hicolor/128x128/apps}
|
||
- cp -r "$SOURCE_DIR/../lang" "$SOURCE_DIR/../icons" "$SOURCE_DIR"/../*.py "$TARGET_APPDIR/usr/src"
|
||
- cp "$SOURCE_DIR/pickaxe.png" "$TARGET_APPDIR/usr/share/icons/hicolor/128x128/apps/io.github.devilxd.twitchdropsminer.png"
|
||
|
||
# Create a virtual environment and install up-to-date versions of meson and ninja.
|
||
- python3 -m venv env && ./env/bin/python3 -m pip install meson ninja
|
||
# Install requirements.
|
||
- PATH="$PWD/env/bin:$PATH" python3 -m pip install --prefix=/usr --root="$TARGET_APPDIR" -r "$SOURCE_DIR/../requirements.txt"
|
||
# Generate byte-code files and package them for a slightly faster app startup.
|
||
- python3 -m compileall "$TARGET_APPDIR/usr/src/"*.py
|
||
|
||
# Recursively remove ELF debug symbols, trimming roughly 10 MB off the AppDir.
|
||
- find "$TARGET_APPDIR" -type f -print0 | xargs -0 file | grep -F 'not stripped' | cut -f1 -d':' | sort -V | xargs -r strip -s -v
|
||
|
||
AppDir:
|
||
app_info:
|
||
id: io.github.devilxd.twitchdropsminer
|
||
name: Twitch Drops Miner
|
||
icon: io.github.devilxd.twitchdropsminer
|
||
version: '{{APP_VERSION}}'
|
||
exec: usr/bin/python3
|
||
exec_args: '${APPDIR}/usr/src/main.py $@'
|
||
|
||
apt:
|
||
arch:
|
||
- '{{ARCH_APT}}'
|
||
sources:
|
||
- sourceline: deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main
|
||
- sourceline: deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates main
|
||
- sourceline: deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-security main
|
||
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy main
|
||
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main
|
||
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main
|
||
key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C
|
||
|
||
include:
|
||
- gir1.2-ayatanaappindicator3-0.1
|
||
- python3-tk
|
||
|
||
exclude:
|
||
- adwaita-icon-theme
|
||
- dconf-service
|
||
- glib-networking-services
|
||
- gsettings-desktop-schemas
|
||
- hicolor-icon-theme
|
||
- humanity-icon-theme
|
||
- libavahi-client3
|
||
- libavahi-common3
|
||
- libbrotli1
|
||
- libcolord2
|
||
- libcups2
|
||
- libdb5.3
|
||
- libdconf1
|
||
- libgmp10
|
||
- libgnutls30
|
||
- libgssapi-krb5-2
|
||
- libhogweed5
|
||
- libicu66
|
||
- libjson-glib-1.0-0
|
||
- libk5crypto3
|
||
- libkrb5-3
|
||
- libkrb5support0
|
||
- liblcms2-2
|
||
- libncursesw6
|
||
- libnettle7
|
||
- libp11-kit0
|
||
- libpangoxft-1.0-0
|
||
- libpsl5
|
||
- librest-0.7-0
|
||
- libsoup2.4-1
|
||
- libsoup-gnome2.4-1
|
||
- libsqlite3-0
|
||
- libtasn1-6
|
||
- libtiff5
|
||
- libtinfo6
|
||
- libunistring2
|
||
- libwebp6
|
||
- libxft2 # We'll ship our own, updated version of this library.
|
||
- libxml2
|
||
- mime-support
|
||
- readline-common
|
||
- tzdata
|
||
- xkb-data
|
||
|
||
files:
|
||
exclude:
|
||
- etc
|
||
- usr/bin/normalizer
|
||
- usr/bin/pdb3*
|
||
- usr/bin/py3*
|
||
- usr/bin/pydoc*
|
||
- usr/bin/pygettext3*
|
||
- usr/include
|
||
- usr/lib/binfmt.d
|
||
- usr/lib/blt2.5
|
||
- usr/lib/libBLTlite.2.5*
|
||
# The next 2 files come from our own build of libXft, and they can be removed.
|
||
- usr/lib/libXft.la
|
||
- usr/lib/pkgconfig
|
||
- usr/lib/python3
|
||
- usr/lib/python3.11
|
||
- usr/lib/python3*/pydoc_data
|
||
- usr/lib/python3*/test
|
||
- usr/lib/python3*/unittest
|
||
- usr/lib/valgrind
|
||
- usr/lib/*-linux-gnu/audit
|
||
- usr/lib/*-linux-gnu/engines-3
|
||
- usr/lib/*-linux-gnu/gconv
|
||
- usr/lib/*-linux-gnu/glib-2.0
|
||
- usr/lib/*-linux-gnu/gtk-3.0
|
||
- usr/lib/*-linux-gnu/libgtk-3-0
|
||
- usr/lib/*-linux-gnu/ossl-modules
|
||
- usr/sbin
|
||
- usr/share/applications
|
||
- usr/share/binfmts
|
||
- usr/share/bug
|
||
- usr/share/doc
|
||
- usr/share/doc-base
|
||
- usr/share/gcc
|
||
- usr/share/gdb
|
||
- usr/share/glib-2.0
|
||
- usr/share/lintian
|
||
- usr/share/man
|
||
- usr/share/pixmaps
|
||
- usr/share/python3
|
||
- usr/share/themes
|
||
|
||
runtime:
|
||
env:
|
||
PATH: '${APPDIR}/usr/bin:${PATH}'
|
||
PYTHONHOME: '${APPDIR}/usr'
|
||
PYTHONPATH: '${APPDIR}/usr/lib/python3.10/tkinter:${APPDIR}/usr/lib/python3.10/site-packages'
|
||
APPDIR_LIBRARY_PATH: '${APPDIR}/usr/lib:${APPDIR}/usr/lib/{{ARCH}}-linux-gnu:${APPDIR}/lib/{{ARCH}}-linux-gnu'
|
||
TCL_LIBRARY: '${APPDIR}/usr/share/tcltk/tcl8.6'
|
||
TK_LIBRARY: '${APPDIR}/usr/lib/tcltk/{{ARCH}}-linux-gnu/tk8.6'
|
||
TKPATH: '${APPDIR}/usr/lib/tcltk/{{ARCH}}-linux-gnu/tk8.6'
|
||
|
||
AppImage:
|
||
arch: '{{ARCH}}'
|
||
file_name: Twitch.Drops.Miner-{{ARCH}}.AppImage
|
||
comp: zstd
|
||
sign-key: None
|
||
update-information: guess
|