3 # Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
5 # This file is part of GNU Radio
7 # GNU Radio is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3, or (at your option)
12 # GNU Radio is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Radio; see the file COPYING. If not, write to
19 # the Free Software Foundation, Inc., 51 Franklin Street,
20 # Boston, MA 02110-1301, USA.
22 ##################################################
23 # setup grc on a freedesktop platform
24 # $1 should be install or uninstall
25 # $2 is the optional path to the files
26 # when $2 is unspecified, the path is:
28 ##################################################
30 ICON_SIZES="32 48 64 128 256"
31 MENU_ITEMS="grc usrp2_probe usrp_probe"
40 echo "Begin freedesktop install..."
41 for size in ${ICON_SIZES}; do \
42 echo "Install icon: ${size}x${size}"
43 xdg-icon-resource install --noupdate --context mimetypes --theme gnome --size ${size} ${SRCDIR}/grc-icon-${size}.png application-gnuradio-grc; \
44 xdg-icon-resource install --noupdate --context mimetypes --size ${size} ${SRCDIR}/grc-icon-${size}.png application-gnuradio-grc; \
45 xdg-icon-resource install --noupdate --context apps --theme gnome --size ${size} ${SRCDIR}/grc-icon-${size}.png gnuradio-grc; \
46 xdg-icon-resource install --noupdate --context apps --size ${size} ${SRCDIR}/grc-icon-${size}.png gnuradio-grc; \
48 xdg-icon-resource forceupdate
49 echo "Install mime type"
50 xdg-mime install ${SRCDIR}/gnuradio-grc.xml
51 echo "Install menu items"
52 for menu_item in ${MENU_ITEMS}; do \
53 xdg-desktop-menu install ${SRCDIR}/gnuradio-${menu_item}.desktop; \
59 echo "Begin freedesktop uninstall..."
60 for size in ${ICON_SIZES}; do \
61 echo "Uninstall icon: ${size}x${size}"
62 xdg-icon-resource uninstall --noupdate --context mimetypes --theme gnome --size ${size} application-gnuradio-grc; \
63 xdg-icon-resource uninstall --noupdate --context mimetypes --size ${size} application-gnuradio-grc; \
64 xdg-icon-resource uninstall --noupdate --context apps --theme gnome --size ${size} gnuradio-grc; \
65 xdg-icon-resource uninstall --noupdate --context apps --size ${size} gnuradio-grc; \
67 xdg-icon-resource forceupdate
68 echo "Uninstall mime type"
69 xdg-mime uninstall ${SRCDIR}/gnuradio-grc.xml
70 echo "Uninstall menu items"
71 for menu_item in ${MENU_ITEMS}; do \
72 xdg-desktop-menu uninstall gnuradio-${menu_item}.desktop; \
78 echo "Usage: $0 [install|uninstall]"