X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=templates%2Fwscript;h=3ea6c4a1e5c0cbb456f5e7b334446ee98e33578a;hb=0026399358e04ccac5e49dd79f4c832730060370;hp=2c2a9efb4414c9a7f2bbb4774b3accb01300d2af;hpb=ce83dd0df1dc0cfba7829758d8d5c585e15282c0;p=ardour.git diff --git a/templates/wscript b/templates/wscript index 2c2a9efb44..3ea6c4a1e5 100644 --- a/templates/wscript +++ b/templates/wscript @@ -1,29 +1,41 @@ #!/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 -import glob -srcdir = '.' -blddir = 'build' +top = '.' +out = 'build' + +def configure(conf): + pass 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')) + templates = bld.path.ant_glob('*/*.template') 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') + 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 set_options(opt): +def options(opt): pass