7 Import('env install_prefix final_prefix config_prefix libraries i18n ardour_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(CPPPATH="#/") # for top level svn_revision.h
23 #gtkardour.Append(CXXFLAGS="-DFLOWCANVAS_AA")
24 gtkardour.Append(PACKAGE=domain)
25 gtkardour.Append(POTFILE=domain + '.pot')
27 if gtkardour['DIST_TARGET'] == 'panther' or gtkardour['DIST_TARGET'] == 'tiger':
28 gtkardour.Append (LINKFLAGS="-Xlinker -headerpad -Xlinker 2048")
32 libraries['ardour_cp'],
33 libraries['gtkmm2ext'],
38 libraries['libgnomecanvas2'],
39 libraries['libgnomecanvasmm'],
41 libraries['sndfile-ardour'],
52 libraries['soundtouch'],
53 libraries['samplerate'],
57 gtkmmtests.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
70 if gtkardour['DMALLOC']:
71 gtkardour.Merge([libraries['dmalloc']])
72 gtkardour.Append(CCFLAGS='-DUSE_DMALLOC')
74 if gtkardour['FFT_ANALYSIS']:
75 gtkardour.Merge ([libraries['fftw3f']])
76 gtkardour.Append(CCFLAGS='-DFFT_ANALYSIS')
78 skipped_files=Split("""
82 audiounit_files=Split("""
86 gtkosx_files=Split("""
90 gtkardour_files=Split("""
97 ardour_ui_dependents.cc
105 automation_gain_line.cc
107 automation_pan_line.cc
108 automation_time_axis.cc
110 boolean_automation_line.cc
124 editor_audio_import.cc
127 editor_canvas_events.cc
129 editor_edit_groups.cc
130 editor_export_audio.cc
140 editor_region_list.cc
145 editor_selection_list.cc
146 editor_tempodisplay.cc
150 export_session_dialog.cc
151 export_region_dialog.cc
152 export_range_markers_dialog.cc
153 gain_automation_time_axis.cc
159 imageframe_socket_handler.cc
160 imageframe_time_axis.cc
161 imageframe_time_axis_group.cc
162 imageframe_time_axis_view.cc
171 marker_time_axis_view.cc
176 new_session_dialog.cc
179 pan_automation_time_axis.cc
188 redirect_automation_line.cc
189 redirect_automation_time_axis.cc
191 audio_region_editor.cc
197 route_redirect_selection.cc
208 time_axis_view_item.cc
217 fft_analysis_files=Split("""
223 pixmap_files = glob.glob('pixmaps/*.xpm')
224 icon_files = glob.glob ('icons/*.png')
226 intl_files = gtkardour_files + glob.glob('*.h')
228 mtest_files=Split("""
237 itest_files=Split("""
241 stest_files=Split("""
251 vst_files = [ 'vst_pluginui.cc' ]
254 extra_sources += vst_files
255 gtkardour.Append (CCFLAGS="-DVST_SUPPORT", CPPPATH="#libs/fst")
257 if gtkardour['GTKOSX']:
258 extra_sources += gtkosx_files
259 gtkardour.Append (CCFLAGS="-DTOP_MENUBAR -DGTKOSX")
261 if gtkardour['AUDIOUNITS']:
262 extra_sources += audiounit_files
263 gtkardour.Append(CCFLAGS='-DHAVE_AUDIOUNITS')
264 gtkardour.Merge([libraries['appleutility']])
266 if env['FFT_ANALYSIS']:
267 extra_sources += fft_analysis_files
269 intl_files += extra_sources
271 gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
272 gtkardour.Append(CXXFLAGS="-DLOCALEDIR=\\\""+final_prefix+"/share/locale\\\"")
274 versionflag = '-DVERSIONSTRING=\\\"' + env['VERSION'] + '\\\"'
276 gtkardour.Append(CXXFLAGS=versionflag)
278 executable = 'ardour-' + ardour_version
280 ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
281 ardourlib = gtkardour.SharedLibrary(target = 'ardourgtk', source = gtkardour_files + extra_sources)
283 mtest = gtkardour.Program(target = 'mtest', source = mtest_files)
284 itest = gtkardour.Program(target = 'itest', source = itest_files)
285 rcu = gtkardour.Program(target = 'rcu', source = rcu_files)
286 tt = gtkmmtests.Program(target = 'tt', source = tt_files)
290 if gtkardour['DIST_TARGET'] == 'panther' or gtkardour['DIST_TARGET'] == 'tiger':
292 # OS X font rendering is different even with X11
294 my_font_dict['%FONT_TINY%'] = 'Lucida Grande 7'
295 my_font_dict['%FONT_SMALLERER%'] = 'Lucida Grande 8'
296 my_font_dict['%FONT_SMALLER%'] = 'Lucida Grande 9'
297 my_font_dict['%FONT_SMALL%'] = 'Lucida Grande 10'
298 my_font_dict['%FONT_NORMAL%'] = 'Lucida Grande 11'
299 my_font_dict['%FONT_BIG%'] = 'Lucida Grande 12'
300 my_font_dict['%FONT_BIGGER%'] = 'Lucida Grande 14'
301 my_font_dict['%FONT_LARGE%'] = 'Lucida Grande 18'
302 my_font_dict['%FONT_LARGER%'] = 'Lucida Grande 28'
303 my_font_dict['%FONT_HUGER%'] = 'Lucida Grande 36'
304 my_font_dict['%FONT_MASSIVE%'] = 'Lucida Grande 60'
305 my_font_dict['%FONT_BOLD_TINY%'] = 'Lucida Grande bold 7'
306 my_font_dict['%FONT_BOLD_SMALLER%'] = 'Lucida Grande bold 9'
307 my_font_dict['%FONT_BOLD_SMALL%'] = 'Lucida Grande bold 10'
308 my_font_dict['%FONT_BOLD_NORMAL%'] = 'Lucida Grande bold 11'
309 my_font_dict['%FONT_BOLD_BIG%'] = 'Lucida Grande bold 13'
310 my_font_dict['%FONT_BOLD_BIGGER%'] = 'Lucida Grande bold 14'
311 my_font_dict['%FONT_BOLD_LARGE%'] = 'Lucida Grande bold 20'
312 my_font_dict['%FONT_BOLD_LARGER%'] = 'Lucida Grande bold 25'
313 my_font_dict['%FONT_BOLD_HUGER%'] = 'Lucida Grande bold 36'
314 my_font_dict['%FONT_BOLD_MASSIVE%'] = 'Lucida Grande bold 60'
315 my_font_dict['%FONT_ITALIC_TINY%'] = 'Lucida Grande italic 7'
316 my_font_dict['%FONT_ITALIC_SMALLER%'] = 'Lucida Grande italic 9'
317 my_font_dict['%FONT_ITALIC_SMALL%'] = 'Lucida Grande italic 10'
318 my_font_dict['%FONT_ITALIC_NORMAL%'] = 'Lucida Grande italic 11'
319 my_font_dict['%FONT_ITALIC_BIG%'] = 'Lucida Grande italic 15'
320 my_font_dict['%FONT_ITALIC_BIGGER%'] = 'Lucida Grande italic 16'
321 my_font_dict['%FONT_ITALIC_LARGE%'] = 'Lucida Grande italic 20'
322 my_font_dict['%FONT_ITALIC_LARGER%'] = 'Lucida Grande italic 28'
323 my_font_dict['%FONT_ITALIC_HUGER%'] = 'Lucida Grande italic 36'
324 my_font_dict['%FONT_ITALIC_MASSIVE%'] = 'Lucida Grande italic 60'
327 # Linux/X11 font rendering
329 my_font_dict['%FONT_TINY%'] = 'sans 4'
330 my_font_dict['%FONT_SMALLERER%'] = 'sans 6'
331 my_font_dict['%FONT_SMALLER%'] = 'sans 6'
332 my_font_dict['%FONT_SMALL%'] = 'sans 7'
333 my_font_dict['%FONT_NORMAL%'] = 'sans 8'
334 my_font_dict['%FONT_BIG%'] = 'sans 12'
335 my_font_dict['%FONT_BIGGER%'] = 'sans 14'
336 my_font_dict['%FONT_LARGE%'] = 'sans 18'
337 my_font_dict['%FONT_LARGER%'] = 'sans 24'
338 my_font_dict['%FONT_HUGER%'] = 'sans 34'
339 my_font_dict['%FONT_MASSIVE%'] = 'sans 60'
340 my_font_dict['%FONT_BOLD_TINY%'] = 'sans bold 4'
341 my_font_dict['%FONT_BOLD_SMALLER%'] = 'sans bold 6'
342 my_font_dict['%FONT_BOLD_SMALL%'] = 'sans bold 7'
343 my_font_dict['%FONT_BOLD_NORMAL%'] = 'sans bold 8'
344 my_font_dict['%FONT_BOLD_BIG%'] = 'sans bold 12'
345 my_font_dict['%FONT_BOLD_BIGGER%'] = 'sans bold 14'
346 my_font_dict['%FONT_BOLD_LARGE%'] = 'sans bold 18'
347 my_font_dict['%FONT_BOLD_LARGER%'] = 'sans bold 24'
348 my_font_dict['%FONT_BOLD_HUGE%'] = 'sans bold 25'
349 my_font_dict['%FONT_BOLD_HUGER%'] = 'sans bold 34'
350 my_font_dict['%FONT_BOLD_MASSIVE%'] = 'sans bold 60'
351 my_font_dict['%FONT_ITALIC_TINY%'] = 'sans italic 4'
352 my_font_dict['%FONT_ITALIC_SMALLER%'] = 'sans italic 6'
353 my_font_dict['%FONT_ITALIC_SMALL%'] = 'sans italic 7'
354 my_font_dict['%FONT_ITALIC_NORMAL%'] = 'sans italic 8'
355 my_font_dict['%FONT_ITALIC_BIG%'] = 'sans italic 12'
356 my_font_dict['%FONT_ITALIC_BIGGER%'] = 'sans italic 14'
357 my_font_dict['%FONT_ITALIC_LARGE%'] = 'sans italic 18'
358 my_font_dict['%FONT_ITALIC_LARGER%'] = 'sans italic 24'
359 my_font_dict['%FONT_ITALIC_HUGE%'] = 'sans italic 25'
360 my_font_dict['%FONT_ITALIC_HUGER%'] = 'sans italic 34'
361 my_font_dict['%FONT_ITALIC_MASSIVE%'] = 'sans italic 60'
363 ardour_dark_theme = env.SubstInFile ('ardour2_ui_dark.rc', 'ardour2_ui_dark.rc.in', SUBST_DICT = my_font_dict)
364 ardour_light_theme = env.SubstInFile ('ardour2_ui_light.rc', 'ardour2_ui_light.rc.in', SUBST_DICT = my_font_dict)
369 # null substitution just to avoid ardour.bindings being in svn
372 ardourbindings = env.SubstInFile ('ardour.bindings', 'ardour.bindings.in', SUBST_DICT = my_subst_dict);
374 my_subst_dict['%INSTALL_PREFIX%'] = final_prefix
375 my_subst_dict['%LIBDIR%'] = env['LIBDIR']
376 my_subst_dict['%VERSION%'] = ardour_version
378 ardoursh = env.SubstInFile ('ardour.sh','ardour.sh.in', SUBST_DICT = my_subst_dict);
379 env.AddPostAction (ardoursh, Chmod ('$TARGET', 0755))
381 ardourdev = env.SubstInFile ('ardev_common.sh','ardev_common.sh.in', SUBST_DICT = my_subst_dict);
382 env.AddPostAction (ardourdev, Chmod ('$TARGET', 0755))
384 Default(ardourbindings)
387 Default(ardour_dark_theme)
388 Default(ardour_light_theme)
392 # the library - into the library dir
393 env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour2'), ardourlib))
397 Default (env.VersionedExecutable ('tagged_executable', ardour))
403 # the executable - into the library dir
404 env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour2'), ardour))
405 # the script - into the bin dir
406 env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour2', ardoursh))
409 i18n (gtkardour, gtkardour_files+skipped_files+fft_analysis_files, env)
411 # configuration files
412 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), ardour_dark_theme))
413 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), ardour_light_theme))
414 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour2_ui_default.conf'))
415 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.menus'))
416 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.bindings'))
418 env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'ardour2'), 'splash.png'))
419 env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'ardour2', 'pixmaps'), pixmap_files))
420 env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'ardour2', 'icons'), icon_files))
422 env.Alias ('version', gtkardour.VersionBuild(['version.cc','version.h'], []))
425 env.Alias ('tarball', env.Distribute (env['DISTTREE'],
427 'i18n.h', 'gettext.h',
429 'ardev_common.sh.in',
431 'ardour2_ui_dark.rc.in', 'ardour2_ui_light.rc.in', 'splash.png',
432 'ardour.menus', 'ardour.bindings.in', 'ardour2_ui_default.conf',
443 glob.glob('po/*.po') + glob.glob('*.h')))
445 # generate a prototype full-featured ardour_ui.rc file
447 env.Alias ('protorc', env.Command ('proto.rc', gtkardour_files, """
448 grep set_name $SOURCES | \
449 sed 's/.*("\([a-zA-Z_][a-zA-Z_]*\)").*/\\1/' | \
450 grep -v '\\.' | sort | uniq | \
451 awk '/\\./ {} { printf ("style \\"%s\\"\\n{\\n\
452 fg[NORMAL] = { 0, 0, 0 }\\n\
453 fg[ACTIVE] = { 0, 0, 0 }\\n\
454 fg[SELECTED] = { 0, 0, 0 }\\n\
455 bg[NORMAL] = { 0, 0, 0 }\\n\
456 bg[ACTIVE] = { 0, 0, 0 }\\n\
457 bg[SELECTED] = { 0, 0, 0 }\\n\
458 }\\nwidget \\"*%s\\" style \\"%s\\"\\nwidget \\"*%s*\\" style \\"%s\\"\\n\\n", \
459 $$0, $$0, $$0, $$0, $$0) }' > $TARGET && \
460 grep 'color_map\[[a-zA-Z_][a-zA-Z]*\]' $SOURCES | \
461 sed 's/.*\[\([a-zA-Z_][a-zA-Z_]*\)].*/\\1/'| \
463 awk '{ printf ("style \\"%s\\"\\n{\\n\
464 fg[NORMAL] = { 0, 0, 0 }\\n\
465 fg[ACTIVE] = { 0, 0, 0 }\\n\
466 }\\nwidget \\"*%s\\" style \\"%s\\"\\n \\n\\n", $$0, $$0, $$0) }' >> $TARGET ;