player: register MPEG and WMV support cleanly
Some checks failed
Validate .desktop files / validate (push) Has been cancelled

This commit is contained in:
Lionel DARNIS 2026-05-18 17:26:13 +02:00
parent fd03f98738
commit a670d2afd7
4 changed files with 52 additions and 2 deletions

View file

@ -42,6 +42,28 @@ while IFS= read -r icon; do
sudo install -Dm0644 "$icon" "$PREFIX/share/icons/hicolor/$rel"
done < <(find "res/icons/hicolor" -type f -name "$APPID.svg" | sort)
if command -v update-desktop-database >/dev/null 2>&1; then
echo "==> Refresh desktop database"
if [[ -w "$PREFIX/share/applications" ]]; then
update-desktop-database "$PREFIX/share/applications" || true
else
sudo -n update-desktop-database "$PREFIX/share/applications" 2>/dev/null || \
echo " skipped: sudo authentication required"
fi
fi
if command -v xdg-mime >/dev/null 2>&1; then
echo "==> Register common legacy video defaults"
xdg-mime default "$APPID.desktop" \
video/mpeg \
video/x-mpeg \
video/x-mpeg2 \
video/x-ms-wmv \
video/x-ms-wm \
video/x-ms-asf \
application/vnd.ms-asf
fi
echo "==> Installed version"
"$bin_target" --version