From ad4713a2163037bad70adc7522932a1e90d7aef4 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 8 Jun 2012 13:24:34 +0000 Subject: [PATCH] Patch from Tim Mayberry to fix substitution and install of session templates (#4918). git-svn-id: svn://localhost/ardour2/branches/3.0@12607 d708f5d6-7413-0410-9779-e7cbd77b26cf --- templates/16 Tracks/16 Tracks.template.in | 36 +++++++++++------------ templates/2 Track/2 Track.template.in | 8 ++--- templates/4 Tracks/4 Tracks.template.in | 12 ++++---- templates/8 Tracks/8 Tracks.template.in | 20 ++++++------- templates/wscript | 21 ++++++------- 5 files changed, 47 insertions(+), 50 deletions(-) diff --git a/templates/16 Tracks/16 Tracks.template.in b/templates/16 Tracks/16 Tracks.template.in index bb486ee7d8..2b157dcb42 100644 --- a/templates/16 Tracks/16 Tracks.template.in +++ b/templates/16 Tracks/16 Tracks.template.in @@ -53,7 +53,7 @@ - + @@ -83,7 +83,7 @@ - + @@ -115,7 +115,7 @@ - + @@ -147,7 +147,7 @@ - + @@ -179,7 +179,7 @@ - + @@ -211,7 +211,7 @@ - + @@ -243,7 +243,7 @@ - + @@ -275,7 +275,7 @@ - + @@ -307,7 +307,7 @@ - + @@ -339,7 +339,7 @@ - + @@ -371,7 +371,7 @@ - + @@ -403,7 +403,7 @@ - + @@ -435,7 +435,7 @@ - + @@ -467,7 +467,7 @@ - + @@ -499,7 +499,7 @@ - + @@ -531,7 +531,7 @@ - + @@ -563,7 +563,7 @@ - + @@ -600,7 +600,7 @@ - + diff --git a/templates/2 Track/2 Track.template.in b/templates/2 Track/2 Track.template.in index 39306afa6e..bdf60c7f35 100644 --- a/templates/2 Track/2 Track.template.in +++ b/templates/2 Track/2 Track.template.in @@ -39,7 +39,7 @@ - + @@ -69,7 +69,7 @@ - + @@ -101,7 +101,7 @@ - + @@ -138,7 +138,7 @@ - + diff --git a/templates/4 Tracks/4 Tracks.template.in b/templates/4 Tracks/4 Tracks.template.in index d85134e3b2..c64d098ed9 100644 --- a/templates/4 Tracks/4 Tracks.template.in +++ b/templates/4 Tracks/4 Tracks.template.in @@ -41,7 +41,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -103,7 +103,7 @@ - + @@ -135,7 +135,7 @@ - + @@ -167,7 +167,7 @@ - + @@ -204,7 +204,7 @@ - + diff --git a/templates/8 Tracks/8 Tracks.template.in b/templates/8 Tracks/8 Tracks.template.in index 7dc2b03834..fe0dd6f009 100644 --- a/templates/8 Tracks/8 Tracks.template.in +++ b/templates/8 Tracks/8 Tracks.template.in @@ -45,7 +45,7 @@ - + @@ -75,7 +75,7 @@ - + @@ -107,7 +107,7 @@ - + @@ -139,7 +139,7 @@ - + @@ -171,7 +171,7 @@ - + @@ -203,7 +203,7 @@ - + @@ -235,7 +235,7 @@ - + @@ -267,7 +267,7 @@ - + @@ -299,7 +299,7 @@ - + @@ -336,7 +336,7 @@ - + diff --git a/templates/wscript b/templates/wscript index 9e390434e6..dd60d401a5 100644 --- a/templates/wscript +++ b/templates/wscript @@ -10,24 +10,21 @@ def configure(conf): def build(bld): - subst_dict = {} if bld.is_defined('COREAUDIO_SUPPORT'): - subst_dict['%JACK_INPUT%'] = 'coreaudio:Built-in Audio:in' - subst_dict['%JACK_OUTPUT%'] = 'coreaudio:Built-in Audio:out' + subst_dict = {'JACK_INPUT': 'coreaudio:Built-in Audio:in', 'JACK_OUTPUT': 'coreaudio:Built-in Audio:out'} else: - subst_dict['%JACK_INPUT%'] = 'alsa_pcm:playback_' - subst_dict['%JACK_OUTPUT%'] = 'alsa_pcm:capture_' + subst_dict = {'JACK_INPUT': 'system:playback_','JACK_OUTPUT': 'system:capture_'} - templates = bld.path.ant_glob('*.template.in') + templates = bld.path.ant_glob('*/*.template.in') for t in templates: - obj = bld(features = 'subst') - obj.name = 'template' - obj.source = [ t ] dir_name = os.path.basename(t.srcpath()).replace('.template.in', '') file_name = os.path.basename(t.srcpath()).replace('.in', '') - obj.target = [ os.path.join(dir_name, file_name) ] - obj.dict = subst_dict - obj.install_path = os.path.join(bld.env['DATADIR'], 'ardour3', os.path.join('templates', dir_name)) + obj = bld(features = 'subst', + name = 'template', + source = [ t ], + target = [ os.path.join(dir_name, file_name) ], + install_path = os.path.join(bld.env['DATADIR'], 'ardour3', os.path.join('templates', dir_name))) + obj.__dict__.update(subst_dict) def options(opt): pass