7 Import('env install_prefix final_prefix config_prefix libraries i18n version')
10 gtkmmtests = env.Copy()
13 # this defines the version number of the GTK interface to ardour
18 gtkardour.Append(DOMAIN=domain, MAJOR=1,MINOR=0,MICRO=2)
19 gtkardour.Append(CCFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
20 gtkardour.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
21 gtkardour.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
22 #gtkardour.Append(CXXFLAGS="-DFLOWCANVAS_AA")
23 gtkardour.Append(PACKAGE=domain)
24 gtkardour.Append(POTFILE=domain + '.pot')
28 libraries['ardour_cp'],
29 libraries['gtkmm2ext'],
34 libraries['libgnomecanvas2'],
35 libraries['libgnomecanvasmm'],
48 libraries['soundtouch'],
49 libraries['samplerate'],
53 gtkmmtests.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
66 if gtkardour['DMALLOC']:
67 gtkardour.Merge([libraries['dmalloc']])
68 gtkardour.Append(CCFLAGS='-DUSE_DMALLOC')
70 if gtkardour['FFT_ANALYSIS']:
71 gtkardour.Merge ([libraries['fftw3f']])
72 gtkardour.Append(CCFLAGS='-DFFT_ANALYSIS')
74 skipped_files=Split("""
78 audiounit_files=Split("""
82 gtkardour_files=Split("""
89 ardour_ui_dependents.cc
97 automation_gain_line.cc
99 automation_pan_line.cc
100 automation_time_axis.cc
115 editor_audio_import.cc
118 editor_canvas_events.cc
120 editor_edit_groups.cc
121 editor_export_audio.cc
131 editor_region_list.cc
135 editor_selection_list.cc
136 editor_tempodisplay.cc
139 export_session_dialog.cc
140 export_region_dialog.cc
141 export_range_markers_dialog.cc
142 gain_automation_time_axis.cc
149 imageframe_socket_handler.cc
150 imageframe_time_axis.cc
151 imageframe_time_axis_group.cc
152 imageframe_time_axis_view.cc
161 marker_time_axis_view.cc
165 new_session_dialog.cc
168 pan_automation_time_axis.cc
176 redirect_automation_line.cc
177 redirect_automation_time_axis.cc
179 audio_region_editor.cc
185 route_redirect_selection.cc
195 time_axis_view_item.cc
203 fft_analysis_files=Split("""
209 pixmap_files=glob.glob('pixmaps/*.xpm')
211 intl_files = gtkardour_files + glob.glob('*.h')
213 mtest_files=Split("""
222 itest_files=Split("""
226 stest_files=Split("""
236 vst_files = [ 'vst_pluginui.cc' ]
239 extra_sources += vst_files
240 gtkardour.Append (CCFLAGS="-DVST_SUPPORT", CPPPATH="#libs/fst")
242 if gtkardour['AUDIOUNITS']:
243 extra_sources += audiounit_files
244 gtkardour.Append(CCFLAGS='-DHAVE_AUDIOUNITS')
245 gtkardour.Append(LINKFLAGS='-framework Carbon')
246 gtkardour.Merge([libraries['appleutility']])
248 if env['FFT_ANALYSIS']:
249 extra_sources += fft_analysis_files
251 intl_files += extra_sources
253 gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
254 gtkardour.Append(CXXFLAGS="-DLOCALEDIR=\\\""+final_prefix+"/share/locale\\\"")
256 versionflag = '-DVERSIONSTRING=\\\"' + env['VERSION'] + '\\\"'
258 gtkardour.Append(CXXFLAGS=versionflag)
260 gtkardour.VersionBuild(['version.cc','version.h'], 'SConscript')
262 executable = 'ardour.bin'
264 ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
265 ardourlib = gtkardour.SharedLibrary(target = 'ardourgtk', source = gtkardour_files + extra_sources)
267 mtest = gtkardour.Program(target = 'mtest', source = mtest_files)
268 itest = gtkardour.Program(target = 'itest', source = itest_files)
269 rcu = gtkardour.Program(target = 'rcu', source = rcu_files)
270 tt = gtkmmtests.Program(target = 'tt', source = tt_files)
273 my_subst_dict['%INSTALL_PREFIX%'] = install_prefix
275 ardoursh = env.SubstInFile ('ardour.sh','ardour.sh.in', SUBST_DICT = my_subst_dict);
276 env.AddPostAction (ardoursh, Chmod ('$TARGET', 0755))
280 # the library - into the library dir
281 env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), ardourlib))
285 Default (env.VersionedExecutable ('tagged_executable', ardour))
291 # the executable - into the library dir
292 env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), ardour))
293 # the script - into the bin dir
294 env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour2', ardoursh))
297 i18n (gtkardour, gtkardour_files+skipped_files+fft_analysis_files, env)
299 # configuration files
300 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour2_ui.rc'))
301 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.menus'))
302 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.bindings'))
303 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.colors'))
305 env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2'), 'splash.ppm'))
306 env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/pixmaps'), pixmap_files))
310 env.Alias ('tarball', env.Distribute (env['DISTTREE'],
312 'i18n.h', 'gettext.h',
314 'ardour2_ui.rc', 'splash.ppm',
315 'ardour.menus', 'ardour.bindings', 'ardour.colors',
318 gtkardour_files + vst_files + pixmap_files +
319 glob.glob('po/*.po') + glob.glob('*.h')))
321 # generate a prototype full-featured ardour_ui.rc file
323 env.Alias ('protorc', env.Command ('proto.rc', gtkardour_files, """
324 grep set_name $SOURCES | \
325 sed 's/.*("\([a-zA-Z_][a-zA-Z_]*\)").*/\\1/' | \
326 grep -v '\\.' | sort | uniq | \
327 awk '/\\./ {} { printf ("style \\"%s\\"\\n{\\n\
328 fg[NORMAL] = { 0, 0, 0 }\\n\
329 fg[ACTIVE] = { 0, 0, 0 }\\n\
330 fg[SELECTED] = { 0, 0, 0 }\\n\
331 bg[NORMAL] = { 0, 0, 0 }\\n\
332 bg[ACTIVE] = { 0, 0, 0 }\\n\
333 bg[SELECTED] = { 0, 0, 0 }\\n\
334 }\\nwidget \\"*%s\\" style \\"%s\\"\\nwidget \\"*%s*\\" style \\"%s\\"\\n\\n", \
335 $$0, $$0, $$0, $$0, $$0) }' > $TARGET && \
336 grep 'color_map\[[a-zA-Z_][a-zA-Z]*\]' $SOURCES | \
337 sed 's/.*\[\([a-zA-Z_][a-zA-Z_]*\)].*/\\1/'| \
339 awk '{ printf ("style \\"%s\\"\\n{\\n\
340 fg[NORMAL] = { 0, 0, 0 }\\n\
341 fg[ACTIVE] = { 0, 0, 0 }\\n\
342 }\\nwidget \\"*%s\\" style \\"%s\\"\\n \\n\\n", $$0, $$0, $$0) }' >> $TARGET ;