X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fwscript;h=50d617290a311fcfa2f1f0e978491c0d15630028;hb=91c057494be9f97020211ee1855c2d1d190df95c;hp=3f2c31e52ff6c3e620d150b190af4c72db9218ff;hpb=c1ef7b14a3e1200817180cfaf6425e9bdf0eb51b;p=ardour.git diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 3f2c31e52f..50d617290a 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -5,6 +5,8 @@ import waflib.Logs as Logs, waflib.Utils as Utils import os import sys import re +import time +from waflib.Task import Task # Version of this package (even if built as a child) MAJOR = '3' @@ -29,6 +31,7 @@ gtk2_ardour_sources = [ 'add_route_dialog.cc', 'ambiguous_file_dialog.cc', 'analysis_window.cc', + 'ardour_button.cc', 'ardour_dialog.cc', 'ardour_ui.cc', 'ardour_ui2.cc', @@ -37,6 +40,7 @@ gtk2_ardour_sources = [ 'ardour_ui_ed.cc', 'ardour_ui_mixer.cc', 'ardour_ui_options.cc', + 'ardour_window.cc', 'audio_clock.cc', 'audio_region_editor.cc', 'audio_region_view.cc', @@ -145,6 +149,7 @@ gtk2_ardour_sources = [ 'midi_tracer.cc', 'missing_file_dialog.cc', 'missing_plugin_dialog.cc', + 'mixer_actor.cc', 'mixer_group_tabs.cc', 'mixer_strip.cc', 'mixer_ui.cc', @@ -227,6 +232,7 @@ gtk2_ardour_sources = [ 'utils.cc', 'verbose_cursor.cc', 'version.cc', + 'visibility_group.cc', 'volume_controller.cc', 'waveview.cc', 'window_proxy.cc' @@ -257,9 +263,12 @@ def configure(conf): atleast_version='2.18') autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM', atleast_version='2.18') + autowaf.check_pkg(conf, 'libgnomecanvas-2.0', + uselib_store='GNOMECANVAS', atleast_version='2.30') autowaf.check_pkg(conf, 'libgnomecanvasmm-2.6', uselib_store='GNOMECANVASMM', atleast_version='2.16') autowaf.check_pkg(conf, 'ogg', uselib_store='OGG', atleast_version='1.1.2') + autowaf.check_pkg(conf, 'x11', uselib_store='X11', atleast_version='1.3', mandatory=False) conf.write_config_header('gtk2ardour-config.h', remove=False) @@ -274,43 +283,44 @@ def set_winegcc(self): self.env.LINK_CXX = self.env.LINK_CC = 'wineg++' self.env.CC = 'winegcc' -#pre-processor-like operation to merge GTK RC files -re_spaces = re.compile("\s+") - -def _doPyp(infileName): - """ - Does the main work of preprocessing. - Takes 'infileName' as a filename, opens and processes it, - and returns the processed file as a string - - Note - this works recursively. - """ +def _doPyp(infileName, deps = False): outStr = '' + out = [] + re_spaces = re.compile("\s+") + if infileName == '-': fd = sys.stdin else: - fd = file(infileName) + fd = open(infileName) inLines = fd.readlines() if fd != sys.stdin: fd.close() - + + for line in inLines: bits = re_spaces.split(line) if bits[0] == '##include': incName = bits[1] - # assume included file comes from same place as source file - incName = os.path.join (os.path.dirname (infileName), incName); - outStr += _doPyp(incName) + if (deps): + out += [ incName ] + else: + # assume included file comes from same place as source file + incName = os.path.join (os.path.dirname (infileName), incName); + outStr += _doPyp(incName) else: - outStr += line + if not deps: + outStr += line # done - return outStr - + if deps: + return out + else: + return outStr + def include_processor(task): infileName = task.inputs[0].srcpath() outfileName = os.path.join(out, task.outputs[0].bldpath()) - fdOut = file (outfileName, "w") + fdOut = open (outfileName, "w") fdOut.write (_doPyp(infileName)) fdOut.close () @@ -332,11 +342,10 @@ def build_color_scheme(path, prefix): f.close() return color_scheme - def build(bld): # GTK front-end; if we're using VST we build this as a shared library, # otherwise it's a normal executabale - if bld.env['VST_SUPPORT']: + if bld.is_defined('VST_SUPPORT'): obj = bld(features = 'cxx c cxxshlib') else: obj = bld(features = 'cxx c cxxprogram') @@ -345,21 +354,26 @@ def build(bld): obj.source = gtk2_ardour_sources obj.name = 'gtk2_ardour' obj.linkflags = [] - if bld.env['VST_SUPPORT']: + if bld.is_defined('VST_SUPPORT'): obj.target = 'gtk2_ardour' obj.includes += ['../libs/fst'] else: obj.target = 'ardour-3.0' obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') obj.uselib = 'UUID FLAC GLIBMM GTHREAD GTK OGG ALSA CURL DL' - obj.uselib += ' GTKMM GNOMECANVASMM ' + obj.uselib += ' GTKMM GNOMECANVASMM GNOMECANVAS ' obj.uselib += ' AUDIOUNITS OSX GTKOSX ' - obj.use = '''libpbd libmidipp libtaglib libardour libardour_cp - libgtkmm2ext libtaglib libgnomecanvas-2''' + obj.use = [ 'libpbd', + 'libmidipp', + 'libtaglib', + 'libardour', + 'libardour_cp', + 'libgtkmm2ext', + 'libtaglib' ] if sys.platform == 'darwin': obj.use += ' libappleutility' obj.defines = [ - 'PACKAGE="gtk2_ardour"', + 'PACKAGE="gtk2_ardour3"', 'VERSIONSTRING="' + bld.env['VERSION'] + '"', 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"', 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"', @@ -370,35 +384,33 @@ def build(bld): ] obj.includes += ['../libs'] - if bld.env['HAVE_SUIL']: + if bld.is_defined('HAVE_SUIL'): obj.source += [ 'lv2_plugin_ui.cc' ] obj.uselib += ' SUIL ' - elif bld.env['HAVE_SLV2']: - obj.source += [ 'lv2_plugin_ui.cc' ] - obj.uselib += ' SLV2 ' - if bld.env['FREESOUND']: + if bld.is_defined('FREESOUND'): obj.source += [ 'sfdb_freesound_mootcher.cc' ] + obj.defines += [ 'FREESOUND' ] - if bld.env['VST_SUPPORT']: + if bld.is_defined('VST_SUPPORT'): obj.source += [ 'vst_pluginui.cc' ] obj.defines += [ 'VST_SUPPORT' ] - bld.env.append ('LINKFLAGS', '-lX11') + obj.uselib += ' X11 ' - if bld.env['LXVST_SUPPORT']: - obj.source += [ 'lxvst_pluginui.cc' ] + if bld.is_defined('LXVST_SUPPORT'): + obj.source += [ 'vstfxwin.cc', 'lxvst_pluginui.cc' ] obj.defines += [ 'LXVST_SUPPORT' ] - obj.linkflags += [ '-lX11' ] - - if bld.env['PHONE_HOME']: + obj.uselib += ' X11 ' + + if bld.is_defined('PHONE_HOME'): obj.defines += [ 'PHONE_HOME' ] - if bld.env['COREAUDIO']: + if bld.is_defined('HAVE_COREAUDIO'): TaskGen.task_gen.mappings['.mm'] = TaskGen.task_gen.mappings['.cc'] obj.source += [ 'cocoacarbon.mm', 'au_pluginui.mm' ] obj.use += ' libappleutility ' - if bld.env['VST_SUPPORT']: + if bld.is_defined('VST_SUPPORT'): # If we require VST support we build a stub main() and the FST library # here using winegcc, and link it to the GTK front-end library obj = bld(features = 'cxx c cxxprogram wine') @@ -455,7 +467,7 @@ def build(bld): base_font = "" # Set up font sizes - if bld.env['IS_OSX']: # OS X fonts + if bld.is_defined('GTKOSX'): # OS X fonts basefont = "Lucida Grande" font_sizes = { 'TINY' : '7', @@ -553,21 +565,23 @@ def build(bld): obj.target = 'ardour3_widgets.rc' obj.install_path = None - bld ( - rule = include_processor, - source = 'ardour3_ui_dark.rc.pre', - target = 'ardour3_ui_dark.rc' - ) + obj = bld (rule = include_processor) + obj.source = [ 'ardour3_ui_dark.rc.pre' ] + # find and add all ##include dependencies as sources + obj.source += _doPyp (bld.path.find_resource ('ardour3_ui_dark.rc.in').srcpath(), True) + obj.target = 'ardour3_ui_dark.rc' + obj.install_path = '${SYSCONFDIR}/ardour3' - bld ( - rule = include_processor, - source = 'ardour3_ui_light.rc.pre', - target = 'ardour3_ui_light.rc' - ) + obj = bld (rule = include_processor) + obj.source = [ 'ardour3_ui_light.rc.pre' ] + # find and add all ##include dependencies as sources + obj.source += _doPyp (bld.path.find_resource ('ardour3_ui_light.rc.in').srcpath(), True) + obj.target = 'ardour3_ui_light.rc' + obj.install_path = '${SYSCONFDIR}/ardour3' # Menus menus_argv = [] - if bld.env['GTKOSX']: + if bld.is_defined('GTKOSX'): menus_argv = [ '-E', '-P', '-DGTKOSX' ] else: menus_argv = [ '-E', '-P' ] @@ -590,35 +604,38 @@ def build(bld): obj = bld( target = b + '.bindings', source = b + '.bindings.in', - rule = '../tools/fmt-bindings --winkey="%s" --accelmap <${SRC} >${TGT}' % bld.env['WINDOWS_KEY'] + rule = '../tools/fmt-bindings --platform="%s" --winkey="%s" --accelmap <${SRC} >${TGT}' % (sys.platform, bld.env['WINDOWS_KEY'] ) ) obj.install_path = os.path.join(bld.env['SYSCONFDIR'], 'ardour3') # not modified at present bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'), 'step_editing.bindings') + bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'), + 'mixer.bindings') # Icons/Images - bld.install_files('${DATADIR}/ardour3/icons', 'icons/*.png') - bld.install_files('${DATADIR}/ardour3/pixmaps', 'pixmaps/*.xpm') + bld.install_files('${DATADIR}/ardour3/icons', bld.path.ant_glob('icons/*.png')) + bld.install_files('${DATADIR}/ardour3/pixmaps', bld.path.ant_glob('pixmaps/*.xpm')) bld.install_files('${DATADIR}/ardour3', 'splash.png') # Default UI configuration bld.install_files('${SYSCONFDIR}/ardour3', 'ardour3_ui_default.conf') # Generic widget style mappings bld.install_files('${SYSCONFDIR}/ardour3', 'ardour3_widgets.rc') - + # Default export stuff - bld.install_files('${SYSCONFDIR}/ardour3/export', 'export/*.format') + bld.install_files('${SYSCONFDIR}/ardour3/export', bld.path.ant_glob('export/*.format')) # i18n - if bld.env['ENABLE_NLS']: - mo_files = bld.path.ant_glob ('po/*.mo') + if bld.is_defined('ENABLE_NLS'): + mo_files = bld.path.ant_glob('po/*.mo') for mo in mo_files: - lang = os.path.basename (mo).replace ('.mo', '') - bld.install_as (os.path.join(bld.env['PREFIX'], 'share', 'locale', - lang, 'LC_MESSAGES', APPNAME + '.mo'), - mo) + lang = os.path.basename(mo.srcpath()).replace('.mo', '') + bld.install_as(os.path.join(bld.env['PREFIX'], 'share', 'locale', + lang, 'LC_MESSAGES', APPNAME + '.mo'), + mo) def i18n(bld): - autowaf.build_i18n(bld, srcdir, 'gtk2_ardour', APPNAME, gtk2_ardour_sources) + autowaf.build_i18n(bld, top, 'gtk2_ardour', APPNAME, gtk2_ardour_sources, + 'Paul Davis')