envy24control: add .desktop and icon files
authorJaroslav Kysela <perex@perex.cz>
Wed, 15 Nov 2017 10:09:04 +0000 (11:09 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 15 Nov 2017 10:15:35 +0000 (11:15 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

.gitignore
envy24control/Makefile.am
envy24control/configure.ac
envy24control/desktop/Makefile.am [new file with mode: 0644]
envy24control/desktop/envy24control.desktop [new file with mode: 0644]
envy24control/desktop/hicolor_apps_48x48_envy24control.png [new file with mode: 0644]

index 57c5d65..e72c2e5 100644 (file)
@@ -46,8 +46,10 @@ as10k1/configure
 echomixer/echomixer
 echomixer/Makefile
 echomixer/configure
+echomixer/desktop/Makefile
 envy24control/Makefile
 envy24control/configure
+envy24control/desktop/Makefile
 hdspconf/Makefile
 hdspconf/configure
 hdspconf/src/hdspconf
index aaa50ee..72ced31 100644 (file)
@@ -1,3 +1,4 @@
+SUBDIRS = desktop
 AM_CFLAGS = @ENVY24CONTROL_CFLAGS@
 bin_PROGRAMS = envy24control
 man_MANS = envy24control.1
index 08dcdd8..776f290 100644 (file)
@@ -7,4 +7,4 @@ AM_MAINTAINER_MODE([enable])
 
 PKG_CHECK_MODULES(ENVY24CONTROL, gtk+-2.0 alsa >= 0.9.0)
 
-AC_OUTPUT(Makefile)
+AC_OUTPUT(Makefile desktop/Makefile)
diff --git a/envy24control/desktop/Makefile.am b/envy24control/desktop/Makefile.am
new file mode 100644 (file)
index 0000000..0a6d6ca
--- /dev/null
@@ -0,0 +1,34 @@
+APPNAME = envy24control
+
+desktopdir = $(datadir)/applications
+desktop_DATA = $(APPNAME).desktop
+
+public_icons = \
+       hicolor_apps_48x48_$(APPNAME).png
+
+EXTRA_DIST = \
+       $(public_icons)         \
+       $(desktop_DATA)
+
+install-icons:
+       for icon in $(public_icons); do \
+               THEME=`echo $$icon | cut -d_ -f1`; \
+               CONTEXT=`echo $$icon | cut -d_ -f2`; \
+               SIZE=`echo $$icon | cut -d_ -f3`; \
+               ICONFILE=`echo $$icon | cut -d_ -f4`; \
+               mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
+               $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
+       done
+
+uninstall-icons:
+       -for icon in $(public_icons); do \
+               THEME=`echo $$icon | cut -d_ -f1`; \
+               CONTEXT=`echo $$icon | cut -d_ -f2`; \
+               SIZE=`echo $$icon | cut -d_ -f3`; \
+               ICONFILE=`echo $$icon | cut -d_ -f4`; \
+               rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
+       done
+
+install-data-local: install-icons
+
+uninstall-local: uninstall-icons
diff --git a/envy24control/desktop/envy24control.desktop b/envy24control/desktop/envy24control.desktop
new file mode 100644 (file)
index 0000000..391c647
--- /dev/null
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Envy24 Control
+GenericName=Envy24 Control Utility
+Comment=Mixer and GUI control utility for Envy24-based sound cards
+Exec=envy24control
+Icon=envy24control
+Terminal=false
+Type=Application
+Categories=AudioVideo;
+Version=0.9.4
diff --git a/envy24control/desktop/hicolor_apps_48x48_envy24control.png b/envy24control/desktop/hicolor_apps_48x48_envy24control.png
new file mode 100644 (file)
index 0000000..73c47d6
Binary files /dev/null and b/envy24control/desktop/hicolor_apps_48x48_envy24control.png differ