Stop ardour from reporting success/failure of adding favorite plugins
[ardour.git] / gtk2_ardour / SConscript
index a4107432530ce5f3ad19af0699bf692969748fd1..ed1f66d1e5b609b91845f4791c7d909a5df566f1 100644 (file)
@@ -6,8 +6,8 @@ import glob
 
 Import('env install_prefix final_prefix config_prefix libraries i18n ardour_version')
 
-gtkardour = env.Copy()
-gtkmmtests = env.Copy()
+gtkardour = env.Clone()
+gtkmmtests = env.Clone()
 
 #
 # this defines the version number of the GTK interface to ardour
@@ -24,46 +24,51 @@ gtkardour.Append(CPPPATH="#/")  # for top level svn_revision.h
 gtkardour.Append(PACKAGE=domain)
 gtkardour.Append(POTFILE=domain + '.pot')
 
-if gtkardour['DIST_TARGET'] == 'panther' or gtkardour['DIST_TARGET'] == 'tiger':
+if gtkardour['IS_OSX']:
        gtkardour.Append (LINKFLAGS="-Xlinker -headerpad -Xlinker 2048")
 
 gtkardour.Merge ([
     libraries['ardour'],
     libraries['ardour_cp'],
-    libraries['gtkmm2ext'],
-    libraries['midi++2'],
-    libraries['pbd'],
-    libraries['gtkmm2'],
+    libraries['atkmm'],
+    libraries['fftw3'],
+    libraries['fftw3f'],
+    libraries['flac'],
+    libraries['freetype2'],
+    libraries['gdkmm2'],
     libraries['glib2'],
+    libraries['glibmm2'],
+    libraries['gtk2'],
+    libraries['gtkmm2'],
+    libraries['gtkmm2ext'],
+    libraries['jack'],
     libraries['libgnomecanvas2'],
     libraries['libgnomecanvasmm'],
-    libraries['sysmidi'],
-    libraries['sndfile-ardour'],
-    libraries['flac'],
     libraries['lrdf'],
-    libraries['glibmm2'],
+    libraries['midi++2'],
     libraries['pangomm'],
-    libraries['atkmm'],
-    libraries['gdkmm2'],
+    libraries['pbd'],
+    libraries['samplerate'],
     libraries['sigc2'],
-    libraries['gtk2'],
+    libraries['sndfile-ardour'],
+    libraries['sysmidi'],
+    libraries['vamp'],
+    libraries['vamphost'],
     libraries['xml'],
-    libraries['xslt'],
-    libraries['samplerate'],
-    libraries['jack']
+    libraries['xslt']
 ])
 
 gtkmmtests.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
 
 gtkmmtests.Merge ([
-    libraries['gtkmm2'],
+    libraries['atkmm'],
+    libraries['gdkmm2'],
     libraries['glib2'],
     libraries['glibmm2'],
+    libraries['gtk2'],
+    libraries['gtkmm2'],
     libraries['pangomm'],
-    libraries['atkmm'],
-    libraries['gdkmm2'],
-    libraries['sigc2'],
-    libraries['gtk2']
+    libraries['sigc2']
 ])
 
 if gtkardour['DMALLOC']:
@@ -74,8 +79,12 @@ if gtkardour['FFT_ANALYSIS']:
        gtkardour.Merge ([libraries['fftw3f']])
        gtkardour.Append(CCFLAGS='-DFFT_ANALYSIS')
 
+if gtkardour['FREESOUND']:
+       gtkardour.Merge ([libraries['curl']])
+       gtkardour.Append(CCFLAGS='-DFREESOUND')
+
 if gtkardour['RUBBERBAND']:
-       gtkardour.Merge ([ libraries['rubberband'],  libraries['vamp'], libraries['fftw3f'], libraries['fftw3'] ])
+       gtkardour.Merge ([ libraries['rubberband'] ])
 else:
        gtkardour.Merge ([ libraries['soundtouch'] ])
 
@@ -88,8 +97,7 @@ au_pluginui.mm
 """)
 
 gtkosx_files=Split("""
-sync-menu.c
-cocoacarbon.cc
+cocoacarbon.mm
 """)
 
 x11_files=Split("""
@@ -109,7 +117,9 @@ ardour_ui_ed.cc
 ardour_ui_mixer.cc
 ardour_ui_options.cc
 audio_clock.cc
-route_time_axis.cc
+audio_region_editor.cc
+audio_region_view.cc
+audio_streamview.cc
 audio_time_axis.cc
 automation_gain_line.cc
 automation_line.cc
@@ -119,14 +129,11 @@ axis_view.cc
 boolean_automation_line.cc
 canvas-imageframe.c
 canvas-simpleline.c
-simpleline.cc
 canvas-simplerect.c
-simplerect.cc
 canvas-waveview.c
 crossfade_edit.cc
 crossfade_view.cc
 curvetest.cc
-enums.cc
 editing.cc
 editor.cc
 editor_actions.cc
@@ -155,10 +162,11 @@ editor_selection_list.cc
 editor_tempodisplay.cc
 editor_timefx.cc
 engine_dialog.cc
+enums.cc
 export_dialog.cc
-export_session_dialog.cc
-export_region_dialog.cc
 export_range_markers_dialog.cc
+export_region_dialog.cc
+export_session_dialog.cc
 gain_automation_time_axis.cc
 gain_meter.cc
 generic_pluginui.cc
@@ -188,7 +196,6 @@ new_session_dialog.cc
 option_editor.cc
 opts.cc
 pan_automation_time_axis.cc
-
 panner.cc
 panner2d.cc
 panner_ui.cc
@@ -200,21 +207,24 @@ public_editor.cc
 redirect_automation_line.cc
 redirect_automation_time_axis.cc
 redirect_box.cc
-audio_region_editor.cc
 region_gain_line.cc
 region_selection.cc
 region_view.cc
-audio_region_view.cc
+rhythm_ferret.cc
 route_params_ui.cc
 route_redirect_selection.cc
+route_time_axis.cc
 route_ui.cc
 selection.cc
-sfdb_ui.cc
 send_ui.cc
+sfdb_ui.cc
+simpleline.cc
+simplerect.cc
+splash.cc
 streamview.cc
-audio_streamview.cc
 tape_region_view.cc
 tempo_dialog.cc
+tempo_lines.cc
 theme_manager.cc
 time_axis_view.cc
 time_axis_view_item.cc
@@ -232,6 +242,10 @@ fft_graph.cc
 fft_result.cc
 """)
 
+freesound_files=Split("""
+sfdb_freesound_mootcher.cc
+""")
+
 pixmap_files = glob.glob('pixmaps/*.xpm')
 icon_files = glob.glob ('icons/*.png')
 
@@ -270,6 +284,14 @@ if env['VST']:
        extra_sources += vst_files
        gtkardour.Append (CCFLAGS="-DVST_SUPPORT", CPPPATH="#libs/fst")
 
+lv2_files = [ 'lv2_plugin_ui.cc' ]
+
+if env['LV2']:
+       extra_sources += lv2_files
+       gtkardour.Append (CCFLAGS="-DHAVE_LV2")
+       gtkardour.Merge ([libraries['slv2']])
+
+
 if gtkardour['GTKOSX']:
        extra_sources += gtkosx_files
        gtkardour.Append (CCFLAGS="-DTOP_MENUBAR -DGTKOSX")
@@ -287,6 +309,9 @@ else:
 if env['FFT_ANALYSIS']:
        extra_sources += fft_analysis_files
 
+if env['FREESOUND']:
+       extra_sources += freesound_files
+
 intl_files += extra_sources
 
 gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
@@ -309,78 +334,70 @@ tt = gtkmmtests.Program(target = 'tt', source = tt_files)
 
 my_font_dict = { }
 
-if gtkardour['DIST_TARGET'] == 'panther' or gtkardour['DIST_TARGET'] == 'tiger':
+if gtkardour['IS_OSX']:
        #
        # OS X font rendering is different even with X11
        #
-       my_font_dict['%FONT_TINY%'] = 'Lucida Grande 7'
-       my_font_dict['%FONT_SMALLERER%'] = 'Lucida Grande 8'
-       my_font_dict['%FONT_SMALLER%'] = 'Lucida Grande 9'
-       my_font_dict['%FONT_SMALL%'] = 'Lucida Grande 10'
-       my_font_dict['%FONT_NORMAL%'] = 'Lucida Grande 11'
-       my_font_dict['%FONT_BIG%'] = 'Lucida Grande 12'
-       my_font_dict['%FONT_BIGGER%'] = 'Lucida Grande 14'
-       my_font_dict['%FONT_LARGE%'] = 'Lucida Grande 18'
-       my_font_dict['%FONT_LARGER%'] = 'Lucida Grande 28'
-       my_font_dict['%FONT_HUGER%'] = 'Lucida Grande 36'
-       my_font_dict['%FONT_MASSIVE%'] = 'Lucida Grande 60'
-       my_font_dict['%FONT_BOLD_TINY%'] = 'Lucida Grande bold 7'
-       my_font_dict['%FONT_BOLD_SMALLER%'] = 'Lucida Grande bold 9'
-       my_font_dict['%FONT_BOLD_SMALL%'] = 'Lucida Grande bold 10'
-       my_font_dict['%FONT_BOLD_NORMAL%'] = 'Lucida Grande bold 11'
-       my_font_dict['%FONT_BOLD_BIG%'] = 'Lucida Grande bold 13'
-       my_font_dict['%FONT_BOLD_BIGGER%'] = 'Lucida Grande bold 14'
-       my_font_dict['%FONT_BOLD_LARGE%'] = 'Lucida Grande bold 20'
-       my_font_dict['%FONT_BOLD_LARGER%'] = 'Lucida Grande bold 25'
-       my_font_dict['%FONT_BOLD_HUGER%'] = 'Lucida Grande bold 36'
-       my_font_dict['%FONT_BOLD_MASSIVE%'] = 'Lucida Grande bold 60'
-       my_font_dict['%FONT_ITALIC_TINY%'] = 'Lucida Grande italic 7'
-       my_font_dict['%FONT_ITALIC_SMALLER%'] = 'Lucida Grande italic 9'
-       my_font_dict['%FONT_ITALIC_SMALL%'] = 'Lucida Grande italic 10'
-       my_font_dict['%FONT_ITALIC_NORMAL%'] = 'Lucida Grande italic 11'
-       my_font_dict['%FONT_ITALIC_BIG%'] = 'Lucida Grande italic 15'
-       my_font_dict['%FONT_ITALIC_BIGGER%'] = 'Lucida Grande italic 16'
-       my_font_dict['%FONT_ITALIC_LARGE%'] = 'Lucida Grande italic 20'
-       my_font_dict['%FONT_ITALIC_LARGER%'] = 'Lucida Grande italic 28'
-       my_font_dict['%FONT_ITALIC_HUGER%'] = 'Lucida Grande italic 36'
-       my_font_dict['%FONT_ITALIC_MASSIVE%'] = 'Lucida Grande italic 60'
+
+       font_sizes = {
+               'TINY' : '7',
+               'SMALLER' : '9',
+               'SMALL' : '10',
+               'NORMAL' : '11',
+               'BIG' : '12',
+               'BIGGER' : '14',
+               'LARGE' : '18',
+               'LARGER' : '28',
+               'HUGER' : '36',
+               'MASSIVE' : '60'
+               }
+       basefont = "Lucida Grande"
+
 else:
        #
        # Linux/X11 font rendering
        #
-       my_font_dict['%FONT_TINY%'] = 'sans 4'
-       my_font_dict['%FONT_SMALLERER%'] = 'sans 6'
-       my_font_dict['%FONT_SMALLER%'] = 'sans 6'
-       my_font_dict['%FONT_SMALL%'] = 'sans 7'
-       my_font_dict['%FONT_NORMAL%'] = 'sans 8'
-       my_font_dict['%FONT_BIG%'] = 'sans 12'
-       my_font_dict['%FONT_BIGGER%'] = 'sans 14'
-       my_font_dict['%FONT_LARGE%'] = 'sans 18'
-       my_font_dict['%FONT_LARGER%'] = 'sans 24'
-       my_font_dict['%FONT_HUGER%'] = 'sans 34'
-       my_font_dict['%FONT_MASSIVE%'] = 'sans 60'
-       my_font_dict['%FONT_BOLD_TINY%'] = 'sans bold 4'
-       my_font_dict['%FONT_BOLD_SMALLER%'] = 'sans bold 6'
-       my_font_dict['%FONT_BOLD_SMALL%'] = 'sans bold 7'
-       my_font_dict['%FONT_BOLD_NORMAL%'] = 'sans bold 8'
-       my_font_dict['%FONT_BOLD_BIG%'] = 'sans bold 12'
-       my_font_dict['%FONT_BOLD_BIGGER%'] = 'sans bold 14'
-       my_font_dict['%FONT_BOLD_LARGE%'] = 'sans bold 18'
-       my_font_dict['%FONT_BOLD_LARGER%'] = 'sans bold 24'
-       my_font_dict['%FONT_BOLD_HUGE%'] = 'sans bold 25'
-       my_font_dict['%FONT_BOLD_HUGER%'] = 'sans bold 34'
-       my_font_dict['%FONT_BOLD_MASSIVE%'] = 'sans bold 60'
-       my_font_dict['%FONT_ITALIC_TINY%'] = 'sans italic 4'
-       my_font_dict['%FONT_ITALIC_SMALLER%'] = 'sans italic 6'
-       my_font_dict['%FONT_ITALIC_SMALL%'] = 'sans italic 7'
-       my_font_dict['%FONT_ITALIC_NORMAL%'] = 'sans italic 8'
-       my_font_dict['%FONT_ITALIC_BIG%'] = 'sans italic 12'
-       my_font_dict['%FONT_ITALIC_BIGGER%'] = 'sans italic 14'
-       my_font_dict['%FONT_ITALIC_LARGE%'] = 'sans italic 18'
-       my_font_dict['%FONT_ITALIC_LARGER%'] = 'sans italic 24'
-       my_font_dict['%FONT_ITALIC_HUGE%'] = 'sans italic 25'
-       my_font_dict['%FONT_ITALIC_HUGER%'] = 'sans italic 34'
-       my_font_dict['%FONT_ITALIC_MASSIVE%'] = 'sans italic 60'
+       
+       if gtkardour['OLDFONTS']:
+               font_sizes = {
+                       'TINY' : '4',
+                       'SMALLER' : '6',
+                       'SMALL' : '7',
+                       'NORMAL' : '8',
+                       'BIG' : '12',
+                       'BIGGER' : '14',
+                       'LARGE' : '18',
+                       'LARGER' : '24',
+                       'HUGER' : '34',
+                       'MASSIVE' : '60'
+                       }
+       else:
+               font_sizes = {
+                       'TINY' : '6',
+                       'SMALLER' : '8',
+                       'SMALL' : '9',
+                       'NORMAL' : '10',
+                       'BIG' : '14',
+                       'BIGGER' : '16',
+                       'LARGE' : '18',
+                       'LARGER' : '24',
+                       'HUGER' : '34',
+                       'MASSIVE' : '60'
+                       }
+
+       basefont = "sans"
+
+for style in ['', 'BOLD', 'ITALIC']:
+       for sizename,points in font_sizes.iteritems():
+               if (len (style)):
+                       key = "_".join (['FONT',style,sizename])
+                       fontstyle = " ".join ([basefont,style.lower(),points])
+               else:
+                       key = "_".join (['FONT',sizename])
+                       fontstyle = " ".join ([basefont,points])
+
+               key = '%' + key + '%'
+               my_font_dict[key] = fontstyle
 
 ardour_dark_theme = env.SubstInFile ('ardour2_ui_dark.rc', 'ardour2_ui_dark.rc.in', SUBST_DICT = my_font_dict)
 ardour_light_theme = env.SubstInFile ('ardour2_ui_light.rc', 'ardour2_ui_light.rc.in', SUBST_DICT = my_font_dict)
@@ -393,28 +410,33 @@ my_subst_dict = { }
 
 keybindings_dict = { }
 
-if gtkardour['GTKOSX'] and gtkardour['NATIVE_OSX_KEYS']:
+if gtkardour['GTKOSX']:
        #
-       # Command(Mod1), Alt(Mod5), Ctrl, Shift
+       # Command(Meta), Alt(Mod1), Ctrl, Shift
+       # **** as of february 4th 2008, OUR VERSION OF *****
+       # Gtk/Quartz maps:
+       #  NSCommand (aka "Command" aka "Apple" aka "Cauliflower") -> Meta
+       #  NSAlternate (aka "Option")  -> Mod1
        #
-       keybindings_dict['%PRIMARY%'] = 'Mod5'
-       keybindings_dict['%SECONDARY%'] = 'Alt'
+       keybindings_dict['%PRIMARY%'] = 'Meta'
+       keybindings_dict['%SECONDARY%'] = 'Mod1'
        keybindings_dict['%TERTIARY%'] = 'Shift'
        keybindings_dict['%LEVEL4%'] = 'Ctrl'
-       keybindings_dict['%WINDOW%'] = 'Mod5'
+       keybindings_dict['%WINDOW%'] = 'Mod1'
 else:
        #
-       # Ctrl, Alt, Shift, Mod3(Meta)
+       # Ctrl, Alt, Shift, Mod4(Super/Windows/Hyper)
        #
        keybindings_dict['%PRIMARY%'] = 'Ctrl'
        keybindings_dict['%SECONDARY%'] = 'Alt'
        keybindings_dict['%TERTIARY%'] = 'Shift'
-       keybindings_dict['%LEVEL4%'] = 'Mod2'
-       keybindings_dict['%WINDOW%'] = 'Ctrl'
+       keybindings_dict['%LEVEL4%'] = env['WINDOWS_KEY']
+       keybindings_dict['%WINDOW%'] = 'Alt'
 
-ardourbindings = env.SubstInFile ('ardour.bindings', 'ardour.bindings.in', SUBST_DICT = keybindings_dict);
-ardoursaeDEbindings = env.SubstInFile ('ardour-sae-de.bindings', 'ardour-sae-de.bindings.in', SUBST_DICT = keybindings_dict);
-ardoursaeANSIbindings = env.SubstInFile ('ardour-sae-ansi.bindings', 'ardour-sae-ansi.bindings.in', SUBST_DICT = keybindings_dict);
+for b in [ 'SAE-de',  'SAE-us', 'mnemonic-us', 'ergonomic-us' ]:
+       target_file = b + '.bindings'
+       src_file = target_file + '.in'
+       Default (env.SubstInFile (target_file, src_file, SUBST_DICT = keybindings_dict))
 
 my_subst_dict['%INSTALL_PREFIX%'] = final_prefix
 my_subst_dict['%LIBDIR%'] = env['LIBDIR']
@@ -426,9 +448,6 @@ 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(ardoursaeDEbindings)
-Default(ardoursaeANSIbindings)
 Default(ardourdev)
 Default(ardoursh)
 Default(ardour_dark_theme)
@@ -461,16 +480,54 @@ env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), ardour_
 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour2_ui_default.conf'))
 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-sae.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-sae-ansi.bindings'))
-env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour-sae-de.bindings'))
+env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ergonomic-us.bindings'))
+env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'mnemonic-us.bindings'))
+env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'SAE-de.bindings'))
 # 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 ('version', gtkardour.VersionBuild(['version.cc','version.h'], []))
-               
+
+# This will install icons and MIME type as per freedesktop.org specs. #
+if env['FREEDESKTOP']:
+       desktop_icon_install_prefix = install_prefix + '/share/icons/hicolor'
+       # Install the desktop icons to the default locations #
+       env.Alias('install', env.InstallAs(os.path.join(desktop_icon_install_prefix, '16x16', 'apps', 'ardour2.png'), 'icons/ardour_icon_16px.png'))
+       env.Alias('install', env.InstallAs(os.path.join(desktop_icon_install_prefix, '22x22', 'apps', 'ardour2.png'), 'icons/ardour_icon_22px.png'))
+       env.Alias('install', env.InstallAs(os.path.join(desktop_icon_install_prefix, '32x32', 'apps', 'ardour2.png'), 'icons/ardour_icon_32px.png'))
+       env.Alias('install', env.InstallAs(os.path.join(desktop_icon_install_prefix, '48x48', 'apps', 'ardour2.png'), 'icons/ardour_icon_48px.png'))
+       # Install the mime type xml file and its icon #
+        env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'mime', 'packages'), 'ardour2.xml'))
+       env.Alias('install', env.InstallAs(os.path.join(desktop_icon_install_prefix, '16x16', 'mimetypes', 'application-x-ardour2.png'), 'icons/application-x-ardour_16px.png'))
+       env.Alias('install', env.InstallAs(os.path.join(desktop_icon_install_prefix, '22x22', 'mimetypes', 'application-x-ardour2.png'), 'icons/application-x-ardour_22px.png'))
+       env.Alias('install', env.InstallAs(os.path.join(desktop_icon_install_prefix, '32x32', 'mimetypes', 'application-x-ardour2.png'), 'icons/application-x-ardour_32px.png'))
+       env.Alias('install', env.InstallAs(os.path.join(desktop_icon_install_prefix, '48x48', 'mimetypes', 'application-x-ardour2.png'), 'icons/application-x-ardour_48px.png'))
+       env.Alias('install', env.Command (os.path.join(install_prefix, 'share', 'mime'), [], 'update-mime-database $TARGET'))
+       # Update the icon cache #
+       env.Alias('install', env.Command (desktop_icon_install_prefix, [], 'touch --no-create $TARGET'))
+       env.Alias('install', env.Command (desktop_icon_install_prefix, [], 'gtk-update-icon-cache $TARGET'))
+       # Make the ardour2.desktop file and install it #
+       env.Alias('install', env.Command ('ardour2.desktop', 'ardour2.desktop.in', 'cat $SOURCES  > $TARGET'))
+       env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'applications'), 'ardour2.desktop'))
+       env.Alias('install', env.Command (os.path.join(install_prefix, 'share', 'applications'), [], 'update-desktop-database $TARGET'))
+       # uninstall target.. needed to run  update-mime-database and update-desktop-database after removal. #`
+       remove_desktop_files = env.Command ('another_frobnicatory_decoy', [],
+                             [ Delete (install_prefix + '/share/mime/packages/ardour2.xml'),
+                              Delete (install_prefix + '/share/applications/ardour2.desktop'),
+                              Delete (desktop_icon_install_prefix + '/16x16/apps/ardour2.png'),
+                              Delete (desktop_icon_install_prefix + '/22x22/apps/ardour2.png'),
+                              Delete (desktop_icon_install_prefix + '/32x32/apps/ardour2.png'),
+                              Delete (desktop_icon_install_prefix + '/48x48/apps/ardour2.png'),
+                              Delete (desktop_icon_install_prefix + '/16x16/mimetypes/application-x-ardour2.png'),
+                              Delete (desktop_icon_install_prefix + '/22x22/mimetypes/application-x-ardour2.png'),
+                              Delete (desktop_icon_install_prefix + '/32x32/mimetypes/application-x-ardour2.png'),
+                              Delete (desktop_icon_install_prefix + '/48x48/mimetypes/application-x-ardour2.png'),
+                               Action ('update-mime-database ' + install_prefix + '/share/mime'),
+                               Action ('gtk-update-icon-cache ' + desktop_icon_install_prefix),
+                               Action ('update-desktop-database ' + install_prefix + '/share/applications')])
+       env.Alias('uninstall', remove_desktop_files)
+
 #dist
 env.Alias ('tarball', env.Distribute (env['DISTTREE'],
                                       [ 'SConscript',
@@ -480,11 +537,14 @@ env.Alias ('tarball', env.Distribute (env['DISTTREE'],
                                        'ardev', 'ardbg',
                                         'ardour2_ui_dark.rc.in', 'ardour2_ui_light.rc.in', 'splash.png',
                                         'ardour.menus', 'ardour-sae.menus', 
-                                       'ardour.bindings.in', 
-                                       'ardour-sae-ansi.bindings.in', 
-                                       'ardour-sae-de.bindings.in', 
+                                       'mnemonic-us.bindings.in', 
+                                       'ergonomic-us.bindings.in', 
+                                       'SAE-us.bindings.in', 
+                                       'SAE-de.bindings.in', 
                                        'ardour2_ui_default.conf',
-                                       'editor_xpms'
+                                       'editor_xpms',
+                                       'ardour2.xml',
+                                       'ardour2.desktop.in'
                                         ] +
                                       gtkardour_files +
                                      vst_files +
@@ -492,9 +552,11 @@ env.Alias ('tarball', env.Distribute (env['DISTTREE'],
                                      icon_files +
                                      skipped_files +
                                      audiounit_files + 
+                                     lv2_files +
                                      gtkosx_files +
                                      x11_files +
                                      fft_analysis_files +
+                                     freesound_files +
                                      glob.glob('po/*.po') + glob.glob('*.h')))
 
 # generate a prototype full-featured ardour_ui.rc file