mirror of https://github.com/mpv-player/mpv
Add mpv.desktop, let Makefile install the desktop file and the icons
The mpv.desktop file is taken from the Arch package [1]. It appears to be based on the mplayer2 git mplayer.desktop file (e.g. very similar MimeType field), with minor modifications applied by Arch package maintainers. Note that for now, this doesn't show a terminal (Terminal=false), which might not always be ideal. For example, if the file is audio only, or if VO initialization fails for some reason, mpv will run in the background and play audio without showing a window. But users prefer running it without terminal, and don't want to play audio files with it. Maybe a --force-window option will be added in the future, which would always create a VO window, and compensate for these issues. [1] https://aur.archlinux.org/packages/mpv-git/
This commit is contained in:
parent
132c7f1cf5
commit
d6884defa7
28
Makefile
28
Makefile
|
@ -427,10 +427,10 @@ DOCS/man/en/mpv.1 DOCS/man/en/mpv.pdf: DOCS/man/en/af.rst \
|
||||||
|
|
||||||
###### installation / clean / generic rules #######
|
###### installation / clean / generic rules #######
|
||||||
|
|
||||||
install: $(INSTALL_BIN) $(INSTALL_MAN) $(INSTALL_PDF)
|
install: $(INSTALL_BIN) install-data $(INSTALL_MAN) $(INSTALL_PDF)
|
||||||
install-no-man: $(INSTALL_BIN)
|
install-no-man: $(INSTALL_BIN) install-data
|
||||||
install-strip: $(INSTALL_BIN_STRIP) $(INSTALL_MAN) $(INSTALL_PDF)
|
install-strip: $(INSTALL_BIN_STRIP) install-data $(INSTALL_MAN) $(INSTALL_PDF)
|
||||||
install-strip-no-man: $(INSTALL_BIN_STRIP)
|
install-strip-no-man: $(INSTALL_BIN_STRIP) install-data
|
||||||
|
|
||||||
install-dirs:
|
install-dirs:
|
||||||
if test ! -d $(BINDIR) ; then $(INSTALL) -d $(BINDIR) ; fi
|
if test ! -d $(BINDIR) ; then $(INSTALL) -d $(BINDIR) ; fi
|
||||||
|
@ -453,11 +453,31 @@ install-mpv-pdf-en: DOCS/man/en/mpv.pdf
|
||||||
if test ! -d $(DOCDIR)/mpv ; then $(INSTALL) -d $(DOCDIR)/mpv ; fi
|
if test ! -d $(DOCDIR)/mpv ; then $(INSTALL) -d $(DOCDIR)/mpv ; fi
|
||||||
$(INSTALL) -m 644 DOCS/man/en/mpv.pdf $(DOCDIR)/mpv/
|
$(INSTALL) -m 644 DOCS/man/en/mpv.pdf $(DOCDIR)/mpv/
|
||||||
|
|
||||||
|
ICONSIZES = 16x16 32x32 64x64
|
||||||
|
|
||||||
|
define ICON_INSTALL_RULE
|
||||||
|
install-mpv-icon-$(size): etc/mpv-icon-8bit-$(size).png
|
||||||
|
$(INSTALL) -d $(prefix)/share/icons/hicolor/$(size)/apps
|
||||||
|
$(INSTALL) -m 644 etc/mpv-icon-8bit-$(size).png $(prefix)/share/icons/hicolor/$(size)/apps/mpv.png
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(foreach size,$(ICONSIZES),$(eval $(ICON_INSTALL_RULE)))
|
||||||
|
|
||||||
|
install-mpv-icons: $(foreach size,$(ICONSIZES),install-mpv-icon-$(size))
|
||||||
|
|
||||||
|
install-mpv-desktop: etc/mpv.desktop
|
||||||
|
$(INSTALL) -d $(prefix)/share/applications
|
||||||
|
$(INSTALL) -m 644 etc/mpv.desktop $(prefix)/share/applications/
|
||||||
|
|
||||||
|
install-data: install-mpv-icons install-mpv-desktop
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
$(RM) $(BINDIR)/mpv$(EXESUF)
|
$(RM) $(BINDIR)/mpv$(EXESUF)
|
||||||
$(RM) $(MANDIR)/man1/mpv.1
|
$(RM) $(MANDIR)/man1/mpv.1
|
||||||
$(RM) $(MANDIR)/en/man1/mpv.1
|
$(RM) $(MANDIR)/en/man1/mpv.1
|
||||||
$(RM) $(DOCDIR)/mpv/mpv.pdf
|
$(RM) $(DOCDIR)/mpv/mpv.pdf
|
||||||
|
$(RM) $(prefix)/share/applications/mpv.desktop
|
||||||
|
$(RM) $(foreach size,$(ICONSIZES),$(prefix)/share/icons/hicolor/$(size)/apps/mpv.png)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-$(RM) $(call ADD_ALL_DIRS,/*.o /*.d /*.a /*.ho /*~)
|
-$(RM) $(call ADD_ALL_DIRS,/*.o /*.d /*.a /*.ho /*~)
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=mpv Media Player
|
||||||
|
Name[ca]=Reproductor multimèdia mpv
|
||||||
|
Name[pl]=mpv odtwarzacz multimedialny
|
||||||
|
GenericName=Multimedia player
|
||||||
|
Comment=Play movies and songs
|
||||||
|
Comment[ca]=Reproduïu vídeos i cançons
|
||||||
|
Comment[de]=Filme und Musik abspielen
|
||||||
|
Comment[es]=Reproduzca vídeos y canciones
|
||||||
|
Comment[fr]=Lecteur multimédia
|
||||||
|
Comment[it]=Lettore multimediale
|
||||||
|
Comment[zh]=多媒体播放器
|
||||||
|
Comment[pl]=Odtwarzaj filmy i muzykę
|
||||||
|
Icon=mpv
|
||||||
|
TryExec=mpv
|
||||||
|
Exec=mpv --really-quiet -- %F
|
||||||
|
Terminal=false
|
||||||
|
NoDisplay=true
|
||||||
|
Categories=AudioVideo;Audio;Video;Player;TV;
|
||||||
|
MimeType=application/ogg;application/x-ogg;application/sdp;application/smil;application/x-smil;application/streamingmedia;application/x-streamingmedia;application/vnd.rn-realmedia;application/vnd.rn-realmedia-vbr;audio/aac;audio/x-aac;audio/m4a;audio/x-m4a;audio/mp1;audio/x-mp1;audio/mp2;audio/x-mp2;audio/mp3;audio/x-mp3;audio/mpeg;audio/x-mpeg;audio/mpegurl;audio/x-mpegurl;audio/mpg;audio/x-mpg;audio/rn-mpeg;audio/scpls;audio/x-scpls;audio/vnd.rn-realaudio;audio/wav;audio/x-pn-windows-pcm;audio/x-realaudio;audio/x-pn-realaudio;audio/x-ms-wma;audio/x-pls;audio/x-wav;video/mpeg;video/x-mpeg;video/x-mpeg2;video/mp4;video/msvideo;video/x-msvideo;video/quicktime;video/vnd.rn-realvideo;video/x-ms-afs;video/x-ms-asf;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvxvideo;video/x-avi;video/x-fli;video/x-flv;video/x-theora;video/x-matroska;video/webm;audio/x-flac;
|
Loading…
Reference in New Issue