X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=templates%2Fwscript;h=ab7e8d076865101039d68bb33dbd8009ea8e2098;hb=ac05f050238d4b51c7b6a042e25cee59dc34da80;hp=3deb74c8d72d899f5f914ee16344c26f4f95e12c;hpb=a6d7098797b31046d4b6d7e6ba40a508b6344ee6;p=ardour.git diff --git a/templates/wscript b/templates/wscript index 3deb74c8d7..ab7e8d0768 100644 --- a/templates/wscript +++ b/templates/wscript @@ -1,5 +1,22 @@ #!/usr/bin/python +# +# Paul notes (April 2013) +# +# There seems to be little point in including templates with Ardour +# until or as long as the input connections of tracks depends on +# the user's hardware configuration. This makes any pre-existing +# templates potentially wrong/useless/annoying for anyone who +# uses a different hardware input configuration than was used +# to create the templates. +# +# Templates should be created by the user, not by us. +# +# I modified the code below, but have not tested it. For now +# this directory will be removed from the top level wscript's +# list of children. +# + import os top = '.' @@ -10,21 +27,15 @@ def configure(conf): def build(bld): - subst_dict = {} - if bld.is_defined('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 = bld.path.ant_glob('*.template.in') + templates = bld.path.ant_glob('*/*.template') for t in templates: - obj = bld(features = 'subst') - obj.source = [ t ] - obj.target = [ os.path.basename(t.srcpath()).replace('.in', '') ] - obj.dict = subst_dict - obj.install_path = os.path.join(bld.env['DATADIR'], 'ardour3', 'templates') + file_name = os.path.basename(t.srcpath()) + dir_name = os.path.dirname(t.srcpath()) + obj = bld(features = 'subst', + name = 'template', + source = [ t ], + target = [ os.path.join(dir_name, file_name) ], + install_path = os.path.join(bld.env['DATADIR'], os.path.join('templates', dir_name))) def options(opt): pass