From ef6b25432d9c46d71b08c0f7d5f2686df428c4e8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 19 Nov 2006 16:45:16 +0000 Subject: [PATCH] Merged with trunk R1141 git-svn-id: svn://localhost/ardour2/branches/midi@1142 d708f5d6-7413-0410-9779-e7cbd77b26cf --- DOCUMENTATION/TRANSLATORS | 1 + SConstruct | 156 +- ardour.rc.in | 3 +- ardour_system.rc | 2 +- gtk2_ardour/SConscript | 6 +- gtk2_ardour/about.cc | 21 +- gtk2_ardour/actions.cc | 27 - gtk2_ardour/add_route_dialog.cc | 22 +- gtk2_ardour/ardev_common.sh | 6 +- gtk2_ardour/ardour.bindings | 8 +- gtk2_ardour/ardour.colors | 20 +- gtk2_ardour/ardour.menus | 29 +- gtk2_ardour/ardour.sh.in | 2 + gtk2_ardour/ardour2_ui.rc | 239 +- gtk2_ardour/ardour_ui.cc | 87 +- gtk2_ardour/ardour_ui.h | 35 +- gtk2_ardour/ardour_ui2.cc | 2 +- gtk2_ardour/ardour_ui_options.cc | 4 +- gtk2_ardour/audio_clock.cc | 2 +- gtk2_ardour/audio_region_editor.cc | 508 +- gtk2_ardour/audio_region_editor.h | 71 - gtk2_ardour/audio_region_view.cc | 52 +- gtk2_ardour/audio_region_view.h | 6 +- gtk2_ardour/automation_line.cc | 96 +- gtk2_ardour/automation_line.h | 10 +- gtk2_ardour/automation_time_axis.cc | 20 +- gtk2_ardour/canvas-waveview.c | 79 +- gtk2_ardour/editing.cc | 56 + gtk2_ardour/editing.h | 42 +- gtk2_ardour/editor.cc | 372 +- gtk2_ardour/editor.h | 97 +- gtk2_ardour/editor_actions.cc | 265 +- gtk2_ardour/editor_audio_import.cc | 12 +- gtk2_ardour/editor_canvas.cc | 41 +- gtk2_ardour/editor_markers.cc | 2 +- gtk2_ardour/editor_mixer.cc | 7 +- gtk2_ardour/editor_mouse.cc | 28 +- gtk2_ardour/editor_ops.cc | 129 +- gtk2_ardour/editor_region_list.cc | 15 +- gtk2_ardour/editor_route_list.cc | 4 + gtk2_ardour/editor_rulers.cc | 73 +- gtk2_ardour/editor_tempodisplay.cc | 16 +- gtk2_ardour/export_dialog.cc | 16 +- gtk2_ardour/export_region_dialog.cc | 2 +- gtk2_ardour/fft_graph.cc | 28 +- gtk2_ardour/gain_automation_time_axis.cc | 8 +- gtk2_ardour/gui_thread.h | 5 + gtk2_ardour/i18n.h | 2 + gtk2_ardour/icons/hide.png | Bin 0 -> 523 bytes gtk2_ardour/icons/record_normal_red.png | Bin 0 -> 489 bytes gtk2_ardour/icons/record_tape_red.png | Bin 0 -> 613 bytes gtk2_ardour/icons/strip_width.png | Bin 0 -> 256 bytes gtk2_ardour/io_selector.cc | 237 +- gtk2_ardour/io_selector.h | 4 +- gtk2_ardour/keyboard.cc | 2 + gtk2_ardour/location_ui.cc | 2 +- gtk2_ardour/main.cc | 14 +- gtk2_ardour/marker_time_axis_view.cc | 2 +- gtk2_ardour/mixer_strip.cc | 164 +- gtk2_ardour/mixer_strip.h | 2 + gtk2_ardour/mixer_ui.cc | 60 +- gtk2_ardour/new_session_dialog.cc | 1 - gtk2_ardour/option_editor.cc | 42 +- gtk2_ardour/option_editor.h | 6 +- gtk2_ardour/plugin_ui.cc | 9 +- gtk2_ardour/po/SConscript | 51 - gtk2_ardour/po/ru_RU.po | 5299 +++++++-------- gtk2_ardour/po/sv_SE.po | 5865 +++++++++++++++++ gtk2_ardour/public_editor.h | 6 +- gtk2_ardour/redirect_box.cc | 63 +- gtk2_ardour/redirect_box.h | 14 +- gtk2_ardour/region_gain_line.cc | 26 +- gtk2_ardour/region_selection.cc | 12 +- gtk2_ardour/region_view.cc | 3 +- gtk2_ardour/route_time_axis.cc | 224 +- gtk2_ardour/route_time_axis.h | 25 +- gtk2_ardour/route_ui.cc | 32 +- gtk2_ardour/route_ui.h | 2 - gtk2_ardour/selection.h | 1 + gtk2_ardour/sfdb_ui.cc | 40 +- gtk2_ardour/sfdb_ui.h | 1 + gtk2_ardour/streamview.cc | 2 +- gtk2_ardour/time_axis_view.cc | 59 +- gtk2_ardour/utils.cc | 35 +- gtk2_ardour/visual_time_axis.cc | 5 + libs/ardour/SConscript | 13 +- libs/ardour/ardour/audio_diskstream.h | 2 + libs/ardour/ardour/audio_track.h | 5 + libs/ardour/ardour/audio_unit.h | 2 +- libs/ardour/ardour/audiofilesource.h | 13 +- libs/ardour/ardour/audioregion.h | 14 +- libs/ardour/ardour/audiosource.h | 2 +- libs/ardour/ardour/automation_event.h | 33 +- libs/ardour/ardour/configuration_vars.h | 1 - libs/ardour/ardour/coreaudiosource.h | 4 +- libs/ardour/ardour/curve.h | 11 +- libs/ardour/ardour/destructive_filesource.h | 4 +- libs/ardour/ardour/diskstream.h | 6 +- libs/ardour/ardour/insert.h | 16 +- libs/ardour/ardour/io.h | 40 +- libs/ardour/ardour/location.h | 16 +- libs/ardour/ardour/midi_diskstream.h | 2 +- libs/ardour/ardour/midi_region.h | 3 - libs/ardour/ardour/midi_track.h | 2 +- libs/ardour/ardour/panner.h | 43 +- libs/ardour/ardour/playlist.h | 17 +- libs/ardour/ardour/redirect.h | 22 +- libs/ardour/ardour/region.h | 13 +- libs/ardour/ardour/route.h | 12 +- libs/ardour/ardour/session.h | 36 +- libs/ardour/ardour/sndfilesource.h | 41 +- libs/ardour/ardour/source.h | 18 +- libs/ardour/ardour/state_manager.h | 56 - libs/ardour/ardour/tempo.h | 27 +- libs/ardour/ardour/track.h | 9 +- libs/ardour/ardour/types.h | 6 + libs/ardour/ardour/vst_plugin.h | 1 - libs/ardour/audio_diskstream.cc | 89 +- libs/ardour/audio_playlist.cc | 23 +- libs/ardour/audio_track.cc | 70 +- libs/ardour/audioengine.cc | 1 + libs/ardour/audiofilesource.cc | 107 +- libs/ardour/audioregion.cc | 122 +- libs/ardour/audiosource.cc | 25 +- libs/ardour/automation_event.cc | 391 +- libs/ardour/control_protocol_manager.cc | 22 + libs/ardour/coreaudiosource.cc | 56 +- libs/ardour/curve.cc | 42 +- libs/ardour/destructive_filesource.cc | 19 +- libs/ardour/diskstream.cc | 16 +- libs/ardour/globals.cc | 2 + libs/ardour/i18n.h | 2 + libs/ardour/insert.cc | 65 +- libs/ardour/io.cc | 450 +- libs/ardour/location.cc | 87 +- libs/ardour/midi_diskstream.cc | 3 +- libs/ardour/midi_region.cc | 1 - libs/ardour/midi_track.cc | 19 +- libs/ardour/panner.cc | 288 +- libs/ardour/playlist.cc | 38 +- libs/ardour/plugin_manager.cc | 3 +- libs/ardour/po/sv_SE.po | 2025 ++++++ libs/ardour/redirect.cc | 302 +- libs/ardour/region.cc | 65 +- libs/ardour/route.cc | 127 +- libs/ardour/send.cc | 11 +- libs/ardour/session.cc | 105 +- libs/ardour/session_click.cc | 2 +- libs/ardour/session_command.cc | 40 +- libs/ardour/session_state.cc | 132 +- libs/ardour/session_transport.cc | 5 +- libs/ardour/sndfile_helpers.cc | 4 +- libs/ardour/sndfilesource.cc | 476 +- libs/ardour/source.cc | 24 + libs/ardour/source_factory.cc | 9 +- libs/ardour/sse_functions_64bit.s | 5 + libs/ardour/state_manager.cc | 91 - libs/ardour/tempo.cc | 141 +- libs/ardour/track.cc | 16 +- libs/ardour/utils.cc | 84 +- libs/ardour/vst_plugin.cc | 10 - libs/clearlooks/SConscript | 23 + libs/clearlooks/bits.c | 121 + libs/clearlooks/clearlooks_draw.c | 1293 ++++ libs/clearlooks/clearlooks_draw.h | 159 + libs/clearlooks/clearlooks_rc_style.c | 392 ++ libs/clearlooks/clearlooks_rc_style.h | 57 + libs/clearlooks/clearlooks_style.c | 2657 ++++++++ libs/clearlooks/clearlooks_style.h | 108 + libs/clearlooks/clearlooks_theme_main.c | 37 + libs/clearlooks/cpdll.sh | 2 + libs/clearlooks/support.c | 981 +++ libs/clearlooks/support.h | 110 + libs/fst/SConscript | 8 +- libs/gtkmm2ext/SConscript | 2 +- libs/gtkmm2ext/barcontroller.cc | 1 + libs/gtkmm2ext/click_box.cc | 17 +- libs/gtkmm2ext/gtkmm2ext/click_box.h | 1 + libs/gtkmm2ext/gtkmm2ext/gtk_ui.h | 2 + libs/gtkmm2ext/tearoff.cc | 18 +- libs/libsndfile/SConscript | 2 +- libs/midi++2/SConscript | 2 +- libs/midi++2/midi++/factory.h | 5 +- libs/midi++2/midifactory.cc | 30 +- libs/midi++2/midimanager.cc | 66 +- libs/pbd/SConscript | 2 +- libs/pbd/controllable.cc | 2 +- libs/pbd/convert.cc | 41 +- libs/pbd/pbd/command.h | 5 +- libs/pbd/pbd/controllable.h | 11 +- libs/pbd/pbd/convert.h | 5 +- libs/pbd/pbd/crossthread.h | 38 + libs/pbd/pbd/destructible.h | 16 +- libs/pbd/pbd/memento_command.h | 16 +- libs/pbd/pbd/rcu.h | 2 +- libs/pbd/pbd/shiva.h | 78 +- libs/pbd/pbd/statefuldestructible.h | 12 + libs/pbd/pbd/undo.h | 6 +- libs/pbd/pbd/xml++.h | 3 +- libs/pbd/undo.cc | 52 +- libs/pbd/whitespace.cc | 13 + libs/pbd/xml++.cc | 30 +- libs/surfaces/control_protocol/SConscript | 1 + libs/surfaces/control_protocol/basic_ui.cc | 4 +- .../tranzport/tranzport_control_protocol.cc | 10 +- svn_revision.h | 4 + tools/osx_packaging/ardour2_mac_ui.rc | 173 +- vst/SConscript | 2 +- vst/ardevst | 3 +- 209 files changed, 21004 insertions(+), 6768 deletions(-) create mode 100644 gtk2_ardour/icons/hide.png create mode 100644 gtk2_ardour/icons/record_normal_red.png create mode 100644 gtk2_ardour/icons/record_tape_red.png create mode 100644 gtk2_ardour/icons/strip_width.png delete mode 100644 gtk2_ardour/po/SConscript create mode 100644 gtk2_ardour/po/sv_SE.po delete mode 100644 libs/ardour/ardour/state_manager.h create mode 100644 libs/ardour/po/sv_SE.po delete mode 100644 libs/ardour/state_manager.cc create mode 100644 libs/clearlooks/SConscript create mode 100644 libs/clearlooks/bits.c create mode 100644 libs/clearlooks/clearlooks_draw.c create mode 100644 libs/clearlooks/clearlooks_draw.h create mode 100644 libs/clearlooks/clearlooks_rc_style.c create mode 100644 libs/clearlooks/clearlooks_rc_style.h create mode 100644 libs/clearlooks/clearlooks_style.c create mode 100644 libs/clearlooks/clearlooks_style.h create mode 100644 libs/clearlooks/clearlooks_theme_main.c create mode 100755 libs/clearlooks/cpdll.sh create mode 100644 libs/clearlooks/support.c create mode 100644 libs/clearlooks/support.h create mode 100644 libs/pbd/pbd/crossthread.h create mode 100644 svn_revision.h diff --git a/DOCUMENTATION/TRANSLATORS b/DOCUMENTATION/TRANSLATORS index 5d54a48ecb..c09a40406b 100644 --- a/DOCUMENTATION/TRANSLATORS +++ b/DOCUMENTATION/TRANSLATORS @@ -6,6 +6,7 @@ Many thanks to these translators for making Ardour available in other languages: French: Alain Fréhel + Christophe Combelles German: Karsten Petersen diff --git a/SConstruct b/SConstruct index a06fadbef7..27e04b2ee1 100644 --- a/SConstruct +++ b/SConstruct @@ -9,13 +9,14 @@ import errno import time import platform import string +import commands from sets import Set import SCons.Node.FS SConsignFile() EnsureSConsVersion(0, 96) -version = '2.0beta5.1' +version = '2.0beta8' subst_dict = { } @@ -40,7 +41,7 @@ opts.AddOptions( PathOption('PREFIX', 'Set the install "prefix"', '/usr/local'), BoolOption('SURFACES', 'Build support for control surfaces', 0), BoolOption('SYSLIBS', 'USE AT YOUR OWN RISK: CANCELS ALL SUPPORT FROM ARDOUR AUTHORS: Use existing system versions of various libraries instead of internal ones', 0), - BoolOption('VERSIONED', 'Add version information to ardour/gtk executable name inside the build directory', 0), + BoolOption('VERSIONED', 'Add revision information to ardour/gtk executable name inside the build directory', 0), BoolOption('VST', 'Compile with support for VST', 0) ) @@ -230,41 +231,71 @@ def i18n (buildenv, sources, installenv): moname = domain + '.mo' installenv.Alias('install', installenv.InstallAs (os.path.join (modir, moname), lang + '.mo')) + +def fetch_svn_revision (path): + cmd = "svn info " + cmd += path + cmd += " | awk '/^Revision:/ { print $2}'" + return commands.getoutput (cmd) + +def create_stored_revision (target = None, source = None, env = None): + if os.path.exists('.svn'): + rev = fetch_svn_revision ('.'); + try: + text = "#ifndef __ardour_svn_revision_h__\n" + text += "#define __ardour_svn_revision_h__\n" + text += "static const char* ardour_svn_revision = \"" + rev + "\";\n"; + text += "#endif\n" + print '============> writing svn revision info to svn_revision.h\n' + o = file ('svn_revision.h', 'w') + o.write (text) + o.close () + except IOError: + print "Could not open svn_revision.h for writing\n" + sys.exit (-1) + else: + print "You cannot use \"scons revision\" on without using a checked out" + print "copy of the Ardour source code repository" + sys.exit (-1) + # # A generic builder for version.cc files # # note: requires that DOMAIN, MAJOR, MINOR, MICRO are set in the construction environment # note: assumes one source files, the header that declares the version variables # + def version_builder (target, source, env): - text = "int " + env['DOMAIN'] + "_major_version = " + str (env['MAJOR']) + ";\n" - text += "int " + env['DOMAIN'] + "_minor_version = " + str (env['MINOR']) + ";\n" - text += "int " + env['DOMAIN'] + "_micro_version = " + str (env['MICRO']) + ";\n" - - try: - o = file (target[0].get_path(), 'w') - o.write (text) - o.close () - except IOError: - print "Could not open", target[0].get_path(), " for writing\n" - sys.exit (-1) - - text = "#ifndef __" + env['DOMAIN'] + "_version_h__\n" - text += "#define __" + env['DOMAIN'] + "_version_h__\n" - text += "extern int " + env['DOMAIN'] + "_major_version;\n" - text += "extern int " + env['DOMAIN'] + "_minor_version;\n" - text += "extern int " + env['DOMAIN'] + "_micro_version;\n" - text += "#endif /* __" + env['DOMAIN'] + "_version_h__ */\n" - - try: - o = file (target[1].get_path(), 'w') - o.write (text) - o.close (); - except IOError: - print "Could not open", target[1].get_path(), " for writing\n" - sys.exit (-1) - - return None + + text = "int " + env['DOMAIN'] + "_major_version = " + str (env['MAJOR']) + ";\n" + text += "int " + env['DOMAIN'] + "_minor_version = " + str (env['MINOR']) + ";\n" + text += "int " + env['DOMAIN'] + "_micro_version = " + str (env['MICRO']) + ";\n" + + try: + o = file (target[0].get_path(), 'w') + o.write (text) + o.close () + except IOError: + print "Could not open", target[0].get_path(), " for writing\n" + sys.exit (-1) + + text = "#ifndef __" + env['DOMAIN'] + "_version_h__\n" + text += "#define __" + env['DOMAIN'] + "_version_h__\n" + text += "extern const char* " + env['DOMAIN'] + "_revision;\n" + text += "extern int " + env['DOMAIN'] + "_major_version;\n" + text += "extern int " + env['DOMAIN'] + "_minor_version;\n" + text += "extern int " + env['DOMAIN'] + "_micro_version;\n" + text += "#endif /* __" + env['DOMAIN'] + "_version_h__ */\n" + + try: + o = file (target[1].get_path(), 'w') + o.write (text) + o.close () + except IOError: + print "Could not open", target[1].get_path(), " for writing\n" + sys.exit (-1) + + return None version_bld = Builder (action = version_builder) env.Append (BUILDERS = {'VersionBuild' : version_bld}) @@ -278,32 +309,18 @@ env.Append (BUILDERS = {'VersionBuild' : version_bld}) # def versioned_builder(target,source,env): - # build ID is composed of a representation of the date of the last CVS transaction - # for this (SConscript) file + w, r = os.popen2( "svn info | awk '/^Revision:/ { print $2}'") - try: - o = file (source[0].get_dir().get_path() + '/CVS/Entries', "r") - except IOError: - print "Could not CVS/Entries for reading" + last_revision = r.readline().strip() + w.close() + r.close() + if last_revision == "": + print "No SVN info found - versioned executable cannot be built" return -1 - last_date = "" - lines = o.readlines() - for line in lines: - if line[0:12] == '/SConscript/': - parts = line.split ("/") - last_date = parts[3] - break - o.close () + print "The current build ID is " + last_revision - if last_date == "": - print "No SConscript CVS update info found - versioned executable cannot be built" - return -1 - - tag = time.strftime ('%Y%M%d%H%m', time.strptime (last_date)) - print "The current build ID is " + tag - - tagged_executable = source[0].get_path() + '-' + tag + tagged_executable = source[0].get_path() + '-' + last_revision if os.path.exists (tagged_executable): print "Replacing existing executable with the same build tag." @@ -361,7 +378,7 @@ env.Append (BUILDERS = {'Tarball' : tarball_bld}) # if env['VST']: - sys.stdout.write ("Are you building Ardour for personal use (rather than distributiont to others)? [no]: ") + sys.stdout.write ("Are you building Ardour for personal use (rather than distribution to others)? [no]: ") answer = sys.stdin.readline () answer = answer.rstrip().strip() if answer != "yes" and answer != "y": @@ -462,7 +479,7 @@ libraries['flac'] = conf.Finish () libraries['boost'] = LibraryInfo () conf = Configure (libraries['boost']) -if conf.CheckHeader ('boost/shared_ptr.hpp', language='CXX') == 0: +if conf.CheckHeader ('boost/shared_ptr.hpp', language='CXX') == False: print "Boost header files do not appear to be installed." sys.exit (1) @@ -523,7 +540,7 @@ elif conf.CheckCHeader('/System/Library/Frameworks/CoreMIDI.framework/Headers/Co subst_dict['%MIDITYPE%'] = "coremidi" print "Using CoreMIDI" else: - print "It appears you don't have the required MIDI libraries installed." + print "It appears you don't have the required MIDI libraries installed. For Linux this means you are missing the development package for ALSA libraries." sys.exit (1) env = conf.Finish() @@ -549,7 +566,7 @@ if env['SYSLIBS']: # cannot use system one for the time being # - libraries['sndfile'] = LibraryInfo(LIBS='libsndfile', + libraries['sndfile-ardour'] = LibraryInfo(LIBS='libsndfile-ardour', LIBPATH='#libs/libsndfile', CPPPATH=['#libs/libsndfile', '#libs/libsndfile/src']) @@ -587,7 +604,8 @@ if env['SYSLIBS']: gtk_subdirs = [ # 'libs/flowcanvas', 'libs/gtkmm2ext', - 'gtk2_ardour' + 'gtk2_ardour', + 'libs/clearlooks' ] else: @@ -616,7 +634,7 @@ else: libraries['soundtouch'] = LibraryInfo(LIBS='soundtouch', LIBPATH='#libs/soundtouch', CPPPATH=['#libs', '#libs/soundtouch']) - libraries['sndfile'] = LibraryInfo(LIBS='libsndfile', + libraries['sndfile-ardour'] = LibraryInfo(LIBS='libsndfile-ardour', LIBPATH='#libs/libsndfile', CPPPATH=['#libs/libsndfile', '#libs/libsndfile/src']) # libraries['libglademm'] = LibraryInfo(LIBS='libglademm', @@ -656,8 +674,9 @@ else: 'libs/gtkmm2/gtk', 'libs/libgnomecanvasmm', # 'libs/flowcanvas', - 'libs/gtkmm2ext', - 'gtk2_ardour' + 'libs/gtkmm2ext', + 'gtk2_ardour', + 'libs/clearlooks' ] # @@ -722,10 +741,10 @@ if os.environ.has_key('HOME'): conf = Configure (env) -have_cxx = conf.TryAction (Action (env['CXX'] + ' --version')) +have_cxx = conf.TryAction (Action (str(env['CXX']) + ' --version')) if have_cxx[0] != 1: print "This system has no functional C++ compiler. You cannot build Ardour from source without one." - exit (1) + sys.exit (1) else: print "Congratulations, you have a functioning C++ compiler." @@ -950,6 +969,9 @@ env = conf.Finish() rcbuild = env.SubstInFile ('ardour.rc','ardour.rc.in', SUBST_DICT = subst_dict) +the_revision = env.Command ('frobnicatory_decoy', [], create_stored_revision) + +env.Alias('revision', the_revision) env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour_system.rc')) env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.rc')) @@ -959,13 +981,8 @@ Default (rcbuild) Precious (env['DISTTREE']) -# -# note the special "cleanfirst" source name. this triggers removal -# of the existing disttree -# - env.Distribute (env['DISTTREE'], - [ 'SConstruct', + [ 'SConstruct', 'svn_revision.h', 'COPYING', 'PACKAGER_README', 'README', 'ardour.rc.in', 'ardour_system.rc', @@ -989,12 +1006,13 @@ env.Distribute (env['DISTTREE'], glob.glob ('DOCUMENTATION/README*') ) -srcdist = env.Tarball(env['TARBALL'], env['DISTTREE']) +srcdist = env.Tarball(env['TARBALL'], [ env['DISTTREE'], the_revision ]) env.Alias ('srctar', srcdist) # # don't leave the distree around # + env.AddPreAction (env['DISTTREE'], Action ('rm -rf ' + str (File (env['DISTTREE'])))) env.AddPostAction (srcdist, Action ('rm -rf ' + str (File (env['DISTTREE'])))) diff --git a/ardour.rc.in b/ardour.rc.in index 735b19c233..a8c8b74bfd 100644 --- a/ardour.rc.in +++ b/ardour.rc.in @@ -1,4 +1,4 @@ - + @@ -31,6 +31,7 @@