diff --git a/.github/scripts/x86_64_Linux/bins/mpv.sh b/.github/scripts/x86_64_Linux/bins/mpv.sh index 4774e425e..1f43ae9fc 100644 --- a/.github/scripts/x86_64_Linux/bins/mpv.sh +++ b/.github/scripts/x86_64_Linux/bins/mpv.sh @@ -64,6 +64,23 @@ if [ "$SKIP_BUILD" == "NO" ]; then ##Desktop find "." -path '*mpv*.desktop' | awk '{ print length, $0 }' | sort -n | cut -d" " -f2- | head -n 1 | xargs -I {} sh -c 'cp {} "./mpv.desktop"' sed 's/Icon=[^ ]*/Icon=mpv/' -i "./mpv.desktop" 2>/dev/null + ##Purge Bloatware + echo -e "\n[+] Purging Bloatware...\n" + O_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "O_SIZE=${O_SIZE}" + #Headers + find "." -type d -path "*/include*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null + #docs & manpages + find "." -type d -path "*doc/share*" ! -name "*mpv*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null + find "." -type d -path "*/share/docs*" ! -name "*mpv*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null + find "." -type d -path "*/share/man*" ! -name "*mpv*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null + #static libs + find "." -type f -name "*.a" -print -exec rm -f {} 2>/dev/null \; 2>/dev/null + #systemd (need .so) + find "." -type d -name "*systemd*" -exec find {} -type f ! -name "*.so*" -delete \; + #Strip (this breaks things) + #find "." -type f -executable -exec file -i '{}' \; | grep "application/.*executable" | cut -d':' -f1 | xargs realpath | xargs sudo strip -R ".comment" -R ".gnu.version" --strip-unneeded 2>/dev/null + P_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "P_SIZE=${P_SIZE}" + echo -e "\n[+] Shaved off ${O_SIZE} --> ${P_SIZE}\n" #(Re)Pack cd "${OWD}" curl -qfsSL "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$(uname -m).AppImage" -o "./appimagetool" && chmod +x "./appimagetool"