[vlc-commits] Correct paths for and inside desktop entry inspite of --prefix

Rémi Denis-Courmont git at videolan.org
Wed Oct 5 22:50:53 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Oct  5 23:41:29 2011 +0300| [289fbc6a3886d16bf1ccac92a557a65524179ac5] | committer: Rémi Denis-Courmont

Correct paths for and inside desktop entry inspite of --prefix

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=289fbc6a3886d16bf1ccac92a557a65524179ac5
---

 share/Makefile.am                     |   14 ++++++++++----
 share/{vlc.desktop => vlc.desktop.in} |    4 ++--
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/share/Makefile.am b/share/Makefile.am
index 0acb31f..e21667e 100644
--- a/share/Makefile.am
+++ b/share/Makefile.am
@@ -1,7 +1,6 @@
 CLEANFILES = skins2/default.vlt
 MOSTLYCLEANFILES =
-
-appdatadir = $(datadir)/applications/
+EXTRA_DIST =
 
 iconsdatadir = $(datadir)/icons/hicolor/
 icons16dir = $(iconsdatadir)/16x16/apps/
@@ -10,7 +9,14 @@ icons48dir = $(iconsdatadir)/48x48/apps/
 icons128dir = $(iconsdatadir)/128x128/apps/
 icons256dir = $(iconsdatadir)/256x256/apps/
 
-dist_appdata_DATA = vlc.desktop
+appdatadir = /usr/share/applications
+appdata_DATA = vlc.desktop
+EXTRA_DIST += vlc.desktop.in
+CLEANFILES += $(appdata_DATA)
+
+vlc.desktop: vlc.desktop.in $(top_builddir)/config.status
+	$(AM_V_GEN)sed -e 's,\@bindir\@,$(bindir),g' < "$<" > $@.tmp
+	$(AM_V_at)mv -f $@.tmp $@
 
 dist_vlcdata_DATA = icons/vlc.ico
 dist_icons16_DATA = icons/16x16/vlc.png icons/16x16/vlc.xpm
@@ -26,7 +32,7 @@ nobase_dist_vlcdata_SCRIPTS = \
 	utils/video-vlc-default.sh \
 	$(NULL)
 
-EXTRA_DIST = \
+EXTRA_DIST += \
 	$(skins2_default_vlt_FILES) \
 	$(DIST_rsrc) \
 	$(DIST_skins2) \
diff --git a/share/vlc.desktop b/share/vlc.desktop.in
similarity index 99%
rename from share/vlc.desktop
rename to share/vlc.desktop.in
index 5080aa4..86c80df 100644
--- a/share/vlc.desktop
+++ b/share/vlc.desktop.in
@@ -66,8 +66,8 @@ GenericName[wa]=Djouweu d' media
 Comment[wa]=Lét, egaloye, evoye vos floûs multimedia
 Name[zh_CN]=VLC media player
 Comment[zh_CN]=为您读取、捕获或发送多媒体流
-Exec=vlc %U
-TryExec=vlc
+Exec=@bindir@/vlc %U
+TryExec=@bindir@/vlc
 Icon=vlc
 Terminal=false
 Type=Application



More information about the vlc-commits mailing list