13
0
livetrax/gtk2_ardour/SConscript

228 lines
5.8 KiB
Python
Raw Normal View History

# -*- 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'
gtkardour.Append(DOMAIN=domain, MAJOR=1,MINOR=0,MICRO=0)
gtkardour.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
gtkardour.Append(PACKAGE=domain)
gtkardour.Append(POTFILE=domain + '.pot')
gtkardour.Merge ( [libraries['ardour2'],
libraries['gtkmm2ext'],
libraries['midi++2'],
libraries['pbd3'],
libraries['gtkmm2'],
libraries['sigc2'],
libraries['libgnomecanvasmm'],
libraries['sysmidi'],
libraries['sndfile'],
libraries['lrdf'],
libraries['glibmm2'],
libraries['pangomm'],
libraries['atkmm'],
libraries['gdkmm2'],
libraries['gtk2'],
libraries['libgnomecanvas2'],
libraries['xml'],
libraries['soundtouch'],
libraries['raptor'],
libraries['samplerate'],
libraries['jack']]
)
if gtkardour['VST']:
gtkardour.Merge ([ libraries['fst']])
gtkardour_files=Split("""
add_route_dialog.cc
ardour_dialog.cc
ardour_message.cc
audio_clock.cc
automation_gain_line.cc
axis_view.cc
default_keys.cc
editing.cc
gain_automation_time_axis.cc
grouped_buttons.cc
gtk-custom-hruler.c
gtk-custom-ruler.c
keyboard.cc
keyboard_target.cc
meter_bridge_strip.cc
opts.cc
pan_automation_time_axis.cc
prompter.cc
redirect_automation_line.cc
redirect_automation_time_axis.cc
route_redirect_selection.cc
tempo_dialog.cc
time_selection.cc
version.cc
ardour_ui_dependents.cc
ardour_ui_mixer.cc
automation_pan_line.cc
curvetest.cc
editor_scrub.cc
ghostregion.cc
gtkscrolledwindow.c
imageframe_time_axis.cc
imageframe_time_axis_view.cc
imageframe_view.cc
marker.cc
marker_time_axis.cc
marker_time_axis_view.cc
marker_view.cc
public_editor.cc
region_gain_line.cc
region_selection.cc
selection.cc
ardour_ui_ed.cc
canvas-ruler.c
canvas-simpleline.c
canvas-simplerect.c
canvas-waveview.c
editor_audiotrack.cc
editor_canvas_events.cc
editor_cursors.cc
editor_export_audio.cc
editor_keys.cc
editor_nudge.cc
editor_timefx.cc
imageframe_time_axis_group.cc
send_ui.cc
time_axis_view.cc
editor_markers.cc
editor_tempodisplay.cc
main.cc
panner2d.cc
region_editor.cc
streamview.cc
utils.cc
automation_time_axis.cc
connection_editor.cc
crossfade_edit.cc
crossfade_view.cc
editor_hscroller.cc
editor_mixer.cc
imageframe_socket_handler.cc
location_ui.cc
route_ui.cc
time_axis_view_item.cc
visual_time_axis.cc
ardour_ui.cc
ardour_ui2.cc
ardour_ui_dialogs.cc
audio_time_axis.cc
automation_line.c
canvas-imageframe.cc
about.cc
editor.cc
editor_edit_groups.cc
editor_imageframe.cc
editor_keyboard.cc
editor_mouse.cc
editor_ops.cc
editor_region_list.cc
editor_route_list.cc
editor_rulers.cc
editor_selection_list.cc
export_dialog.cc
gain_meter.cc
io_selector.cc
library_ui.cc
meter_bridge.cc
mixer_strip.cc
mixer_ui.cc
new_session_dialog.cc
option_editor.cc
panner_ui.cc
playlist_selector.cc
plugin_selector.cc
plugin_ui.cc
redirect_box.cc
regionview.cc
route_params_ui.cc
""")
extra_sources = []
vst_files = [ 'vst_pluginui.cc' ]
if env['VST']:
extra_sources += vst_files
gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
gtkardour.Append(CXXFLAGS="-DDATA_DIR=\\\""+final_prefix+"/share\\\"")
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)
Default(ardour)
if env['VERSIONED']:
Default (env.VersionedExecutable ('tagged_executable', ardour))
if env['NLS']:
i18n (gtkardour, gtkardour_files + extra_sources, env)
#install
env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour', ardour))
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour'), 'ardour_ui.rc'))
env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour'), 'splash.ppm'))
#dist
env.Alias ('tarball', env.Distribute (env['DISTTREE'],
[ 'SConscript',
'i18n.h', 'gettext.h',
'editor_xpms', 'misc_xpms', 'transport_xpms',
'ardour_ui.rc', 'splash.ppm'
] +
gtkardour_files + vst_files +
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 ;
"""
))