build ardour3_ui_default.conf at build time, to allow font substitutions to be done...
[ardour.git] / gtk2_ardour / wscript
index 23368bdc74b62df5342a1378656b9303c5c4bd98..14114a5baf55482b3931abc2aa4459956e1b3203 100644 (file)
@@ -519,6 +519,7 @@ def build(bld):
 
     dark_rc_subst_dict = {}
     light_rc_subst_dict = {}
+    ui_conf_dict = {}
     font_sizes      = {}
     base_font       = ""
 
@@ -579,18 +580,21 @@ def build(bld):
 
             dark_rc_subst_dict[key] = fontstyle
             light_rc_subst_dict[key] = fontstyle
-
+            ui_conf_dict[key] = points
+            
     # @FONT_SIZE_XXXX@
     for sizename,points in iter(font_sizes.items()):
             key = "_".join (['FONT_SIZE',sizename])
             dark_rc_subst_dict[key] = points
             light_rc_subst_dict[key] = points
+            ui_conf_dict[key] = points
 
     # various font names, eg @BOLD_MONOSPACE@
     for font_sym,text in iter(font_names.items()):
         key = font_sym
         dark_rc_subst_dict[key] = text
         light_rc_subst_dict[key] = text
+        ui_conf_dict[key] = text
 
     # RC files
     dark_rc_subst_dict['COLOR_SCHEME'] = build_color_scheme(
@@ -655,6 +659,12 @@ def build(bld):
     obj.target = 'ardour3_ui_light.rc'
     obj.install_path = bld.env['CONFDIR']
 
+    obj              = bld(features = 'subst')
+    obj.source       = [ 'ardour3_ui_default.conf.in' ]
+    obj.target       = 'ardour3_ui_default.conf'
+    obj.install_path = None
+    set_subst_dict(obj, ui_conf_dict)
+
     # Menus
     menus_argv = []
     if bld.is_defined('GTKOSX'):