diff options
-rw-r--r-- | gtk2_ardour/ardev-common-waf.sh.in | 4 | ||||
-rw-r--r-- | gtk2_ardour/wscript | 109 | ||||
-rw-r--r-- | libs/ardour/filesystem_paths.cc | 11 |
3 files changed, 112 insertions, 12 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() diff --git a/libs/ardour/filesystem_paths.cc b/libs/ardour/filesystem_paths.cc index a13b7fc45f..bc2055c0dc 100644 --- a/libs/ardour/filesystem_paths.cc +++ b/libs/ardour/filesystem_paths.cc @@ -36,8 +36,7 @@ user_config_directory () { const string home_dir = Glib::get_home_dir (); - if (home_dir.empty ()) - { + if (home_dir.empty ()) { const string error_msg = "Unable to determine home directory"; // log the error @@ -71,13 +70,9 @@ SearchPath system_config_search_path () { #ifdef WITH_STATIC_PATHS - SearchPath config_path(string(CONFIG_DIR)); - #else - SearchPath config_path(system_config_directories()); - #endif config_path.add_subdirectory_to_paths("ardour3"); @@ -89,13 +84,9 @@ SearchPath system_data_search_path () { #ifdef WITH_STATIC_PATHS - SearchPath data_path(string(DATA_DIR)); - #else - SearchPath data_path(system_data_directories()); - #endif data_path.add_subdirectory_to_paths("ardour3"); |