X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fwscript;h=36223bd2cbdd0e9f0a41fc17803a178fb74da710;hb=5b347e92587513bfb7d6321e6bd67195db9c0ad5;hp=38d93893d0718e1133073f2a9dbbd5acf13d11dd;hpb=3bb06f460714c11ffbc1872104830a8d71e575df;p=ardour.git diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 38d93893d0..36223bd2cb 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -97,6 +97,7 @@ gtk2_ardour_sources = [ 'export_format_dialog.cc', 'export_format_selector.cc', 'export_preset_selector.cc', + 'export_report.cc', 'export_timespan_selector.cc', 'fft.cc', 'fft_graph.cc', @@ -121,6 +122,9 @@ gtk2_ardour_sources = [ 'led.cc', 'level_meter.cc', 'location_ui.cc', + 'lua_script_manager.cc', + 'luainstance.cc', + 'luawindow.cc', 'main.cc', 'main_clock.cc', 'marker.cc', @@ -206,6 +210,7 @@ gtk2_ardour_sources = [ 'ruler_dialog.cc', 'save_as_dialog.cc', 'search_path_option.cc', + 'script_selector.cc', 'selection.cc', 'selection_memento.cc', 'send_ui.cc', @@ -245,7 +250,6 @@ gtk2_ardour_sources = [ 'utils.cc', 'verbose_cursor.cc', 'visibility_group.cc', - 'volume_controller.cc', 'window_manager.cc', # video-timeline related sources: 'video_image_frame.cc', @@ -263,6 +267,11 @@ gtk2_ardour_sources = [ ] def enoify (major, minor): + # Code names based on + # https://en.wikipedia.org/wiki/Brian_Eno_discography + # + # sort Studio albums + Collaborative albums + Compilation albums by Month/Year. + # (no Singles, no EPs, no Video Albums, no Production) if major == 3: return "\\n\\\"E-No\\\"" elif major == 4: @@ -280,6 +289,10 @@ def enoify (major, minor): return "\\n\\\"Another Green World\\\"" elif minor == 6: return "\\n\\\"Evening Star\\\"" + elif minor == 7: + return "\\n\\\"Cluster and Eno\\\"" + elif minor == 8: + return "\\n\\\"Before and After Science\\\"" return "\\\"\\\"" def options(opt): @@ -340,7 +353,7 @@ def _doPyp(infileName, deps = False): inLines = fd.readlines() if fd != sys.stdin: fd.close() - + for line in inLines: bits = re_spaces.split(line) @@ -422,10 +435,12 @@ def build(bld): # now the shared library containing the GTK GUI for ardour obj = bld (features = 'cxx c cxxshlib') - obj.source = gtk2_ardour_sources + # operate on copy to avoid adding sources twice + obj.source = list(gtk2_ardour_sources) obj.includes = [ '../libs/fst', '.' ] obj.name = 'libgtk2_ardour' obj.target = 'gtk2_ardour' + obj.cflags = [ '-fPIC' ] else: # just the normal executable version of the GTK GUI @@ -433,7 +448,8 @@ def build(bld): obj = bld (features = 'cxx c cxxprogram winres') else: obj = bld (features = 'cxx c cxxprogram') - obj.source = gtk2_ardour_sources + # operate on copy to avoid adding sources twice + obj.source = list(gtk2_ardour_sources) obj.target = 'ardour-' + str (bld.env['VERSION']) obj.includes = ['.'] obj.ldflags = ['-no-undefined'] @@ -463,13 +479,10 @@ def build(bld): ] obj.install_path = bld.env['DLLDIR'] obj.linkflags = '' - obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD GTK OGG CURL DL' - obj.uselib += ' GTKMM CANVAS FFTW3F' - obj.uselib += ' AUDIOUNITS OSX GTKOSX LO ' - obj.uselib += ' TAGLIB ' + obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD GTK OGG CURL DL GTKMM CANVAS FFTW3F LO TAGLIB XML ' if sys.platform == 'darwin': - obj.uselib += ' AUDIOUNITS OSX GTKOSX' + obj.uselib += ' AUDIOUNITS OSX ' obj.use += ' libappleutility' obj.source += [ 'cocoacarbon.mm', 'bundle_env_cocoa.cc' ] elif bld.env['build_target'] == 'mingw': @@ -490,7 +503,7 @@ def build(bld): obj.use += [ 'SUIL' ] if bld.is_defined('HAVE_FFTW35F') and bld.env['build_target'] != 'mingw': - obj.linkflags += ' -lfftw3f_threads' + bld.env['LIB_FFTW3F'] += ['fftw3f_threads'] if bld.is_defined('NEED_INTL'): obj.linkflags += ' -lintl' @@ -500,7 +513,7 @@ def build(bld): obj.defines += [ 'WINDOWS_VST_SUPPORT' ] if bld.env['build_target'] != 'mingw': obj.use += [ 'X11' ] - + if bld.is_defined('LXVST_SUPPORT'): obj.source += [ 'linux_vst_gui_support.cc', 'lxvst_plugin_ui.cc' ] obj.defines += [ 'LXVST_SUPPORT' ] @@ -508,7 +521,7 @@ def build(bld): if bld.is_defined('WINDOWS_VST_SUPPORT') or bld.is_defined('LXVST_SUPPORT'): obj.source += [ 'vst_plugin_ui.cc' ] - + if bld.is_defined('PHONE_HOME'): obj.defines += [ 'PHONE_HOME' ] @@ -566,7 +579,7 @@ def build(bld): base_font = "" # Set up font sizes - if bld.is_defined('GTKOSX'): # OS X fonts + if sys.platform == 'darwin': basefont = "" font_sizes = { 'SMALLER' : '9', @@ -579,9 +592,9 @@ def build(bld): 'HUGER' : '36', 'MASSIVE' : '60', } - + # There is no acceptable monospace font available on older versions of OS X - # and no API on those versions to load TTF files that will work with + # and no API on those versions to load TTF files that will work with # GTK/fontconfig/pango. # # In addition, the ArdourMono font gets clipped for some reason on OS X @@ -621,9 +634,9 @@ def build(bld): else: key = "_".join (['FONT',sizename]) fontstyle = " ".join ([basefont,points]) - + font_subst_dict[key] = fontstyle - + # @FONT_SIZE_XXXX@ for sizename,points in iter(font_sizes.items()): key = "_".join (['FONT_SIZE',sizename]) @@ -650,8 +663,8 @@ def build(bld): # Menus menus_argv = [] - if bld.is_defined('GTKOSX'): - menus_argv = [ '-E', '-P', '-DGTKOSX' ] + if sys.platform == 'darwin': + menus_argv = [ '-E', '-P', '-D__APPLE__', '-' ] else: menus_argv = [ '-E', '-P' ] @@ -703,25 +716,20 @@ def build(bld): # Keybindings - # 'SAE-de-keypad', 'SAE-de-nokeypad', 'SAE-us-keypad', - # 'SAE-us-nokeypad', 'ergonomic-us' - - # + # NATIVE ARDOUR BINDING FILES # explicitly state the use of perl here so that it works on windows too # - a_rule = 'perl ../tools/fmt-bindings --platform="%s" --winkey="%s" --accelmap <${SRC} >${TGT}' % (sys.platform, bld.env['WINDOWS_KEY'] ) - for b in [ 'mnemonic-us' ] : + a_rule = 'perl ../tools/fmt-bindings --platform="%s" --winkey="%s" --accelmap ${SRC[0].abspath()} >${TGT}' % (sys.platform, bld.env['WINDOWS_KEY'] ) + for b in [ 'ardour' ] : obj = bld( - target = b + '.bindings', - source = b + '.bindings.in', + target = b + '.keys', + source = [ b + '.keys.in', 'mixer.bindings', 'processor_box.bindings', 'step_editing.bindings', 'monitor.bindings' ], rule = a_rule ) obj.install_path = bld.env['CONFDIR'] - + # not modified at present bld.install_files(bld.env['CONFDIR'], 'dark.colors') - bld.install_files(bld.env['CONFDIR'], 'step_editing.bindings') - bld.install_files(bld.env['CONFDIR'], 'mixer.bindings') # Icons/Images bld.install_files(os.path.join (bld.env['DATADIR'], 'icons'), bld.path.ant_glob('icons/*.png')) @@ -758,7 +766,7 @@ def i18n(bld): 'Paul Davis') appdata_i18n_pot(bld) appdata_i18n_po(bld) - + def i18n_pot(bld): I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR'] autowaf.build_i18n_pot(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources, @@ -770,21 +778,25 @@ def i18n_po(bld): autowaf.build_i18n_po(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources, 'Paul Davis') appdata_i18n_po(bld) - + def i18n_mo(bld): I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR'] autowaf.build_i18n_mo(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources, 'Paul Davis') def appdata_i18n_pot(bld): - Logs.info('Generating pot file from Ardour appdata') - itsfile = os.path.join(bld.top_dir, 'tools', 'as-metainfo.its') potfile = os.path.join(bld.top_dir, 'gtk2_ardour', 'appdata', 'ardour.appdata.pot') - adsource = os.path.join(bld.top_dir, 'gtk2_ardour', - 'ardour.appdata.xml.in.in') - Logs.info('Updating ' + potfile) - subprocess.call(('itstool', '-i', itsfile, '-o', potfile, adsource)) + if bld.cmd == 'build': + Logs.info('Generating pot file from Ardour appdata') + itsfile = os.path.join(bld.top_dir, 'tools', 'as-metainfo.its') + adsource = os.path.join(bld.top_dir, 'gtk2_ardour', + 'ardour.appdata.xml.in.in') + Logs.info('Updating ' + potfile) + subprocess.call(('itstool', '-i', itsfile, '-o', potfile, adsource)) + elif bld.cmd == 'clean' and os.path.exists(potfile): + Logs.info('Removing Ardour appdata pot file') + os.remove(potfile) def appdata_i18n_po(bld): autowaf.build_i18n_po(bld, bld.top_dir, os.path.join( @@ -795,13 +807,17 @@ def appdata_i18n_mo(bld): 'gtk2_ardour', 'appdata'), 'ardour.appdata', 'dummy', 'dummy') def appdata_i18n_xmlin(bld): - itsfile = os.path.join(bld.top_dir, 'tools', 'as-metainfo.its') - adxmlininfile = os.path.join(bld.top_dir, 'gtk2_ardour', - 'ardour.appdata.xml.in.in') adxmlinfile = os.path.join(bld.top_dir, 'gtk2_ardour', 'ardour.appdata.xml.in') - mo_glob = os.path.join(bld.top_dir, 'gtk2_ardour', 'appdata', 'po', '*.mo') - mo_files = glob.glob(mo_glob) - Logs.info('Generating ' + adxmlinfile) - subprocess.call(['itstool', '-i', itsfile, '-o', adxmlinfile, - '-j', adxmlininfile] + mo_files) + if bld.cmd == 'build': + itsfile = os.path.join(bld.top_dir, 'tools', 'as-metainfo.its') + adxmlininfile = os.path.join(bld.top_dir, 'gtk2_ardour', + 'ardour.appdata.xml.in.in') + mo_glob = os.path.join(bld.top_dir, 'gtk2_ardour', 'appdata', 'po', '*.mo') + mo_files = glob.glob(mo_glob) + Logs.info('Generating ' + adxmlinfile) + subprocess.call(['itstool', '-i', itsfile, '-o', adxmlinfile, + '-j', adxmlininfile] + mo_files) + elif bld.cmd == 'clean' and os.path.exists(adxmlinfile): + Logs.info('Removing ' + adxmlinfile) + os.remove(adxmlinfile)