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'
'add_route_dialog.cc',
'ambiguous_file_dialog.cc',
'analysis_window.cc',
+ 'ardour_button.cc',
'ardour_dialog.cc',
'ardour_ui.cc',
'ardour_ui2.cc',
'midi_tracer.cc',
'missing_file_dialog.cc',
'missing_plugin_dialog.cc',
+ 'mixer_actor.cc',
'mixer_group_tabs.cc',
'mixer_strip.cc',
'mixer_ui.cc',
'utils.cc',
'verbose_cursor.cc',
'version.cc',
+ 'visibility_group.cc',
'volume_controller.cc',
'waveview.cc',
'window_proxy.cc'
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.4', mandatory=False)
conf.write_config_header('gtk2ardour-config.h', remove=False)
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:
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()
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.is_defined('VST_SUPPORT'):
obj.source += [ 'vst_pluginui.cc' ]
obj.defines += [ 'VST_SUPPORT' ]
- bld.env.append ('LINKFLAGS', '-lX11')
+ obj.uselib += ' X11 '
if bld.is_defined('LXVST_SUPPORT'):
obj.source += [ 'lxvst_pluginui.cc' ]
obj.defines += [ 'LXVST_SUPPORT' ]
- obj.linkflags += [ '-lX11' ]
+ obj.uselib += ' X11 '
if bld.is_defined('PHONE_HOME'):
obj.defines += [ 'PHONE_HOME' ]
obj.target = 'ardour3_widgets.rc'
obj.install_path = None
- bld (
- rule = include_processor,
- source = 'ardour3_ui_dark.rc.pre',
- target = 'ardour3_ui_dark.rc',
- install_path = '${SYSCONFDIR}/ardour3'
- )
+ 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',
- install_path = '${SYSCONFDIR}/ardour3'
- )
+ 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 = []
# 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', bld.path.ant_glob('icons/*.png'))
# i18n
if bld.is_defined('ENABLE_NLS'):
- mo_files = bld.path.ant_glob ('po/*.mo')
+ 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')