#!/usr/bin/env python
import autowaf
import os
+import glob
# Version of this package (even if built as a child)
MAJOR = '1'
conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
conf.write_config_header('wafconfig.h')
+ # TODO
+ conf.define('WINDOWS_KEY', 'Mod4')
+
# Boost headers
autowaf.check_header(conf, 'boost/shared_ptr.hpp')
autowaf.check_header(conf, 'boost/weak_ptr.hpp')
obj.chmod = 0755
obj.dict = wrapper_subst_dict
+ # Font configuration
+
+ font_subst_dict = {}
+ font_sizes = {}
+ base_font = ""
+
+ # Set up font substitution dictionary
+ for style in ['', 'BOLD', 'ITALIC']:
+ for sizename,points in font_sizes.iteritems():
+ if (len (style)):
+ key = "_".join (['FONT',style,sizename])
+ fontstyle = " ".join ([basefont,style.lower(),points])
+ else:
+ key = "_".join (['FONT',sizename])
+ fontstyle = " ".join ([basefont,points])
+ key = '%' + key + '%'
+ font_subst_dict[key] = fontstyle
+
+ # Set up font sizes
+ if bld.env['IS_OSX']: # OS X fonts
+ basefont = "Lucida Grande"
+ font_sizes = {
+ 'TINY' : '7',
+ 'SMALLER' : '9',
+ 'SMALL' : '10',
+ 'NORMAL' : '11',
+ 'BIG' : '12',
+ 'BIGGER' : '14',
+ 'LARGE' : '18',
+ 'LARGER' : '28',
+ 'HUGER' : '36',
+ 'MASSIVE' : '60'
+ }
+ else: # Linux/X11 fonts
+ basefont = "sans"
+ font_sizes = {
+ 'TINY' : '6',
+ 'SMALLER' : '8',
+ 'SMALL' : '9',
+ 'NORMAL' : '10',
+ 'BIG' : '14',
+ 'BIGGER' : '16',
+ 'LARGE' : '18',
+ 'LARGER' : '24',
+ 'HUGER' : '34',
+ 'MASSIVE' : '60'
+ }
+
+ # RC files
+
+ obj = bld.new_task_gen('subst')
+ obj.source = 'ardour3_ui_dark.rc.in'
+ obj.target = 'ardour3_ui_dark.rc'
+ obj.dict = font_subst_dict
+
+ obj = bld.new_task_gen('subst')
+ obj.source = 'ardour3_ui_light.rc.in'
+ obj.target = 'ardour3_ui_light.rc'
+ obj.dict = font_subst_dict
+
+ obj = bld.new_task_gen('subst')
+ obj.source = 'ardour3_ui_dark_sae.rc.in'
+ obj.target = 'ardour3_ui_dark_sae.rc'
+ obj.dict = font_subst_dict
+
+ obj = bld.new_task_gen('subst')
+ obj.source = 'ardour3_ui_light_sae.rc.in'
+ obj.target = 'ardour3_ui_light_sae.rc'
+ obj.dict = font_subst_dict
+
+ # Menus
+ menus_argv = []
+ if bld.env['GTKOSX']:
+ menus_argv = [ '-E', '-P', '-DGTKOSX', '-DTOP_MENUBAR', 'ardour.menus.in', 'ardour.menus' ]
+ else:
+ menus_argv = [ '-E', '-P', '../gtk2_ardour/ardour.menus.in' ]
+ obj = bld.new_task_gen('command-output')
+ obj.command = 'cpp'
+ obj.command_is_external = True
+ obj.no_inputs = True
+ obj.argv = menus_argv
+ obj.stdout = 'ardour.menus'
+
+ # Keybindings
+ keybindings_dict = {}
+ if bld.env['GTKOSX']:
+ keybindings_dict['%PRIMARY%'] = 'Meta'
+ keybindings_dict['%SECONDARY%'] = 'Mod1'
+ keybindings_dict['%TERTIARY%'] = 'Shift'
+ keybindings_dict['%LEVEL4%'] = 'Ctrl'
+ keybindings_dict['%WINDOW%'] = 'Mod1'
+ else:
+ keybindings_dict['%PRIMARY%'] = 'Ctrl'
+ keybindings_dict['%SECONDARY%'] = 'Alt'
+ keybindings_dict['%TERTIARY%'] = 'Shift'
+ keybindings_dict['%LEVEL4%'] = bld.env['WINDOWS_KEY']
+ keybindings_dict['%WINDOW%'] = 'Alt'
+
+ for b in [ 'SAE-de-keypad', 'SAE-de-nokeypad', 'SAE-us-keypad', 'SAE-us-nokeypad',
+ 'mnemonic-us', 'ergonomic-us' ]:
+ obj = bld.new_task_gen('subst')
+ obj.target = b + '.bindings'
+ obj.source = obj.target + '.in'
+ obj.dict = keybindings_dict
+
def shutdown():
autowaf.shutdown()