diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 71ee0cf..d9d4a2c 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -18,9 +18,9 @@ jobs: name: Build AppImage arch: x86_64 # comment out these 3 lines if aarch64 is not wanted - #- runs-on: ubuntu-24.04-arm - # name: Build AppImage - # arch: aarch64 + - runs-on: ubuntu-24.04-arm + name: Build AppImage + arch: aarch64 container: ghcr.io/pkgforge-dev/archlinux:latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/AppDir/bin/tauon b/AppDir/bin/tauon index 90062d7..a5edef1 100755 --- a/AppDir/bin/tauon +++ b/AppDir/bin/tauon @@ -1,13 +1,41 @@ #!/bin/sh -export SDL_BINARY_PATH="$APPDIR"/shared/lib +export SDL_BINARY_PATH="$APPDIR"/lib + if [ "$1" = '--no-start' ]; then - case "$2" in - --play) exec curl http://localhost:7813/play/;; - --play-pause) exec curl http://localhost:7813/playpause/;; - --pause) exec curl http://localhost:7813/pause/;; - --stopcurl) exec curl http://localhost:7813/stop/;; - --next) exec curl http://localhost:7813/next/;; - --previous) exec curl http://localhost:7813/previous/;; - esac + shift fi + +case "$1" in + --play|play) + exec curl http://127.0.0.1:7813/play + ;; + --pause|pause) + exec curl http://127.0.0.1:7813/pause + ;; + --playpause|--play-pause|playpause|play-pause) + exec curl http://127.0.0.1:7813/playpause + ;; + --stop|--stopcurl|stop|stopcurl) + exec curl http://127.0.0.1:7813/stop + ;; + --next|--advance|next|advance) + exec curl http://127.0.0.1:7813/next + ;; + --previous|--prev|--back|previous|prev|back) + exec curl http://127.0.0.1:7813/previous + ;; + --raise|raise) + exec curl http://127.0.0.1:7813/raise + ;; + --reloadtheme|reloadtheme) + exec curl http://127.0.0.1:7813/reloadtheme + ;; + --shuffle|shuffle) + exec curl http://127.0.0.1:7813/shuffle + ;; + --repeat|repeat) + exec curl http://127.0.0.1:7813/repeat + ;; +esac + exec tauonmb "$@" diff --git a/get-dependencies.sh b/get-dependencies.sh index 3a9cfee..7e018a3 100644 --- a/get-dependencies.sh +++ b/get-dependencies.sh @@ -7,13 +7,53 @@ ARCH=$(uname -m) echo "Installing package dependencies..." echo "---------------------------------------------------------------" pacman -Syu --noconfirm \ - tauon-music-box \ - pipewire-audio pipewire-jack \ - p7zip unrar \ - opusfile mpg123 flac libvorbis wavpack \ - libgme libnotify \ - python-jxlpy python-pypresence python-tekore python-plexapi python-pychromecast python-tidalapi python-opengl \ - libimagequant openjpeg2 + cargo \ + flac \ + libappindicator \ + libgme \ + libimagequant \ + libnotify \ + libopenmpt \ + libprojectm \ + libsamplerate \ + libvorbis \ + mpg123 \ + opencc \ + openjpeg2 \ + opusfile \ + p7zip \ + pipewire-audio \ + pipewire-jack \ + pkgconf \ + python-beautifulsoup4 \ + python-build \ + python-cairo \ + python-dbus \ + python-gobject \ + python-installer \ + python-jxlpy \ + python-musicbrainzngs \ + python-mutagen \ + python-natsort \ + python-opengl \ + python-pillow \ + python-plexapi \ + python-pychromecast \ + python-pylast \ + python-pypresence \ + python-pysdl3 \ + python-rapidfuzz \ + python-requests \ + python-send2trash \ + python-setproctitle \ + python-tekore \ + python-tidalapi \ + python-unidecode \ + python-websocket-client \ + sdl3_image \ + unrar \ + wavpack \ + xdg-utils echo "Installing debloated packages..." echo "---------------------------------------------------------------" @@ -22,12 +62,43 @@ get-debloated-pkgs --add-common --prefer-nano ffmpeg-mini # Comment this out if you need an AUR package #make-aur-package tauon-music-box-git -# If the application needs to be manually built that has to be done down here +echo "Building tauon-music-box..." +echo "---------------------------------------------------------------" +git clone --recursive https://github.com/Taiko2k/Tauon.git ./Tauon && ( + cd ./Tauon + + git fetch --tags origin + TAG=$(git tag --sort=-v:refname | grep -vi 'pre\|rc\|alpha\|beta' | head -1) + git checkout "$TAG" + git submodule update --init --recursive + echo "${TAG#v}" > ~/version + + sed -i 's|com.github.taiko2k.tauonmb.desktop|tauonmb.desktop|' extra/com.github.taiko2k.tauonmb.appdata.xml + + python -m build --wheel + + # Tiny Rust binary that calculates LRCLIB challenges + ( + cd src/lrclib-solver + export RUSTUP_TOOLCHAIN=stable + export CARGO_TARGET_DIR=target + cargo fetch --locked --target host-tuple + CFLAGS="${CFLAGS-} -fno-lto" cargo build --frozen --release --all-features + ) + + python -m installer --destdir=/ dist/*.whl + + for dir in src/tauon/locale/*; do + install -Dm644 \ + "${dir}/LC_MESSAGES/"*.mo \ + -t "/usr/share/locale/$(basename "${dir}")/LC_MESSAGES" + done + + install -Dm644 extra/tauonmb-symbolic.svg -t /usr/share/icons/hicolor/symbolic/apps + site_packages=$(python -c "import site; print(site.getsitepackages()[0])") + install -Dm755 src/lrclib-solver/target/release/lrclib-solver "${site_packages}/tauon/lrclib-solver" +) -# if you also have to make nightly releases check for DEVEL_RELEASE = 1 -# -# if [ "${DEVEL_RELEASE-}" = 1 ]; then -# nightly build steps -# else -# regular build steps -# fi +mkdir -p ./AppDir +cp -v ./Tauon/extra/tauonmb.desktop ./AppDir +cp -v ./Tauon/extra/tauonmb.svg ./AppDir diff --git a/make-appimage.sh b/make-appimage.sh index dba3c6d..f810bf5 100644 --- a/make-appimage.sh +++ b/make-appimage.sh @@ -3,16 +3,13 @@ set -eu ARCH=$(uname -m) -VERSION=$(pacman -Q tauon-music-box | awk '{print $2; exit}') # example command to get version of application here -export ARCH VERSION +export ARCH export OUTPATH=./dist export ADD_HOOKS="self-updater.hook" export UPINFO="gh-releases-zsync|${GITHUB_REPOSITORY%/*}|${GITHUB_REPOSITORY#*/}|latest|*$ARCH.AppImage.zsync" -export ICON=/usr/share/icons/hicolor/scalable/apps/tauonmb.svg -export DESKTOP=/usr/share/applications/tauonmb.desktop -export DEPLOY_SYS_PYTHON=1 +export DEPLOY_PYTHON=1 export DEPLOY_PIPEWIRE=1 -export DEPLOY_OPENGL=1 +export USE_HOST_DRIVERS_EXPERIMENTAL=1 export DEPLOY_SDL=1 # fix bug making the app assume that it can write to its site-package dir @@ -21,18 +18,17 @@ find /usr/lib/python*/site-packages \ # Deploy dependencies quick-sharun \ - /usr/bin/tauonmb \ - /usr/bin/ffmpeg \ - /usr/lib/libgtk-3.so* \ - /usr/lib/libgme.so* \ - /usr/lib/libwavpack.so* \ - /usr/lib/libnotify.so* \ - /usr/lib/libopenmpt.so* \ - /usr/lib/libvorbisfile.so* \ - /usr/lib/libopusfile.so* \ - /usr/lib/libsamplerate.so* \ - /usr/lib/libkissfft-float.so* \ - /usr/lib/libimagequant.so* \ + /usr/bin/tauonmb \ + /usr/bin/ffmpeg \ + /usr/lib/libgtk-3.so* \ + /usr/lib/libgme.so* \ + /usr/lib/libwavpack.so* \ + /usr/lib/libnotify.so* \ + /usr/lib/libopenmpt.so* \ + /usr/lib/libvorbisfile.so* \ + /usr/lib/libopusfile.so* \ + /usr/lib/libsamplerate.so* \ + /usr/lib/libimagequant.so* \ /usr/lib/libopenjp2.so* # Additional changes can be done in between here