comparison Makefile @ 34480:6c6fb701fa8e

Add differently sized, new icons for the GUI. This closes Bugzilla #710. In addition, icon themes are now supported.
author ib
date Sat, 14 Jan 2012 16:08:16 +0000
parents 1b8e44d85ef7
children 2c9db9cb7310
comparison
equal deleted inserted replaced
34479:70c63fd20b4b 34480:6c6fb701fa8e
757 757
758 ADDSUFFIXES = $(foreach suf,$(1),$(addsuffix $(suf),$(2))) 758 ADDSUFFIXES = $(foreach suf,$(1),$(addsuffix $(suf),$(2)))
759 ADD_ALL_DIRS = $(call ADDSUFFIXES,$(1),$(ALL_DIRS)) 759 ADD_ALL_DIRS = $(call ADDSUFFIXES,$(1),$(ALL_DIRS))
760 ADD_ALL_EXESUFS = $(1) $(call ADDSUFFIXES,$(EXESUFS_ALL),$(1)) 760 ADD_ALL_EXESUFS = $(1) $(call ADDSUFFIXES,$(EXESUFS_ALL),$(1))
761 761
762 GUI_ICONSIZES = 16x16 22x22 24x24 32x32 48x48 256x256
763
764
762 765
763 ###### generic rules ####### 766 ###### generic rules #######
764 767
765 all: $(ALL_PRG-yes) 768 all: $(ALL_PRG-yes)
766 769
903 $(INSTALL) -d $(BINDIR) $(CONFDIR) $(LIBDIR) 906 $(INSTALL) -d $(BINDIR) $(CONFDIR) $(LIBDIR)
904 907
905 install-%: %$(EXESUF) install-dirs 908 install-%: %$(EXESUF) install-dirs
906 $(INSTALL) -m 755 $(INSTALLSTRIP) $< $(BINDIR) 909 $(INSTALL) -m 755 $(INSTALLSTRIP) $< $(BINDIR)
907 910
908 install-gui: install-mplayer 911 install-gui: install-mplayer install-gui-icons
909 -ln -sf mplayer$(EXESUF) $(BINDIR)/gmplayer$(EXESUF) 912 -ln -sf mplayer$(EXESUF) $(BINDIR)/gmplayer$(EXESUF)
910 $(INSTALL) -d $(DATADIR)/skins $(prefix)/share/pixmaps $(prefix)/share/applications 913 $(INSTALL) -d $(DATADIR)/skins $(prefix)/share/applications
911 $(INSTALL) -m 644 etc/mplayer.png $(prefix)/share/pixmaps/
912 $(INSTALL) -m 644 etc/mplayer.desktop $(prefix)/share/applications/ 914 $(INSTALL) -m 644 etc/mplayer.desktop $(prefix)/share/applications/
913 915
916 install-gui-icons: $(foreach size,$(GUI_ICONSIZES),install-gui-icon-$(size))
914 install-gui-man: $(foreach lang,$(MAN_LANGS),install-gui-man-$(lang)) 917 install-gui-man: $(foreach lang,$(MAN_LANGS),install-gui-man-$(lang))
915 install-mencoder-man: $(foreach lang,$(MAN_LANGS),install-mencoder-man-$(lang)) 918 install-mencoder-man: $(foreach lang,$(MAN_LANGS),install-mencoder-man-$(lang))
916 install-mplayer-man: $(foreach lang,$(MAN_LANGS),install-mplayer-man-$(lang)) 919 install-mplayer-man: $(foreach lang,$(MAN_LANGS),install-mplayer-man-$(lang))
917 920
918 install-gui-man-en: install-mplayer-man-en 921 install-gui-man-en: install-mplayer-man-en
922 cd $(MANDIR)/man1 && ln -sf mplayer.1 mencoder.1 925 cd $(MANDIR)/man1 && ln -sf mplayer.1 mencoder.1
923 926
924 install-mplayer-man-en: 927 install-mplayer-man-en:
925 $(INSTALL) -d $(MANDIR)/man1 928 $(INSTALL) -d $(MANDIR)/man1
926 $(INSTALL) -m 644 DOCS/man/en/mplayer.1 $(MANDIR)/man1/ 929 $(INSTALL) -m 644 DOCS/man/en/mplayer.1 $(MANDIR)/man1/
930
931 define GUI_ICON_RULE
932 install-gui-icon-$(size):
933 $(INSTALL) -d $(prefix)/share/icons/hicolor/$(size)/apps
934 $(INSTALL) -m 644 etc/mplayer$(size).png $(prefix)/share/icons/hicolor/$(size)/apps/mplayer.png
935 endef
927 936
928 define GUI_MAN_RULE 937 define GUI_MAN_RULE
929 install-gui-man-$(lang): install-mplayer-man-$(lang) 938 install-gui-man-$(lang): install-mplayer-man-$(lang)
930 cd $(MANDIR)/$(lang)/man1/ && ln -sf mplayer.1 gmplayer.1 939 cd $(MANDIR)/$(lang)/man1/ && ln -sf mplayer.1 gmplayer.1
931 endef 940 endef
939 install-mplayer-man-$(lang): 948 install-mplayer-man-$(lang):
940 $(INSTALL) -d $(MANDIR)/$(lang)/man1 949 $(INSTALL) -d $(MANDIR)/$(lang)/man1
941 $(INSTALL) -m 644 DOCS/man/$(lang)/mplayer.1 $(MANDIR)/$(lang)/man1/ 950 $(INSTALL) -m 644 DOCS/man/$(lang)/mplayer.1 $(MANDIR)/$(lang)/man1/
942 endef 951 endef
943 952
953 $(foreach size,$(GUI_ICONSIZES),$(eval $(GUI_ICON_RULE)))
944 $(foreach lang,$(filter-out en,$(MAN_LANG_ALL)),$(eval $(GUI_MAN_RULE))) 954 $(foreach lang,$(filter-out en,$(MAN_LANG_ALL)),$(eval $(GUI_MAN_RULE)))
945 $(foreach lang,$(filter-out en,$(MAN_LANG_ALL)),$(eval $(MENCODER_MAN_RULE))) 955 $(foreach lang,$(filter-out en,$(MAN_LANG_ALL)),$(eval $(MENCODER_MAN_RULE)))
946 $(foreach lang,$(filter-out en,$(MAN_LANG_ALL)),$(eval $(MPLAYER_MAN_RULE))) 956 $(foreach lang,$(filter-out en,$(MAN_LANG_ALL)),$(eval $(MPLAYER_MAN_RULE)))
947 957
948 uninstall: 958 uninstall:
949 rm -f $(BINDIR)/mplayer$(EXESUF) $(BINDIR)/gmplayer$(EXESUF) 959 rm -f $(BINDIR)/mplayer$(EXESUF) $(BINDIR)/gmplayer$(EXESUF)
950 rm -f $(BINDIR)/mencoder$(EXESUF) 960 rm -f $(BINDIR)/mencoder$(EXESUF)
951 rm -f $(MANDIR)/man1/mencoder.1 $(MANDIR)/man1/mplayer.1 961 rm -f $(MANDIR)/man1/mencoder.1 $(MANDIR)/man1/mplayer.1
952 rm -f $(prefix)/share/pixmaps/mplayer.png 962 rm -f $(foreach size,$(GUI_ICONSIZES),$(prefix)/share/icons/hicolor/$(size)/apps/mplayer.png)
953 rm -f $(prefix)/share/applications/mplayer.desktop 963 rm -f $(prefix)/share/applications/mplayer.desktop
954 rm -f $(MANDIR)/man1/mplayer.1 $(MANDIR)/man1/mencoder.1 964 rm -f $(MANDIR)/man1/mplayer.1 $(MANDIR)/man1/mencoder.1
955 rm -f $(foreach lang,$(MAN_LANGS),$(foreach man,mplayer.1 mencoder.1,$(MANDIR)/$(lang)/man1/$(man))) 965 rm -f $(foreach lang,$(MAN_LANGS),$(foreach man,mplayer.1 mencoder.1,$(MANDIR)/$(lang)/man1/$(man)))
956 966
957 clean: 967 clean: