diff options
author | David Robillard <d@drobilla.net> | 2009-02-26 04:41:09 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-02-26 04:41:09 +0000 |
commit | 0dac6b545b8b7467ee6488f6b4d48d81322db457 (patch) | |
tree | 36c6f7ca3b181faa7e3bfb845476f086d1770e72 /gtk2_ardour | |
parent | 802fac5ea2e1e24419195aa1b00e754eeab9ad48 (diff) |
Waf: build UI/RC files, menu files, keybinding files, and fix paths in wrapper scripts.
Ardour should now build and run when built with waf from a clean svn checkout.
git-svn-id: svn://localhost/ardour2/branches/3.0@4676 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardev-common-waf.sh.in | 4 | ||||
-rw-r--r-- | gtk2_ardour/wscript | 109 |
2 files changed, 111 insertions, 2 deletions
diff --git a/gtk2_ardour/ardev-common-waf.sh.in b/gtk2_ardour/ardev-common-waf.sh.in index 3a6e0e4dc9..70b37cd381 100644 --- a/gtk2_ardour/ardev-common-waf.sh.in +++ b/gtk2_ardour/ardev-common-waf.sh.in @@ -4,9 +4,9 @@ cd `dirname "$0"`/.. libs=build/default/libs -export ARDOUR_PATH=gtk2_ardour/icons:gtk2_ardour/pixmaps:gtk2_ardour:. +export ARDOUR_PATH=gtk2_ardour/icons:gtk2_ardour/pixmaps:gtk2_ardour:build/default/gtk2_ardour:. export ARDOUR_SURFACES_PATH=$libs/surfaces/osc:$libs/surfaces/generic_midi:$libs/surfaces/tranzport:$libs/surfaces/powermate -export ARDOUR_DATA_PATH=gtk2_ardour:. +export ARDOUR_DATA_PATH=gtk2_ardour:build/default/gtk2_ardour:. if test -d $HOME/gtk/inst ; then echo USING NEW CLEARLOOKS export GTK_PATH=~/.ardour3:$libs/clearlooks-newer diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 4381598761..c98037f24f 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -1,6 +1,7 @@ #!/usr/bin/env python import autowaf import os +import glob # Version of this package (even if built as a child) MAJOR = '1' @@ -44,6 +45,9 @@ def configure(conf): 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') @@ -255,6 +259,111 @@ def build(bld): 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() |