From 17b09708f64ecc5381988fe2e93606e8230340e9 Mon Sep 17 00:00:00 2001 From: Nick Mainsbridge Date: Mon, 25 Feb 2008 17:37:55 +0000 Subject: New FREEDESKTOP scons option installs desktop MIME entry and .desktop file. Also uses fd.o standard names and locations for icons. git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3121 d708f5d6-7413-0410-9779-e7cbd77b26cf --- SConstruct | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 520bcdd058..462fea93e8 100644 --- a/SConstruct +++ b/SConstruct @@ -50,6 +50,7 @@ opts.AddOptions( BoolOption('VST', 'Compile with support for VST', 0), BoolOption('LV2', 'Compile with support for LV2 (if slv2 is available)', 1), BoolOption('GPROFILE', 'Compile with support for gprofile (Developers only)', 0), + BoolOption('FREEDESKTOP', 'Install MIME type, icons and .desktop file as per the freedesktop.org spec (requires xdg-utils and shared-mime-info). "scons uninstall" removes associations in desktop database', 0), BoolOption('TRANZPORT', 'Compile with support for Frontier Designs (if libusb is available)', 1) ) @@ -926,6 +927,26 @@ else: libraries['dmalloc'] = conf.Finish () +# +# ensure FREEDESKTOP target is doable.. +# + +conf = env.Configure () +if env['FREEDESKTOP']: + have_update_mime_database = conf.TryAction (Action ('update-mime-database -v')) + if have_update_mime_database[0] != 1: + print "Warning. You have no update-mime-database command in your PATH. FREEDESKTOP is now disabled." + env['FREEDESKTOP'] = 0 + have_gtk_update_icon_cache = conf.TryAction (Action ('gtk-update-icon-cache -?')) + if have_gtk_update_icon_cache[0] != 1: + print "Warning. You have no gtk-update-icon-cache command in your PATH. FREEDESKTOP is now disabled." + env['FREEDESKTOP'] = 0 + have_update_desktop_database = conf.TryAction (Action ('update-desktop-database -?')) + if have_update_desktop_database[0] != 1: + print "Warning. You have no update-desktop-database command in your PATH. FREEDESKTOP is now disabled." + env['FREEDESKTOP'] = 0 +env = conf.Finish() + # # Audio/MIDI library (needed for MIDI, since audio is all handled via JACK) # -- cgit v1.2.3