Install templates.
authorCarl Hetherington <carl@carlh.net>
Sat, 1 Jan 2011 16:59:38 +0000 (16:59 +0000)
committerCarl Hetherington <carl@carlh.net>
Sat, 1 Jan 2011 16:59:38 +0000 (16:59 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8400 d708f5d6-7413-0410-9779-e7cbd77b26cf

templates/wscript [new file with mode: 0644]
wscript

diff --git a/templates/wscript b/templates/wscript
new file mode 100644 (file)
index 0000000..2c2a9ef
--- /dev/null
@@ -0,0 +1,29 @@
+#!/usr/bin/python
+
+import os
+import glob
+
+srcdir = '.'
+blddir = 'build'
+
+def build(bld):
+    
+    subst_dict = {}
+    if bld.env['COREAUDIO']:
+        subst_dict['%JACK_INPUT%'] = 'coreaudio:Built-in Audio:in'
+        subst_dict['%JACK_OUTPUT%'] = 'coreaudio:Built-in Audio:out'
+    else:
+        subst_dict['%JACK_INPUT%'] = 'alsa_pcm:playback_'
+        subst_dict['%JACK_OUTPUT%'] = 'alsa_pcm:capture_'
+
+    templates = glob.glob(os.path.join(bld.get_curdir(), '*.template.in'))
+    for t in templates:
+        b = os.path.basename(t)
+        obj = bld.new_task_gen('subst')
+        obj.source = b
+        obj.target = b.replace('.in', '')
+        obj.dict = subst_dict
+        obj.install_path = os.path.join(bld.env['DATADIR'], 'ardour3', 'templates')
+
+def set_options(opt):
+    pass
diff --git a/wscript b/wscript
index d6c725a3dd8e481cc32b596b1000f03123f28697..bf1a1024da3b3f96ca9cf30a2d382c72f5a9ab3b 100644 (file)
--- a/wscript
+++ b/wscript
@@ -31,7 +31,8 @@ children = [
        'libs/clearlooks-newer',
        'libs/audiographer',
        'libs/gnomecanvas',
-       'gtk2_ardour'
+       'gtk2_ardour',
+       'templates'
 ]
 
 i18n_children = [