From: Richard W.M. Jones Date: Wed, 27 Jul 2011 11:22:03 +0000 (+0100) Subject: Add guestfs-browser.desktop file. X-Git-Tag: 0.1.7~3 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=fe4514d682e2f3bad517a764f97292c3d8a23a71;p=guestfs-browser.git Add guestfs-browser.desktop file. --- diff --git a/Makefile.am b/Makefile.am index 21cab22..e535ffe 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ # Guestfs Browser. -# Copyright (C) 2010 Red Hat Inc. +# Copyright (C) 2010-2011 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,10 +24,14 @@ EXTRA_DIST = \ .gitignore guestfs-browser.spec \ guestfs-browser.pod \ guestfs-browser.1 \ + guestfs-browser.desktop \ + test-desktop-file-validate.sh \ html/pod.css CLEANFILES = *.cmi *.cmo *.cmx *.cmxa *.o guestfs-browser *~ +TESTS = + # These are listed here in alphabetical order. SOURCES = \ cmdline.mli \ @@ -114,6 +118,12 @@ throbber.ml: Throbber.png Throbber.gif .ml.cmx: $(OCAMLFIND) ocamlopt $(OCAMLCFLAGS) -c $< -o $@ +# Desktop file. +desktopdir = $(datadir)/applications +desktop_DATA = guestfs-browser.desktop + +TESTS += test-desktop-file-validate.sh + # Man page. man_MANS = guestfs-browser.1 diff --git a/guestfs-browser.desktop b/guestfs-browser.desktop new file mode 100644 index 0000000..7d37778 --- /dev/null +++ b/guestfs-browser.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=Virtual Machine Filesystem Browser +Comment=Browse inside the filesystems of virtual machines (guestfs-browser) +Exec=guestfs-browser +Type=Application +Terminal=false +Categories=System; diff --git a/test-desktop-file-validate.sh b/test-desktop-file-validate.sh new file mode 100755 index 0000000..2810267 --- /dev/null +++ b/test-desktop-file-validate.sh @@ -0,0 +1,26 @@ +#!/bin/sh - +# Guestfs Browser. +# Copyright (C) 2011 Red Hat Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +target=guestfs-browser.desktop + +if ! desktop-file-validate --help >/dev/null 2>&1; then + echo "install 'desktop-file-validate' program to validate the $target file" + exit 0 +fi + +exec desktop-file-validate "$target"