summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorNick Mainsbridge <beatroute@iprimus.com.au>2008-02-25 17:37:55 +0000
committerNick Mainsbridge <beatroute@iprimus.com.au>2008-02-25 17:37:55 +0000
commit17b09708f64ecc5381988fe2e93606e8230340e9 (patch)
tree25a9d2890a6582d7e986f2eac3af6df3338128ba /SConstruct
parent2f18e339cdffadbc5a37db39207dc1f7be7cb8ac (diff)
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
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct21
1 files changed, 21 insertions, 0 deletions
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)
)
@@ -927,6 +928,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)
#