2005-09-25 14:42:24 -04:00
|
|
|
# -*- python -*-
|
|
|
|
|
|
|
|
import os
|
|
|
|
import os.path
|
|
|
|
import glob
|
|
|
|
|
|
|
|
Import('env install_prefix final_prefix config_prefix libraries i18n version')
|
|
|
|
|
|
|
|
gtkardour = env.Copy()
|
|
|
|
|
|
|
|
#
|
|
|
|
# this defines the version number of the GTK interface to ardour
|
|
|
|
#
|
|
|
|
|
|
|
|
domain = 'gtk_ardour'
|
|
|
|
|
2005-09-25 16:33:00 -04:00
|
|
|
gtkardour.Append(DOMAIN=domain, MAJOR=1,MINOR=0,MICRO=2)
|
2005-11-25 19:06:46 -05:00
|
|
|
gtkardour.Append(CCFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
|
2005-09-25 14:42:24 -04:00
|
|
|
gtkardour.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
|
2005-10-22 11:30:17 -04:00
|
|
|
gtkardour.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
|
2005-12-02 17:12:56 -05:00
|
|
|
#gtkardour.Append(CXXFLAGS="-DFLOWCANVAS_AA")
|
2005-09-25 14:42:24 -04:00
|
|
|
gtkardour.Append(PACKAGE=domain)
|
|
|
|
gtkardour.Append(POTFILE=domain + '.pot')
|
|
|
|
|
2005-10-06 14:24:23 -04:00
|
|
|
gtkardour.Merge ([
|
|
|
|
libraries['ardour'],
|
2006-05-23 15:54:52 -04:00
|
|
|
libraries['ardour_cp'],
|
2005-10-06 14:24:23 -04:00
|
|
|
libraries['gtkmm2ext'],
|
|
|
|
libraries['midi++2'],
|
2006-06-29 18:21:30 -04:00
|
|
|
libraries['pbd'],
|
2005-10-06 14:24:23 -04:00
|
|
|
libraries['gtkmm2'],
|
2005-10-31 19:56:09 -05:00
|
|
|
libraries['glib2'],
|
2005-10-22 11:30:17 -04:00
|
|
|
libraries['libgnomecanvas2'],
|
2005-10-06 14:24:23 -04:00
|
|
|
libraries['libgnomecanvasmm'],
|
|
|
|
libraries['sysmidi'],
|
|
|
|
libraries['sndfile'],
|
2006-06-14 19:25:06 -04:00
|
|
|
libraries['flac'],
|
2005-10-06 14:24:23 -04:00
|
|
|
libraries['lrdf'],
|
|
|
|
libraries['glibmm2'],
|
|
|
|
libraries['pangomm'],
|
|
|
|
libraries['atkmm'],
|
|
|
|
libraries['gdkmm2'],
|
|
|
|
libraries['sigc2'],
|
|
|
|
libraries['gtk2'],
|
|
|
|
libraries['xml'],
|
2006-05-07 13:17:38 -04:00
|
|
|
libraries['xslt'],
|
2005-10-06 14:24:23 -04:00
|
|
|
libraries['soundtouch'],
|
|
|
|
libraries['samplerate'],
|
2006-05-11 20:30:13 -04:00
|
|
|
libraries['jack']
|
2005-10-06 14:24:23 -04:00
|
|
|
])
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2006-05-03 16:51:08 -04:00
|
|
|
if gtkardour['DMALLOC']:
|
|
|
|
gtkardour.Merge([libraries['dmalloc']])
|
|
|
|
gtkardour.Append(CCFLAGS='-DUSE_DMALLOC')
|
|
|
|
|
2006-03-12 22:27:58 -05:00
|
|
|
if gtkardour['FFT_ANALYSIS']:
|
|
|
|
gtkardour.Merge ([libraries['fftw3f']])
|
2006-03-13 13:09:11 -05:00
|
|
|
gtkardour.Append(CCFLAGS='-DFFT_ANALYSIS')
|
2006-03-12 22:27:58 -05:00
|
|
|
|
2005-10-31 19:56:09 -05:00
|
|
|
skipped_files=Split("""
|
|
|
|
connection_editor.cc
|
|
|
|
""")
|
|
|
|
|
2006-08-31 12:34:42 -04:00
|
|
|
audiounit_files=Split("""
|
2006-08-10 00:01:15 -04:00
|
|
|
au_pluginui.cc
|
|
|
|
""")
|
2006-06-21 19:01:03 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
gtkardour_files=Split("""
|
2005-10-09 13:58:06 -04:00
|
|
|
about.cc
|
2005-10-10 16:38:53 -04:00
|
|
|
actions.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
add_route_dialog.cc
|
|
|
|
ardour_dialog.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
ardour_ui.cc
|
|
|
|
ardour_ui2.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
ardour_ui_dependents.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
ardour_ui_dialogs.cc
|
|
|
|
ardour_ui_ed.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
ardour_ui_mixer.cc
|
2005-12-31 13:20:42 -05:00
|
|
|
ardour_ui_options.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
audio_clock.cc
|
2006-07-31 23:23:35 -04:00
|
|
|
route_time_axis.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
audio_time_axis.cc
|
|
|
|
automation_gain_line.cc
|
|
|
|
automation_line.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
automation_pan_line.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
automation_time_axis.cc
|
|
|
|
axis_view.cc
|
2005-10-10 16:38:53 -04:00
|
|
|
canvas-imageframe.c
|
2005-09-25 14:42:24 -04:00
|
|
|
canvas-simpleline.c
|
2005-10-12 12:28:26 -04:00
|
|
|
simpleline.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
canvas-simplerect.c
|
2005-10-12 12:28:26 -04:00
|
|
|
simplerect.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
canvas-waveview.c
|
2006-02-14 12:19:58 -05:00
|
|
|
color_manager.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
crossfade_edit.cc
|
|
|
|
crossfade_view.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
curvetest.cc
|
|
|
|
editing.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
editor.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
editor_actions.cc
|
2006-03-22 12:03:00 -05:00
|
|
|
editor_audio_import.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
editor_audiotrack.cc
|
2005-11-28 17:36:26 -05:00
|
|
|
editor_canvas.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
editor_canvas_events.cc
|
|
|
|
editor_cursors.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
editor_edit_groups.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
editor_export_audio.cc
|
|
|
|
editor_hscroller.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
editor_imageframe.cc
|
|
|
|
editor_keyboard.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
editor_keys.cc
|
|
|
|
editor_markers.cc
|
|
|
|
editor_mixer.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
editor_mouse.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
editor_nudge.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
editor_ops.cc
|
|
|
|
editor_region_list.cc
|
|
|
|
editor_route_list.cc
|
|
|
|
editor_rulers.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
editor_scrub.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
editor_selection_list.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
editor_tempodisplay.cc
|
|
|
|
editor_timefx.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
export_dialog.cc
|
2006-03-05 14:39:16 -05:00
|
|
|
export_session_dialog.cc
|
|
|
|
export_region_dialog.cc
|
|
|
|
export_range_markers_dialog.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
gain_automation_time_axis.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
gain_meter.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
ghostregion.cc
|
|
|
|
grouped_buttons.cc
|
|
|
|
gtk-custom-hruler.c
|
|
|
|
gtk-custom-ruler.c
|
2005-11-22 00:10:12 -05:00
|
|
|
imageframe.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
imageframe_socket_handler.cc
|
|
|
|
imageframe_time_axis.cc
|
|
|
|
imageframe_time_axis_group.cc
|
|
|
|
imageframe_time_axis_view.cc
|
|
|
|
imageframe_view.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
io_selector.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
keyboard.cc
|
2006-08-10 00:01:15 -04:00
|
|
|
ladspa_pluginui.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
location_ui.cc
|
|
|
|
main.cc
|
|
|
|
marker.cc
|
|
|
|
marker_time_axis.cc
|
|
|
|
marker_time_axis_view.cc
|
|
|
|
marker_view.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
mixer_strip.cc
|
|
|
|
mixer_ui.cc
|
|
|
|
new_session_dialog.cc
|
|
|
|
option_editor.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
opts.cc
|
|
|
|
pan_automation_time_axis.cc
|
|
|
|
panner2d.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
panner_ui.cc
|
|
|
|
playlist_selector.cc
|
|
|
|
plugin_selector.cc
|
|
|
|
plugin_ui.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
prompter.cc
|
|
|
|
public_editor.cc
|
|
|
|
redirect_automation_line.cc
|
|
|
|
redirect_automation_time_axis.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
redirect_box.cc
|
2006-07-31 23:23:35 -04:00
|
|
|
audio_region_editor.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
region_gain_line.cc
|
|
|
|
region_selection.cc
|
2006-07-31 23:23:35 -04:00
|
|
|
region_view.cc
|
|
|
|
audio_region_view.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
route_params_ui.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
route_redirect_selection.cc
|
|
|
|
route_ui.cc
|
|
|
|
selection.cc
|
2005-10-12 16:06:20 -04:00
|
|
|
sfdb_ui.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
send_ui.cc
|
|
|
|
streamview.cc
|
2006-07-31 23:23:35 -04:00
|
|
|
audio_streamview.cc
|
|
|
|
tape_region_view.cc
|
2005-10-09 13:58:06 -04:00
|
|
|
tempo_dialog.cc
|
|
|
|
time_axis_view.cc
|
|
|
|
time_axis_view_item.cc
|
|
|
|
time_selection.cc
|
|
|
|
utils.cc
|
|
|
|
version.cc
|
|
|
|
visual_time_axis.cc
|
2005-11-13 13:13:50 -05:00
|
|
|
waveview.cc
|
2006-03-12 22:27:58 -05:00
|
|
|
""")
|
|
|
|
|
|
|
|
fft_analysis_files=Split("""
|
2006-03-12 16:58:52 -05:00
|
|
|
analysis_window.cc
|
|
|
|
fft_graph.cc
|
|
|
|
fft_result.cc
|
2005-09-25 14:42:24 -04:00
|
|
|
""")
|
|
|
|
|
2006-03-17 12:39:21 -05:00
|
|
|
pixmap_files=glob.glob('pixmaps/*.xpm')
|
2005-11-14 03:38:16 -05:00
|
|
|
|
2006-05-11 20:30:13 -04:00
|
|
|
intl_files = gtkardour_files + glob.glob('*.h')
|
2005-11-14 03:38:16 -05:00
|
|
|
|
2005-10-09 01:03:29 -04:00
|
|
|
mtest_files=Split("""
|
|
|
|
mtest.cc
|
|
|
|
""")
|
|
|
|
|
2006-08-11 19:02:08 -04:00
|
|
|
|
|
|
|
rcu_files=Split("""
|
|
|
|
rcu.cc
|
|
|
|
""")
|
|
|
|
|
2005-10-31 19:56:09 -05:00
|
|
|
itest_files=Split("""
|
|
|
|
itest.cc
|
|
|
|
""")
|
|
|
|
|
2006-08-24 21:07:15 -04:00
|
|
|
stest_files=Split("""
|
|
|
|
stest.cc
|
|
|
|
""")
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
extra_sources = []
|
2006-06-20 14:50:38 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
vst_files = [ 'vst_pluginui.cc' ]
|
|
|
|
|
|
|
|
if env['VST']:
|
2006-06-20 14:50:38 -04:00
|
|
|
extra_sources += vst_files
|
|
|
|
gtkardour.Append (CCFLAGS="-DVST_SUPPORT", CPPPATH="#libs/fst")
|
2006-08-10 00:01:15 -04:00
|
|
|
|
2006-08-31 12:34:42 -04:00
|
|
|
if gtkardour['AUDIOUNITS']:
|
|
|
|
extra_sources += audiounit_files
|
|
|
|
gtkardour.Append(CCFLAGS='-DHAVE_AUDIOUNITS')
|
2006-08-11 16:35:55 -04:00
|
|
|
gtkardour.Append(LINKFLAGS='-framework Carbon')
|
2006-08-10 00:01:15 -04:00
|
|
|
gtkardour.Merge([libraries['appleutility']])
|
|
|
|
|
2006-03-12 22:27:58 -05:00
|
|
|
if env['FFT_ANALYSIS']:
|
|
|
|
extra_sources += fft_analysis_files
|
|
|
|
|
2005-11-14 03:38:16 -05:00
|
|
|
intl_files += extra_sources
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
|
|
|
|
gtkardour.Append(CXXFLAGS="-DLOCALEDIR=\\\""+final_prefix+"/share/locale\\\"")
|
|
|
|
|
|
|
|
versionflag = '-DVERSIONSTRING=\\\"' + env['VERSION'] + '\\\"'
|
|
|
|
|
|
|
|
gtkardour.Append(CXXFLAGS=versionflag)
|
|
|
|
|
|
|
|
gtkardour.VersionBuild(['version.cc','version.h'], 'SConscript')
|
|
|
|
|
|
|
|
executable = 'ardour.bin'
|
|
|
|
|
|
|
|
ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
|
2006-06-20 14:50:38 -04:00
|
|
|
ardourlib = gtkardour.SharedLibrary(target = 'ardourgtk', source = gtkardour_files + extra_sources)
|
|
|
|
|
2005-10-09 01:03:29 -04:00
|
|
|
mtest = gtkardour.Program(target = 'mtest', source = mtest_files)
|
2005-12-29 19:34:21 -05:00
|
|
|
itest = gtkardour.Program(target = 'itest', source = itest_files)
|
2006-08-11 19:02:08 -04:00
|
|
|
rcu = gtkardour.Program(target = 'rcu', source = rcu_files)
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2006-04-25 20:45:27 -04:00
|
|
|
my_subst_dict = { }
|
|
|
|
my_subst_dict['%INSTALL_PREFIX%'] = install_prefix
|
|
|
|
|
|
|
|
ardoursh = env.SubstInFile ('ardour.sh','ardour.sh.in', SUBST_DICT = my_subst_dict);
|
2006-04-25 20:58:34 -04:00
|
|
|
env.AddPostAction (ardoursh, Chmod ('$TARGET', 0755))
|
2006-04-25 20:45:27 -04:00
|
|
|
|
2006-06-20 14:50:38 -04:00
|
|
|
if env['VST']:
|
|
|
|
Default(ardourlib)
|
|
|
|
# the library - into the library dir
|
|
|
|
env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), ardourlib))
|
|
|
|
else:
|
|
|
|
|
|
|
|
if env['VERSIONED']:
|
|
|
|
Default (env.VersionedExecutable ('tagged_executable', ardour))
|
|
|
|
else:
|
|
|
|
Default(ardour)
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2006-06-20 14:50:38 -04:00
|
|
|
#install
|
|
|
|
|
|
|
|
# the executable - into the library dir
|
|
|
|
env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), ardour))
|
|
|
|
# the script - into the bin dir
|
|
|
|
env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour2', ardoursh))
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
if env['NLS']:
|
2006-06-29 18:21:30 -04:00
|
|
|
i18n (gtkardour, gtkardour_files+skipped_files+fft_analysis_files, env)
|
2005-11-14 03:38:16 -05:00
|
|
|
|
2006-04-25 20:45:27 -04:00
|
|
|
# configuration files
|
2006-03-29 14:29:15 -05:00
|
|
|
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour2_ui.rc'))
|
|
|
|
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.menus'))
|
|
|
|
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.bindings'))
|
|
|
|
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.colors'))
|
2006-04-25 20:45:27 -04:00
|
|
|
# data files
|
2006-03-29 14:29:15 -05:00
|
|
|
env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2'), 'splash.ppm'))
|
|
|
|
env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/pixmaps'), pixmap_files))
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2006-06-20 14:50:38 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
#dist
|
|
|
|
env.Alias ('tarball', env.Distribute (env['DISTTREE'],
|
|
|
|
[ 'SConscript',
|
|
|
|
'i18n.h', 'gettext.h',
|
2006-05-30 22:46:04 -04:00
|
|
|
'ardour.sh.in',
|
2006-01-09 23:25:47 -05:00
|
|
|
'ardour2_ui.rc', 'splash.ppm',
|
2006-03-17 12:39:21 -05:00
|
|
|
'ardour.menus', 'ardour.bindings', 'ardour.colors',
|
|
|
|
'editor_xpms'
|
2005-09-25 14:42:24 -04:00
|
|
|
] +
|
2006-05-11 20:30:13 -04:00
|
|
|
gtkardour_files + vst_files + pixmap_files +
|
2005-09-25 14:42:24 -04:00
|
|
|
glob.glob('po/*.po') + glob.glob('*.h')))
|
|
|
|
|
|
|
|
# generate a prototype full-featured ardour_ui.rc file
|
|
|
|
|
|
|
|
env.Alias ('protorc', env.Command ('proto.rc', gtkardour_files, """
|
|
|
|
grep set_name $SOURCES | \
|
|
|
|
sed 's/.*("\([a-zA-Z_][a-zA-Z_]*\)").*/\\1/' | \
|
|
|
|
grep -v '\\.' | sort | uniq | \
|
|
|
|
awk '/\\./ {} { printf ("style \\"%s\\"\\n{\\n\
|
|
|
|
fg[NORMAL] = { 0, 0, 0 }\\n\
|
|
|
|
fg[ACTIVE] = { 0, 0, 0 }\\n\
|
|
|
|
fg[SELECTED] = { 0, 0, 0 }\\n\
|
|
|
|
bg[NORMAL] = { 0, 0, 0 }\\n\
|
|
|
|
bg[ACTIVE] = { 0, 0, 0 }\\n\
|
|
|
|
bg[SELECTED] = { 0, 0, 0 }\\n\
|
|
|
|
}\\nwidget \\"*%s\\" style \\"%s\\"\\nwidget \\"*%s*\\" style \\"%s\\"\\n\\n", \
|
|
|
|
$$0, $$0, $$0, $$0, $$0) }' > $TARGET && \
|
|
|
|
grep 'color_map\[[a-zA-Z_][a-zA-Z]*\]' $SOURCES | \
|
|
|
|
sed 's/.*\[\([a-zA-Z_][a-zA-Z_]*\)].*/\\1/'| \
|
|
|
|
sort | uniq | \
|
|
|
|
awk '{ printf ("style \\"%s\\"\\n{\\n\
|
|
|
|
fg[NORMAL] = { 0, 0, 0 }\\n\
|
|
|
|
fg[ACTIVE] = { 0, 0, 0 }\\n\
|
|
|
|
}\\nwidget \\"*%s\\" style \\"%s\\"\\n \\n\\n", $$0, $$0, $$0) }' >> $TARGET ;
|
|
|
|
"""
|
|
|
|
))
|