Better method for redrawing gain meter pixmaps upon theme change
[ardour.git] / gtk2_ardour / SConscript
index bf8e4f560ed9ef14a1dabe2ba1da8cc2805f754d..010ce5888e7eea81567e123b167ef5b838a75d89 100644 (file)
@@ -4,7 +4,7 @@ import os
 import os.path
 import glob
 
-Import('env install_prefix final_prefix config_prefix libraries i18n version')
+Import('env install_prefix final_prefix config_prefix libraries i18n ardour_version')
 
 gtkardour = env.Copy()
 gtkmmtests = env.Copy()
@@ -102,16 +102,15 @@ automation_time_axis.cc
 midi_time_axis.cc
 midi_streamview.cc
 axis_view.cc
-canvas-imageframe.c
 canvas-simpleline.c
 simpleline.cc
 canvas-simplerect.c
 simplerect.cc
 canvas-waveview.c
-color_manager.cc
 crossfade_edit.cc
 crossfade_view.cc
 curvetest.cc
+enums.cc
 editing.cc
 editor.cc
 editor_actions.cc
@@ -123,7 +122,6 @@ editor_cursors.cc
 editor_edit_groups.cc
 editor_export_audio.cc
 editor_hscroller.cc
-editor_imageframe.cc
 editor_keyboard.cc
 editor_keys.cc
 editor_markers.cc
@@ -135,6 +133,7 @@ editor_region_list.cc
 editor_route_list.cc
 editor_rulers.cc
 editor_scrub.cc
+editor_selection.cc
 editor_selection_list.cc
 editor_tempodisplay.cc
 editor_timefx.cc
@@ -145,30 +144,21 @@ export_range_markers_dialog.cc
 gain_automation_time_axis.cc
 gain_meter.cc
 ghostregion.cc
-grouped_buttons.cc
 gtk-custom-hruler.c
 gtk-custom-ruler.c
-imageframe.cc
-imageframe_socket_handler.cc
-imageframe_time_axis.cc
-imageframe_time_axis_group.cc
-imageframe_time_axis_view.cc
-imageframe_view.cc
 io_selector.cc
 keyboard.cc
 ladspa_pluginui.cc
 location_ui.cc
 main.cc
 marker.cc
-marker_time_axis.cc
-marker_time_axis_view.cc
-marker_view.cc
 mixer_strip.cc
 mixer_ui.cc
 new_session_dialog.cc
 option_editor.cc
 opts.cc
 pan_automation_time_axis.cc
+panner.cc
 panner2d.cc
 panner_ui.cc
 playlist_selector.cc
@@ -194,13 +184,13 @@ send_ui.cc
 streamview.cc
 audio_streamview.cc
 tempo_dialog.cc
+theme_manager.cc
 time_axis_view.cc
 time_axis_view_item.cc
 route_time_axis.cc
 time_selection.cc
 utils.cc
 version.cc
-visual_time_axis.cc
 waveview.cc
 """)
 
@@ -244,6 +234,25 @@ if env['VST']:
        extra_sources += vst_files
        gtkardour.Append (CCFLAGS="-DVST_SUPPORT", CPPPATH="#libs/fst")
 
+cmt_files=Split("""
+canvas-imageframe.c
+editor_imageframe.cc
+imageframe.cc
+imageframe_socket_handler.cc
+imageframe_time_axis.cc
+imageframe_time_axis_group.cc
+imageframe_time_axis_view.cc
+imageframe_view.cc
+marker_time_axis.cc
+marker_time_axis_view.cc
+marker_view.cc
+visual_time_axis.cc
+""")
+
+if env['CMT']:
+    extra_sources += cmt_files
+    gtkardour.Append (CCFLAGS="-DWITH_CMT")
+
 if gtkardour['AUDIOUNITS']:
     extra_sources += audiounit_files
     gtkardour.Append(CCFLAGS='-DHAVE_AUDIOUNITS')
@@ -262,7 +271,7 @@ versionflag = '-DVERSIONSTRING=\\\"' + env['VERSION'] + '\\\"'
 
 gtkardour.Append(CXXFLAGS=versionflag)
 
-executable = 'ardour.bin'
+executable = 'ardour-' + ardour_version
 
 ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
 ardourlib = gtkardour.SharedLibrary(target = 'ardourgtk', source = gtkardour_files + extra_sources)
@@ -273,15 +282,31 @@ rcu = gtkardour.Program(target = 'rcu', source = rcu_files)
 tt = gtkmmtests.Program(target = 'tt', source = tt_files)
 
 my_subst_dict = { }
+
+#
+# null substitution just to avoid ardour.bindings being in svn
+#
+
+ardourbindings = env.SubstInFile ('ardour.bindings', 'ardour.bindings.in', SUBST_DICT = my_subst_dict);
+
 my_subst_dict['%INSTALL_PREFIX%'] = final_prefix
+my_subst_dict['%LIBDIR%'] = env['LIBDIR']
+my_subst_dict['%VERSION%'] = ardour_version
 
 ardoursh = env.SubstInFile ('ardour.sh','ardour.sh.in', SUBST_DICT = my_subst_dict);
 env.AddPostAction (ardoursh, Chmod ('$TARGET', 0755))
 
+ardourdev = env.SubstInFile ('ardev_common.sh','ardev_common.sh.in', SUBST_DICT = my_subst_dict);
+env.AddPostAction (ardourdev, Chmod ('$TARGET', 0755))
+
+Default(ardourbindings)
+Default(ardourdev)
+Default(ardoursh)
+
 if env['VST']:
        Default(ardourlib)
        # the library - into the library dir
-       env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), ardourlib))
+       env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour2'), ardourlib))
 else:
 
        if env['VERSIONED']:
@@ -292,7 +317,7 @@ else:
         #install
 
        # the executable - into the library dir
-       env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), ardour))
+       env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour2'), ardour))
        # the script - into the bin dir
        env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour2', ardoursh))
 
@@ -300,14 +325,15 @@ if env['NLS']:
        i18n (gtkardour, gtkardour_files+skipped_files+fft_analysis_files, env)
     
 # configuration files
-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'), 'ardour2_ui_dark.rc'))
+env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour2_ui_light.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'))
 # data files
-env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2'), 'splash.png'))
-env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/pixmaps'), pixmap_files))
-env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/icons'), icon_files))
+env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'ardour2'), 'splash.png'))
+env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'ardour2', 'pixmaps'), pixmap_files))
+env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'ardour2', 'icons'), icon_files))
 
 env.Alias ('version', gtkardour.VersionBuild(['version.cc','version.h'], []))
                
@@ -316,8 +342,10 @@ env.Alias ('tarball', env.Distribute (env['DISTTREE'],
                                       [ 'SConscript',
                                         'i18n.h', 'gettext.h',
                                        'ardour.sh.in',
-                                        'ardour2_ui.rc', 'splash.png',
-                                        'ardour.menus', 'ardour.bindings', 'ardour.colors',
+                                       'ardev_common.sh.in',
+                                       'ardev', 'ardbg',
+                                        'ardour2_ui_dark.rc', 'ardour2_ui_light.rc', 'splash.png',
+                                        'ardour.menus', 'ardour.bindings.in', 'ardour.colors',
                                        'editor_xpms'
                                         ] +
                                       gtkardour_files +