7 Import('env install_prefix final_prefix config_prefix libraries i18n version')
12 # this defines the version number of the GTK interface to ardour
17 gtkardour.Append(DOMAIN=domain, MAJOR=1,MINOR=0,MICRO=2)
18 gtkardour.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
19 gtkardour.Append(CCFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
20 gtkardour.Append(PACKAGE=domain)
21 gtkardour.Append(POTFILE=domain + '.pot')
25 libraries['gtkmm2ext'],
29 libraries['libgnomecanvasmm'],
39 libraries['libgnomecanvas2'],
41 libraries['soundtouch'],
43 libraries['samplerate'],
48 gtkardour.Merge ([ libraries['fst']])
50 gtkardour_files=Split("""
55 automation_gain_line.cc
59 gain_automation_time_axis.cc
67 pan_automation_time_axis.cc
69 redirect_automation_line.cc
70 redirect_automation_time_axis.cc
71 route_redirect_selection.cc
75 ardour_ui_dependents.cc
77 automation_pan_line.cc
81 imageframe_time_axis.cc
82 imageframe_time_axis_view.cc
86 marker_time_axis_view.cc
98 editor_canvas_events.cc
100 editor_export_audio.cc
104 imageframe_time_axis_group.cc
108 editor_tempodisplay.cc
114 automation_time_axis.cc
120 imageframe_socket_handler.cc
123 time_axis_view_item.cc
133 editor_edit_groups.cc
138 editor_region_list.cc
141 editor_selection_list.cc
149 new_session_dialog.cc
161 vst_files = [ 'vst_pluginui.cc' ]
164 extra_sources += vst_files
166 gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
167 gtkardour.Append(CXXFLAGS="-DDATA_DIR=\\\""+final_prefix+"/share\\\"")
168 gtkardour.Append(CXXFLAGS="-DLOCALEDIR=\\\""+final_prefix+"/share/locale\\\"")
170 versionflag = '-DVERSIONSTRING=\\\"' + env['VERSION'] + '\\\"'
172 gtkardour.Append(CXXFLAGS=versionflag)
174 gtkardour.VersionBuild(['version.cc','version.h'], 'SConscript')
176 executable = 'ardour.bin'
178 ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
183 Default (env.VersionedExecutable ('tagged_executable', ardour))
186 i18n (gtkardour, gtkardour_files + extra_sources, env)
191 env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour', ardour))
192 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour'), 'ardour_ui.rc'))
193 env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour'), 'splash.ppm'))
196 env.Alias ('tarball', env.Distribute (env['DISTTREE'],
198 'i18n.h', 'gettext.h',
199 'editor_xpms', 'misc_xpms', 'transport_xpms',
200 'ardour_ui.rc', 'splash.ppm'
202 gtkardour_files + vst_files +
203 glob.glob('po/*.po') + glob.glob('*.h')))
205 # generate a prototype full-featured ardour_ui.rc file
207 env.Alias ('protorc', env.Command ('proto.rc', gtkardour_files, """
208 grep set_name $SOURCES | \
209 sed 's/.*("\([a-zA-Z_][a-zA-Z_]*\)").*/\\1/' | \
210 grep -v '\\.' | sort | uniq | \
211 awk '/\\./ {} { printf ("style \\"%s\\"\\n{\\n\
212 fg[NORMAL] = { 0, 0, 0 }\\n\
213 fg[ACTIVE] = { 0, 0, 0 }\\n\
214 fg[SELECTED] = { 0, 0, 0 }\\n\
215 bg[NORMAL] = { 0, 0, 0 }\\n\
216 bg[ACTIVE] = { 0, 0, 0 }\\n\
217 bg[SELECTED] = { 0, 0, 0 }\\n\
218 }\\nwidget \\"*%s\\" style \\"%s\\"\\nwidget \\"*%s*\\" style \\"%s\\"\\n\\n", \
219 $$0, $$0, $$0, $$0, $$0) }' > $TARGET && \
220 grep 'color_map\[[a-zA-Z_][a-zA-Z]*\]' $SOURCES | \
221 sed 's/.*\[\([a-zA-Z_][a-zA-Z_]*\)].*/\\1/'| \
223 awk '{ printf ("style \\"%s\\"\\n{\\n\
224 fg[NORMAL] = { 0, 0, 0 }\\n\
225 fg[ACTIVE] = { 0, 0, 0 }\\n\
226 }\\nwidget \\"*%s\\" style \\"%s\\"\\n \\n\\n", $$0, $$0, $$0) }' >> $TARGET ;