From daa7bc624906a58e1b8f98da58986fc7e7a57ff3 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Wed, 4 Sep 2024 01:14:38 -0400 Subject: [PATCH 01/24] Update mpv-AppImage.sh --- mpv-AppImage.sh | 77 ++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 46 deletions(-) diff --git a/mpv-AppImage.sh b/mpv-AppImage.sh index e8f7e21..dabaf07 100644 --- a/mpv-AppImage.sh +++ b/mpv-AppImage.sh @@ -1,55 +1,40 @@ #!/bin/sh -# THIS SCRIPT BUILDS MPV DEPENDENCIES AND MPV STATICALLY USING THIS: https://github.com/mpv-player/mpv-build +# dependencies: +# meson cmake automake ninja ninja-build vulkan-headers freetype-dev libass-dev +# fribidi-dev harfbuzz-dev yasm libx11 libx11-dev libxinerama-dev libxrandr-dev +# libxscrnsaver libxscrnsaver-dev xscreensaver-gl-extras jack libpulse pulseaudio-dev +# rubberband libcaca mesa-egl libxpresent-dev lua5.3-dev libxcb-dev desktop-file-utils + set -u export ARCH=x86_64 export APPIMAGE_EXTRACT_AND_RUN=1 -APP=mpv -APPDIR="$APP".AppDir REPO="https://github.com/mpv-player/mpv-build.git" -EXEC="$APP" -APPIMAGETOOL=$(wget -q https://api.github.com/repos/probonopd/go-appimage/releases -O - | sed 's/[()",{} ]/\n/g' | grep -oi 'https.*continuous.*tool.*x86_64.*mage$' | head -1) - -# make vulkan headers -wget https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v1.3.238.tar.gz -tar fx *tar* && cd Vulkan* -cmake -S . -B build/ -sudo cmake --install build --prefix '/usr' -cd .. && rm -rf ./*tar* ./Vulkan* - -# CREATE DIRECTORIES AND BUILD MPV -[ -n "$APP" ] && mkdir -p ./"$APP/$APPDIR" && cd ./"$APP/$APPDIR" || exit 1 -CURRENTDIR="$(readlink -f "$(dirname "$0")")" # DO NOT MOVE THIS -git clone "$REPO" && cd ./mpv-build && sed -i "s#meson setup build#meson setup build -Dprefix=$CURRENTDIR/usr#g" ./scripts/mpv-config \ -&& ./rebuild -j$(nproc) && ./install && cd .. && rm -rf ./mpv-build || exit 1 +GOAPPIMAGETOOL=$(wget -q https://api.github.com/repos/probonopd/go-appimage/releases -O - \ + | sed 's/[()",{} ]/\n/g' | grep -oi 'https.*continuous.*tool.*x86_64.*mage$' | head -1) +APPIMAGETOOL="https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$ARCH.AppImage" +mkdir -p ./mpv/mpv.AppDir && cd ./mpv/mpv.AppDir || exit 1 -# AppRun -cat >> ./AppRun << 'EOF' -#!/bin/sh -CURRENTDIR="$(dirname "$(readlink -f "$0")")" -if [ -z "$@" ]; then - "$CURRENTDIR/usr/bin/mpv" --player-operation-mode=pseudo-gui -else - "$CURRENTDIR/usr/bin/mpv" "$@" +# Build mpv +if [ ! -d ./usr ]; then + CURRENTDIR="$(readlink -f "$(dirname "$0")")" + git clone "$REPO" && cd ./mpv-build || exit 1 + sed -i "s#meson setup build#meson setup build -Dprefix=$CURRENTDIR/usr#g" ./scripts/mpv-config + ./rebuild -j$(nproc) && ./install && cd .. && rm -rf ./mpv-build || exit 1 + cp ./usr/share/icons/hicolor/128x128/apps/mpv.png ./ && ln -s ./mpv.png ./.DirIcon fi -EOF -chmod a+x ./AppRun -export VERSION=$(./AppRun --version | awk 'FNR == 1 {print $2}') -cp ./usr/share/icons/hicolor/128x128/apps/mpv.png ./ && ln -s ./mpv.png ./.DirIcon # If not done linuxdeploy will pick the wrong icon - -# MAKE APPIMAGE USING FUSE3 COMPATIBLE APPIMAGETOOL -cd .. && cp -r "$APPDIR" "$APPDIR"2 && wget -q "$APPIMAGETOOL" -O ./appimagetool && chmod a+x ./appimagetool || exit 1 - -./appimagetool deploy "$APPDIR"/usr/share/applications/*.desktop || exit 1 -sed -i 's/export PYTHONHOME/#export PYTHONHOME/g' "$APPDIR"/AppRun # unsets this since python isn't bundled -./appimagetool -s ./"$APPDIR" || exit 1 -mv ./*.AppImage .. && echo "Regular appimage made" || exit 1 -# EXPERIMENTAL DEPLOY EVERYTHING MODE. TODO FIX INTERNET ISSUES -APPDIR="$APPDIR"2 -export VERSION="$VERSION-anylinux" -sed -i 's/Name=mpv/Name=WIP-mpv/g' "$APPDIR"/usr/share/applications/*.desktop -./appimagetool -s deploy "$APPDIR"/usr/share/applications/*.desktop || exit 1 -sed -i 's/export PYTHONHOME/#export PYTHONHOME/g' "$APPDIR"/AppRun # unsets this since python isn't bundled -./appimagetool -s ./"$APPDIR" || exit 1 -[ -n "$APP" ] && mv ./*.AppImage .. && cd .. && rm -rf ./"$APP" && echo "Deploy everything appimage made" || exit 1 +# make appimage +VERSION=$(./usr/bin/mpv --version 2>/dev/null | awk 'FNR==1 {print $2}') +[ -z "$VERSION" ] && echo "ERROR: Could not get version from mpv" && exit 1 +cd .. +[ ! -f ./go-appimagetool ] && { wget -q "$GOAPPIMAGETOOL" -O ./go-appimagetool || exit 1; } +[ ! -f ./appimagetool ] && { wget -q "$APPIMAGETOOL" -O ./appimagetool || exit 1; } +chmod +x ./*tool ./zsyncmake +./go-appimagetool -s deploy ./mpv.AppDir/usr/share/applications/*.desktop || exit 1 +sed -i 's/export PYTHONHOME/#export PYTHONHOME/g' ./mpv.AppDir/AppRun +./appimagetool --comp zstd --mksquashfs-opt -Xcompression-level --mksquashfs-opt 1 \ + -u "gh-releases-zsync|$GITHUB_REPOSITORY_OWNER|mpv-AppImage|continuous|mpv-*$ARCH.AppImage.zsync" \ + ./mpv.AppDir mpv-"$VERSION"-"$ARCH".AppImage +mv ./*.AppImage* .. && cd .. && rm -rf ./mpv || exit 1 +echo "All done!" From cdadae255226fe92c39b0659ab9cf8b96616c3f9 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Wed, 4 Sep 2024 01:28:30 -0400 Subject: [PATCH 02/24] Update mpv-AppImage.sh --- mpv-AppImage.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/mpv-AppImage.sh b/mpv-AppImage.sh index dabaf07..8e65ce9 100644 --- a/mpv-AppImage.sh +++ b/mpv-AppImage.sh @@ -12,7 +12,6 @@ export APPIMAGE_EXTRACT_AND_RUN=1 REPO="https://github.com/mpv-player/mpv-build.git" GOAPPIMAGETOOL=$(wget -q https://api.github.com/repos/probonopd/go-appimage/releases -O - \ | sed 's/[()",{} ]/\n/g' | grep -oi 'https.*continuous.*tool.*x86_64.*mage$' | head -1) -APPIMAGETOOL="https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$ARCH.AppImage" mkdir -p ./mpv/mpv.AppDir && cd ./mpv/mpv.AppDir || exit 1 # Build mpv @@ -25,16 +24,13 @@ if [ ! -d ./usr ]; then fi # make appimage -VERSION=$(./usr/bin/mpv --version 2>/dev/null | awk 'FNR==1 {print $2}') +export VERSION=$(./usr/bin/mpv --version 2>/dev/null | awk 'FNR==1 {print $2}') [ -z "$VERSION" ] && echo "ERROR: Could not get version from mpv" && exit 1 cd .. -[ ! -f ./go-appimagetool ] && { wget -q "$GOAPPIMAGETOOL" -O ./go-appimagetool || exit 1; } -[ ! -f ./appimagetool ] && { wget -q "$APPIMAGETOOL" -O ./appimagetool || exit 1; } +[ ! -f ./go-appimagetool ] && { wget -q "$GOAPPIMAGETOOL" -O ./go-appimagetool || exit 1; } chmod +x ./*tool ./zsyncmake ./go-appimagetool -s deploy ./mpv.AppDir/usr/share/applications/*.desktop || exit 1 sed -i 's/export PYTHONHOME/#export PYTHONHOME/g' ./mpv.AppDir/AppRun -./appimagetool --comp zstd --mksquashfs-opt -Xcompression-level --mksquashfs-opt 1 \ - -u "gh-releases-zsync|$GITHUB_REPOSITORY_OWNER|mpv-AppImage|continuous|mpv-*$ARCH.AppImage.zsync" \ - ./mpv.AppDir mpv-"$VERSION"-"$ARCH".AppImage +./go-appimagetool -s ./mpv.AppDir || exit 1 mv ./*.AppImage* .. && cd .. && rm -rf ./mpv || exit 1 echo "All done!" From 70e0463d4f1b1cfc01d51a2916b120cee4424b42 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Wed, 4 Sep 2024 02:28:48 -0400 Subject: [PATCH 03/24] Update mpv-AppImage.sh --- mpv-AppImage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpv-AppImage.sh b/mpv-AppImage.sh index 8e65ce9..a474d7b 100644 --- a/mpv-AppImage.sh +++ b/mpv-AppImage.sh @@ -28,7 +28,7 @@ export VERSION=$(./usr/bin/mpv --version 2>/dev/null | awk 'FNR==1 {print $2}') [ -z "$VERSION" ] && echo "ERROR: Could not get version from mpv" && exit 1 cd .. [ ! -f ./go-appimagetool ] && { wget -q "$GOAPPIMAGETOOL" -O ./go-appimagetool || exit 1; } -chmod +x ./*tool ./zsyncmake +chmod +x ./*tool ./go-appimagetool -s deploy ./mpv.AppDir/usr/share/applications/*.desktop || exit 1 sed -i 's/export PYTHONHOME/#export PYTHONHOME/g' ./mpv.AppDir/AppRun ./go-appimagetool -s ./mpv.AppDir || exit 1 From ca9948938ba12af502101e574884e101b16a0d89 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Thu, 5 Sep 2024 00:10:27 -0400 Subject: [PATCH 04/24] Update mpv-AppImage.sh --- mpv-AppImage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpv-AppImage.sh b/mpv-AppImage.sh index a474d7b..c2b603a 100644 --- a/mpv-AppImage.sh +++ b/mpv-AppImage.sh @@ -1,7 +1,7 @@ #!/bin/sh # dependencies: -# meson cmake automake ninja ninja-build vulkan-headers freetype-dev libass-dev +# meson cmake automake ninja ninja-build vulkan-headers freetype-dev libass-dev libtool # fribidi-dev harfbuzz-dev yasm libx11 libx11-dev libxinerama-dev libxrandr-dev # libxscrnsaver libxscrnsaver-dev xscreensaver-gl-extras jack libpulse pulseaudio-dev # rubberband libcaca mesa-egl libxpresent-dev lua5.3-dev libxcb-dev desktop-file-utils From dca472f75a9a51615fa391255d6fd27a995cf8b2 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 05:37:44 -0400 Subject: [PATCH 05/24] fix bug with yt-dlp --- mpv-AppImage.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/mpv-AppImage.sh b/mpv-AppImage.sh index c2b603a..b6f2fa6 100644 --- a/mpv-AppImage.sh +++ b/mpv-AppImage.sh @@ -28,9 +28,21 @@ export VERSION=$(./usr/bin/mpv --version 2>/dev/null | awk 'FNR==1 {print $2}') [ -z "$VERSION" ] && echo "ERROR: Could not get version from mpv" && exit 1 cd .. [ ! -f ./go-appimagetool ] && { wget -q "$GOAPPIMAGETOOL" -O ./go-appimagetool || exit 1; } -chmod +x ./*tool +chmod +x ./go-appimagetool ./go-appimagetool -s deploy ./mpv.AppDir/usr/share/applications/*.desktop || exit 1 + +# disable this since we are not shipping python sed -i 's/export PYTHONHOME/#export PYTHONHOME/g' ./mpv.AppDir/AppRun + +# Fix some issue with yt-dlp not working +# Likely go-appimage breaking something +for lib in libc.so.6 libdl.so.2 librt.so.1 libpthread.so.0; do + rm -f ./mpv.AppDir/usr/lib/x86_64-linux-gnu/"$lib" + find / -type f -name "$lib" -exec cp {} ./mpv.AppDir/usr/lib/x86_64-linux-gnu ';' -quit 2>/dev/null + patchelf --set-rpath '$ORIGIN' ./mpv.AppDir/usr/lib/x86_64-linux-gnu/"$lib" +done +cp /lib64/ld-linux-x86-64.so.2 ./mpv.AppDir/lib64/ld-linux-x86-64.so.2 + ./go-appimagetool -s ./mpv.AppDir || exit 1 mv ./*.AppImage* .. && cd .. && rm -rf ./mpv || exit 1 echo "All done!" From 9d9ddba773353d61563df9345cfa575a6fddf93d Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 05:38:47 -0400 Subject: [PATCH 06/24] switch to ubuntu 22.04 since now we bundle everything --- .github/workflows/blank2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank2.yml b/.github/workflows/blank2.yml index de1b72a..3b1e669 100644 --- a/.github/workflows/blank2.yml +++ b/.github/workflows/blank2.yml @@ -10,7 +10,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 From b89de8aa6630ebf737fe9a4106d77e4c6259ceb3 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 05:39:37 -0400 Subject: [PATCH 07/24] refactor a bit --- .github/workflows/blank2.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/blank2.yml b/.github/workflows/blank2.yml index 3b1e669..019c114 100644 --- a/.github/workflows/blank2.yml +++ b/.github/workflows/blank2.yml @@ -23,9 +23,7 @@ jobs: sudo apt install libxss-dev libglib2.0-dev libpango1.0-dev libgtk-3-dev libxdg-basedir-dev libnotify-dev libc++-dev libplacebo-dev libx265-dev sudo apt install ninja-build autotools-dev autoconf automake make build-essential pkg-config python3-pip sudo pip3 install packaging meson - wget https://raw.githubusercontent.com/Samueru-sama/mpv-AppImage/main/mpv-AppImage.sh - chmod a+x ./*.sh - ./mpv-AppImage.sh + chmod a+x ./mpv-AppImage.sh ./mpv-AppImage.sh mkdir dist mv *AppImage dist/ From 8c6109cc5749ff7586c34044f4b7cb86eb586864 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 05:42:13 -0400 Subject: [PATCH 08/24] update actions --- .github/workflows/blank2.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/blank2.yml b/.github/workflows/blank2.yml index 019c114..8571a38 100644 --- a/.github/workflows/blank2.yml +++ b/.github/workflows/blank2.yml @@ -12,7 +12,7 @@ jobs: build: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: build run: | @@ -28,7 +28,7 @@ jobs: mv *AppImage dist/ - name: Upload artifact - uses: actions/upload-artifact@v1.0.0 + uses: actions/upload-artifact@v4 with: name: mpv-x86_64.AppImage path: 'dist' @@ -39,7 +39,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v1 + - uses: actions/download-artifact@v4 with: name: mpv-x86_64.AppImage @@ -51,5 +51,5 @@ jobs: prerelease: false draft: false files: | - mpv-x86_64.AppImage + *.AppImage repo_token: ${{ secrets.GITHUB_TOKEN }} From 3d1376537ec224a269e7498d1c176ce1d62a219c Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 05:45:09 -0400 Subject: [PATCH 09/24] oops --- .github/workflows/blank2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank2.yml b/.github/workflows/blank2.yml index 8571a38..dff6867 100644 --- a/.github/workflows/blank2.yml +++ b/.github/workflows/blank2.yml @@ -23,7 +23,7 @@ jobs: sudo apt install libxss-dev libglib2.0-dev libpango1.0-dev libgtk-3-dev libxdg-basedir-dev libnotify-dev libc++-dev libplacebo-dev libx265-dev sudo apt install ninja-build autotools-dev autoconf automake make build-essential pkg-config python3-pip sudo pip3 install packaging meson - chmod a+x ./mpv-AppImage.sh ./mpv-AppImage.sh + chmod a+x ./mpv-AppImage.sh && ./mpv-AppImage.sh mkdir dist mv *AppImage dist/ From acc16b177c50d74063d02e3ece209c28bc950d92 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 05:54:59 -0400 Subject: [PATCH 10/24] make vulkan headers --- mpv-AppImage.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mpv-AppImage.sh b/mpv-AppImage.sh index b6f2fa6..2969dcb 100644 --- a/mpv-AppImage.sh +++ b/mpv-AppImage.sh @@ -14,6 +14,13 @@ GOAPPIMAGETOOL=$(wget -q https://api.github.com/repos/probonopd/go-appimage/rele | sed 's/[()",{} ]/\n/g' | grep -oi 'https.*continuous.*tool.*x86_64.*mage$' | head -1) mkdir -p ./mpv/mpv.AppDir && cd ./mpv/mpv.AppDir || exit 1 +# make vulkan headers +wget "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v1.3.238.tar.gz" +tar fx *tar* && cd Vulkan* +cmake -S . -B build/ +sudo cmake --install build --prefix '/usr' +cd .. && rm -rf ./*tar* ./Vulkan* + # Build mpv if [ ! -d ./usr ]; then CURRENTDIR="$(readlink -f "$(dirname "$0")")" From 232e096fbe210eaa44df08312c7d51bacc511c42 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 06:07:41 -0400 Subject: [PATCH 11/24] go back to 20.04 because 22.04 still needs newer vulkan headers --- .github/workflows/blank2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank2.yml b/.github/workflows/blank2.yml index dff6867..4f0d6b6 100644 --- a/.github/workflows/blank2.yml +++ b/.github/workflows/blank2.yml @@ -10,7 +10,7 @@ on: jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v4 From f956eb956cd6fd0438bb0dd5ccb97d0e93d27cde Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 06:14:08 -0400 Subject: [PATCH 12/24] use different appimagetool and generate .zsync file --- mpv-AppImage.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/mpv-AppImage.sh b/mpv-AppImage.sh index 2969dcb..d19652a 100644 --- a/mpv-AppImage.sh +++ b/mpv-AppImage.sh @@ -7,11 +7,13 @@ # rubberband libcaca mesa-egl libxpresent-dev lua5.3-dev libxcb-dev desktop-file-utils set -u -export ARCH=x86_64 +export ARCH="$(uname -m)" export APPIMAGE_EXTRACT_AND_RUN=1 REPO="https://github.com/mpv-player/mpv-build.git" GOAPPIMAGETOOL=$(wget -q https://api.github.com/repos/probonopd/go-appimage/releases -O - \ | sed 's/[()",{} ]/\n/g' | grep -oi 'https.*continuous.*tool.*x86_64.*mage$' | head -1) +APPIMAGETOOL="https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage" +rm -rf ./mpv 2>/dev/null mkdir -p ./mpv/mpv.AppDir && cd ./mpv/mpv.AppDir || exit 1 # make vulkan headers @@ -35,7 +37,8 @@ export VERSION=$(./usr/bin/mpv --version 2>/dev/null | awk 'FNR==1 {print $2}') [ -z "$VERSION" ] && echo "ERROR: Could not get version from mpv" && exit 1 cd .. [ ! -f ./go-appimagetool ] && { wget -q "$GOAPPIMAGETOOL" -O ./go-appimagetool || exit 1; } -chmod +x ./go-appimagetool +[ ! -f ./appimagetool ] && { wget -q "$APPIMAGETOOL" -O ./appimagetool || exit 1; } +chmod +x ./*tool ./go-appimagetool -s deploy ./mpv.AppDir/usr/share/applications/*.desktop || exit 1 # disable this since we are not shipping python @@ -50,6 +53,10 @@ for lib in libc.so.6 libdl.so.2 librt.so.1 libpthread.so.0; do done cp /lib64/ld-linux-x86-64.so.2 ./mpv.AppDir/lib64/ld-linux-x86-64.so.2 -./go-appimagetool -s ./mpv.AppDir || exit 1 -mv ./*.AppImage* .. && cd .. && rm -rf ./mpv || exit 1 +# maybe not needed but I had appimagetool bug out before if the AppDir isnt in the top leve of home +mv ./mpv.AppDir ../ && cd ../ || exit 1 + +./appimagetool --comp zstd \ + --mksquashfs-opt -Xcompression-level --mksquashfs-opt 22 \ + -n -u "$UPINFO" ./puddletag.AppDir puddletag-"$VERSION"-"$ARCH".AppImage echo "All done!" From f7680cb2ec51baa28cb46eb7aca35d555f2c08c2 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 06:15:03 -0400 Subject: [PATCH 13/24] add .zsync to releases --- .github/workflows/blank2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blank2.yml b/.github/workflows/blank2.yml index 4f0d6b6..6502265 100644 --- a/.github/workflows/blank2.yml +++ b/.github/workflows/blank2.yml @@ -25,7 +25,7 @@ jobs: sudo pip3 install packaging meson chmod a+x ./mpv-AppImage.sh && ./mpv-AppImage.sh mkdir dist - mv *AppImage dist/ + mv *AppImage* dist/ - name: Upload artifact uses: actions/upload-artifact@v4 @@ -51,5 +51,5 @@ jobs: prerelease: false draft: false files: | - *.AppImage + *.AppImage* repo_token: ${{ secrets.GITHUB_TOKEN }} From 04daef50b7b9c43597bb7e3ef138145f8bf1065a Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 06:28:03 -0400 Subject: [PATCH 14/24] add update-info --- mpv-AppImage.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/mpv-AppImage.sh b/mpv-AppImage.sh index d19652a..9042d8c 100644 --- a/mpv-AppImage.sh +++ b/mpv-AppImage.sh @@ -13,6 +13,7 @@ REPO="https://github.com/mpv-player/mpv-build.git" GOAPPIMAGETOOL=$(wget -q https://api.github.com/repos/probonopd/go-appimage/releases -O - \ | sed 's/[()",{} ]/\n/g' | grep -oi 'https.*continuous.*tool.*x86_64.*mage$' | head -1) APPIMAGETOOL="https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage" +UPINFO="gh-releases-zsync|$GITHUB_REPOSITORY_OWNER|mpv-AppImage|latest|*$ARCH.AppImage.zsync" rm -rf ./mpv 2>/dev/null mkdir -p ./mpv/mpv.AppDir && cd ./mpv/mpv.AppDir || exit 1 From 9044c296e512ec6adf8add0e793d26c6b74b8a69 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 06:44:51 -0400 Subject: [PATCH 15/24] refactor a bit --- mpv-AppImage.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/mpv-AppImage.sh b/mpv-AppImage.sh index 9042d8c..65533f3 100644 --- a/mpv-AppImage.sh +++ b/mpv-AppImage.sh @@ -33,13 +33,13 @@ if [ ! -d ./usr ]; then cp ./usr/share/icons/hicolor/128x128/apps/mpv.png ./ && ln -s ./mpv.png ./.DirIcon fi -# make appimage export VERSION=$(./usr/bin/mpv --version 2>/dev/null | awk 'FNR==1 {print $2}') [ -z "$VERSION" ] && echo "ERROR: Could not get version from mpv" && exit 1 -cd .. + +# bundle appdir +cd .. [ ! -f ./go-appimagetool ] && { wget -q "$GOAPPIMAGETOOL" -O ./go-appimagetool || exit 1; } -[ ! -f ./appimagetool ] && { wget -q "$APPIMAGETOOL" -O ./appimagetool || exit 1; } -chmod +x ./*tool +chmod +x ./go-appimagetool ./go-appimagetool -s deploy ./mpv.AppDir/usr/share/applications/*.desktop || exit 1 # disable this since we are not shipping python @@ -49,14 +49,18 @@ sed -i 's/export PYTHONHOME/#export PYTHONHOME/g' ./mpv.AppDir/AppRun # Likely go-appimage breaking something for lib in libc.so.6 libdl.so.2 librt.so.1 libpthread.so.0; do rm -f ./mpv.AppDir/usr/lib/x86_64-linux-gnu/"$lib" - find / -type f -name "$lib" -exec cp {} ./mpv.AppDir/usr/lib/x86_64-linux-gnu ';' -quit 2>/dev/null + find /usr/lib -type f -name "$lib" \ + -exec cp {} ./mpv.AppDir/usr/lib/x86_64-linux-gnu ';' -quit 2>/dev/null patchelf --set-rpath '$ORIGIN' ./mpv.AppDir/usr/lib/x86_64-linux-gnu/"$lib" done cp /lib64/ld-linux-x86-64.so.2 ./mpv.AppDir/lib64/ld-linux-x86-64.so.2 -# maybe not needed but I had appimagetool bug out before if the AppDir isnt in the top leve of home +# maybe not needed but I had appimagetool bug out before if the AppDir isnt in the top level of home mv ./mpv.AppDir ../ && cd ../ || exit 1 +# make appimage +[ ! -f ./appimagetool ] && { wget -q "$APPIMAGETOOL" -O ./appimagetool || exit 1; } +chmod +x ./appimagetool ./appimagetool --comp zstd \ --mksquashfs-opt -Xcompression-level --mksquashfs-opt 22 \ -n -u "$UPINFO" ./puddletag.AppDir puddletag-"$VERSION"-"$ARCH".AppImage From a61d3754d1bb850c30620d483df886f256036eff Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 06:56:57 -0400 Subject: [PATCH 16/24] add appimagetool dependencies --- .github/workflows/blank2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank2.yml b/.github/workflows/blank2.yml index 6502265..534c047 100644 --- a/.github/workflows/blank2.yml +++ b/.github/workflows/blank2.yml @@ -21,7 +21,7 @@ jobs: sudo apt install equivs libavutil-dev libavcodec-dev libswscale-dev python3-dev cython3 g++ nasm git libavfilter-dev libxmu-dev libxcb1-dev sudo apt install libfuse2 libdbus-1-dev libx11-dev libxinerama-dev libxrandr-dev yasm intltool autoconf libtool devscripts libass-dev libx264-dev sudo apt install libxss-dev libglib2.0-dev libpango1.0-dev libgtk-3-dev libxdg-basedir-dev libnotify-dev libc++-dev libplacebo-dev libx265-dev - sudo apt install ninja-build autotools-dev autoconf automake make build-essential pkg-config python3-pip + sudo apt install ninja-build autotools-dev autoconf automake make build-essential pkg-config python3-pip desktop-file-validate zsync sudo pip3 install packaging meson chmod a+x ./mpv-AppImage.sh && ./mpv-AppImage.sh mkdir dist From 4adaf299c2fbe737c28252d8cc0f6602add5feb3 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 07:01:05 -0400 Subject: [PATCH 17/24] fix typo --- .github/workflows/blank2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank2.yml b/.github/workflows/blank2.yml index 534c047..8b6de36 100644 --- a/.github/workflows/blank2.yml +++ b/.github/workflows/blank2.yml @@ -21,7 +21,7 @@ jobs: sudo apt install equivs libavutil-dev libavcodec-dev libswscale-dev python3-dev cython3 g++ nasm git libavfilter-dev libxmu-dev libxcb1-dev sudo apt install libfuse2 libdbus-1-dev libx11-dev libxinerama-dev libxrandr-dev yasm intltool autoconf libtool devscripts libass-dev libx264-dev sudo apt install libxss-dev libglib2.0-dev libpango1.0-dev libgtk-3-dev libxdg-basedir-dev libnotify-dev libc++-dev libplacebo-dev libx265-dev - sudo apt install ninja-build autotools-dev autoconf automake make build-essential pkg-config python3-pip desktop-file-validate zsync + sudo apt install ninja-build autotools-dev autoconf automake make build-essential pkg-config python3-pip desktop-file-utils zsync sudo pip3 install packaging meson chmod a+x ./mpv-AppImage.sh && ./mpv-AppImage.sh mkdir dist From d962533ec0f9a80652f45490623fa9dc2436d2a9 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 07:13:12 -0400 Subject: [PATCH 18/24] oops --- mpv-AppImage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpv-AppImage.sh b/mpv-AppImage.sh index 65533f3..b6a83e4 100644 --- a/mpv-AppImage.sh +++ b/mpv-AppImage.sh @@ -63,5 +63,5 @@ mv ./mpv.AppDir ../ && cd ../ || exit 1 chmod +x ./appimagetool ./appimagetool --comp zstd \ --mksquashfs-opt -Xcompression-level --mksquashfs-opt 22 \ - -n -u "$UPINFO" ./puddletag.AppDir puddletag-"$VERSION"-"$ARCH".AppImage + -n -u "$UPINFO" ./mpv.AppDir mpv-"$VERSION"-"$ARCH".AppImage echo "All done!" From 9bb2749e2a9882ba5a887e2478a53925f1f54116 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 07:43:37 -0400 Subject: [PATCH 19/24] oops --- mpv-AppImage.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mpv-AppImage.sh b/mpv-AppImage.sh index b6a83e4..e9ba79c 100644 --- a/mpv-AppImage.sh +++ b/mpv-AppImage.sh @@ -48,10 +48,10 @@ sed -i 's/export PYTHONHOME/#export PYTHONHOME/g' ./mpv.AppDir/AppRun # Fix some issue with yt-dlp not working # Likely go-appimage breaking something for lib in libc.so.6 libdl.so.2 librt.so.1 libpthread.so.0; do - rm -f ./mpv.AppDir/usr/lib/x86_64-linux-gnu/"$lib" - find /usr/lib -type f -name "$lib" \ - -exec cp {} ./mpv.AppDir/usr/lib/x86_64-linux-gnu ';' -quit 2>/dev/null - patchelf --set-rpath '$ORIGIN' ./mpv.AppDir/usr/lib/x86_64-linux-gnu/"$lib" + rm -f ./mpv.AppDir/lib/x86_64-linux-gnu/"$lib" + find /lib -type f -name "$lib" \ + -exec cp {} ./mpv.AppDir/lib/x86_64-linux-gnu ';' -quit 2>/dev/null + patchelf --set-rpath '$ORIGIN' ./mpv.AppDir/lib/x86_64-linux-gnu/"$lib" done cp /lib64/ld-linux-x86-64.so.2 ./mpv.AppDir/lib64/ld-linux-x86-64.so.2 From 85c5a5c61791a82f04d3f9f4093268ec931a6cac Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 08:01:36 -0400 Subject: [PATCH 20/24] oops --- mpv-AppImage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpv-AppImage.sh b/mpv-AppImage.sh index e9ba79c..60e15d5 100644 --- a/mpv-AppImage.sh +++ b/mpv-AppImage.sh @@ -53,7 +53,7 @@ for lib in libc.so.6 libdl.so.2 librt.so.1 libpthread.so.0; do -exec cp {} ./mpv.AppDir/lib/x86_64-linux-gnu ';' -quit 2>/dev/null patchelf --set-rpath '$ORIGIN' ./mpv.AppDir/lib/x86_64-linux-gnu/"$lib" done -cp /lib64/ld-linux-x86-64.so.2 ./mpv.AppDir/lib64/ld-linux-x86-64.so.2 +cp /lib64/ld-linux-x86-64.so.2 ./mpv.AppDir/lib64/ld-linux-x86-64.so.2 || exit 1 # maybe not needed but I had appimagetool bug out before if the AppDir isnt in the top level of home mv ./mpv.AppDir ../ && cd ../ || exit 1 From afbec7cea812bb50ed07a40b656e08731c118482 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 08:01:54 -0400 Subject: [PATCH 21/24] Update mpv-AppImage.sh --- mpv-AppImage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpv-AppImage.sh b/mpv-AppImage.sh index 60e15d5..bc92b60 100644 --- a/mpv-AppImage.sh +++ b/mpv-AppImage.sh @@ -49,7 +49,7 @@ sed -i 's/export PYTHONHOME/#export PYTHONHOME/g' ./mpv.AppDir/AppRun # Likely go-appimage breaking something for lib in libc.so.6 libdl.so.2 librt.so.1 libpthread.so.0; do rm -f ./mpv.AppDir/lib/x86_64-linux-gnu/"$lib" - find /lib -type f -name "$lib" \ + find / -type f -name "$lib" \ -exec cp {} ./mpv.AppDir/lib/x86_64-linux-gnu ';' -quit 2>/dev/null patchelf --set-rpath '$ORIGIN' ./mpv.AppDir/lib/x86_64-linux-gnu/"$lib" done From 1c959cffe3df5be6270e8ea4363901c29e267ab0 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 08:13:42 -0400 Subject: [PATCH 22/24] Update mpv-AppImage.sh --- mpv-AppImage.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mpv-AppImage.sh b/mpv-AppImage.sh index bc92b60..5cdceb9 100644 --- a/mpv-AppImage.sh +++ b/mpv-AppImage.sh @@ -47,12 +47,12 @@ sed -i 's/export PYTHONHOME/#export PYTHONHOME/g' ./mpv.AppDir/AppRun # Fix some issue with yt-dlp not working # Likely go-appimage breaking something -for lib in libc.so.6 libdl.so.2 librt.so.1 libpthread.so.0; do - rm -f ./mpv.AppDir/lib/x86_64-linux-gnu/"$lib" - find / -type f -name "$lib" \ - -exec cp {} ./mpv.AppDir/lib/x86_64-linux-gnu ';' -quit 2>/dev/null - patchelf --set-rpath '$ORIGIN' ./mpv.AppDir/lib/x86_64-linux-gnu/"$lib" -done +#for lib in libc.so.6 libdl.so.2 librt.so.1 libpthread.so.0; do +# rm -f ./mpv.AppDir/lib/x86_64-linux-gnu/"$lib" +# find / -type f -name "$lib" \ +# -exec cp {} ./mpv.AppDir/lib/x86_64-linux-gnu ';' -quit 2>/dev/null +# patchelf --set-rpath '$ORIGIN' ./mpv.AppDir/lib/x86_64-linux-gnu/"$lib" +#done cp /lib64/ld-linux-x86-64.so.2 ./mpv.AppDir/lib64/ld-linux-x86-64.so.2 || exit 1 # maybe not needed but I had appimagetool bug out before if the AppDir isnt in the top level of home From 37f118e45ff0924b7fe5374babc7f11ae71d1013 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 08:24:32 -0400 Subject: [PATCH 23/24] Update blank2.yml --- .github/workflows/blank2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blank2.yml b/.github/workflows/blank2.yml index 8b6de36..25e1479 100644 --- a/.github/workflows/blank2.yml +++ b/.github/workflows/blank2.yml @@ -10,7 +10,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -25,7 +25,7 @@ jobs: sudo pip3 install packaging meson chmod a+x ./mpv-AppImage.sh && ./mpv-AppImage.sh mkdir dist - mv *AppImage* dist/ + mv *.AppImage* dist/ - name: Upload artifact uses: actions/upload-artifact@v4 From fefc54384adf91748f1188ceb156a649e83545d8 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 20 Oct 2024 08:37:08 -0400 Subject: [PATCH 24/24] simplify fix for yt-dlp --- mpv-AppImage.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mpv-AppImage.sh b/mpv-AppImage.sh index 5cdceb9..f1f9fe1 100644 --- a/mpv-AppImage.sh +++ b/mpv-AppImage.sh @@ -47,12 +47,6 @@ sed -i 's/export PYTHONHOME/#export PYTHONHOME/g' ./mpv.AppDir/AppRun # Fix some issue with yt-dlp not working # Likely go-appimage breaking something -#for lib in libc.so.6 libdl.so.2 librt.so.1 libpthread.so.0; do -# rm -f ./mpv.AppDir/lib/x86_64-linux-gnu/"$lib" -# find / -type f -name "$lib" \ -# -exec cp {} ./mpv.AppDir/lib/x86_64-linux-gnu ';' -quit 2>/dev/null -# patchelf --set-rpath '$ORIGIN' ./mpv.AppDir/lib/x86_64-linux-gnu/"$lib" -#done cp /lib64/ld-linux-x86-64.so.2 ./mpv.AppDir/lib64/ld-linux-x86-64.so.2 || exit 1 # maybe not needed but I had appimagetool bug out before if the AppDir isnt in the top level of home