[longomatch] Add a new script to update makefiles and update them



commit 6bcb66d9227b5fea8d82c7ffe2520a97a195247c
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Mon Jul 7 19:31:09 2014 +0200

    Add a new script to update makefiles and update them

 LongoMatch.Addins/Makefile.am                   |    8 +-
 LongoMatch.Core/Interfaces/IProjectsImporter.cs |   30 +++
 LongoMatch.Core/Makefile.am                     |   79 +++++---
 LongoMatch.Drawing.Cairo/Makefile.am            |   20 ++
 LongoMatch.Drawing/Makefile.am                  |   35 ++++
 LongoMatch.GUI.Helpers/Makefile.am              |   13 ++
 LongoMatch.GUI.Multimedia/Makefile.am           |   19 +-
 LongoMatch.GUI/Makefile.am                      |  233 +++++++++++------------
 LongoMatch.Migration/Makefile.am                |   53 +++++
 LongoMatch.Multimedia/Makefile.am               |   13 +-
 LongoMatch.Plugins/Makefile.am                  |    5 +-
 LongoMatch.Services/Makefile.am                 |   11 +-
 LongoMatch/Makefile.am                          |    3 +-
 Makefile.am                                     |    4 +
 Tests/Makefile.am                               |    6 +
 build/build.environment.mk                      |   61 ++++++-
 configure.ac                                    |    6 +
 tools/mdptomakefile.py                          |   84 ++++++++
 18 files changed, 490 insertions(+), 193 deletions(-)
---
diff --git a/LongoMatch.Addins/Makefile.am b/LongoMatch.Addins/Makefile.am
index fd8dc84..0809ca1 100644
--- a/LongoMatch.Addins/Makefile.am
+++ b/LongoMatch.Addins/Makefile.am
@@ -3,13 +3,13 @@ TARGET = library
 
 LINK = $(REF_DEP_LONGOMATCH_ADDINS)
 
-SOURCES = \
-       AddinsManager.cs \
+SOURCES = AddinsManager.cs \
        ExtensionPoints/IConfigModifier.cs \
+       ExtensionPoints/IExportProject.cs \
        ExtensionPoints/IImportProject.cs \
-       ExtensionPoints/IExportProject.cs
+       ExtensionPoints/IMultimediaBackend.cs
 
-RESOURCES =
+RESOURCES = 
 
 include $(top_srcdir)/build/build.mk
 
diff --git a/LongoMatch.Core/Interfaces/IProjectsImporter.cs b/LongoMatch.Core/Interfaces/IProjectsImporter.cs
new file mode 100644
index 0000000..061a0c3
--- /dev/null
+++ b/LongoMatch.Core/Interfaces/IProjectsImporter.cs
@@ -0,0 +1,30 @@
+//
+//  Copyright (C) 2014 Andoni Morales Alastruey
+//
+//  This program is free software; you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation; either version 2 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using LongoMatch.Store;
+
+namespace LongoMatch.Interfaces
+{
+       public interface IProjectsImporter
+       {
+               void RegisterImporter (Func<string, Project> ImportFunction,
+                                      string filterName, string[] extensions,
+                                      bool needsEdition);
+       }
+}
+
diff --git a/LongoMatch.Core/Makefile.am b/LongoMatch.Core/Makefile.am
index c12c04c..d2e476c 100644
--- a/LongoMatch.Core/Makefile.am
+++ b/LongoMatch.Core/Makefile.am
@@ -3,85 +3,108 @@ TARGET = library
 
 LINK = $(REF_DEP_LONGOMATCH_CORE)
 
-SOURCES = \
+SOURCES = Common/Area.cs \
        Common/CaptureSettings.cs \
        Common/Cloner.cs \
        Common/Color.cs \
        Common/ConsoleCrayon.cs \
        Common/Constants.cs \
-       Common/Coordinates.cs \
        Common/Device.cs \
        Common/EncodingProfiles.cs \
-       Common/EncodingSettings.cs \
        Common/EncodingQuality.cs \
+       Common/EncodingSettings.cs \
        Common/Enums.cs \
+       Common/EventsBroker.cs \
        Common/Exceptions.cs \
+       Common/ExtensionMethods.cs \
        Common/Gettext.cs \
        Common/Image.cs \
        Common/Job.cs \
        Common/Log.cs \
        Common/PlayList.cs \
        Common/PlaysFilter.cs \
-       Common/SerializableObject.cs \
+       Common/Serializer.cs \
        Common/SysInfo.cs \
        Common/VideoStandards.cs \
        Config.cs \
+       Handlers/Drawing.cs \
        Handlers/Handlers.cs \
        Handlers/Multimedia.cs \
+       Interfaces/Drawing/ICanvas.cs \
+       Interfaces/Drawing/IDrawable.cs \
+       Interfaces/Drawing/IDrawingToolkit.cs \
+       Interfaces/Drawing/IWidget.cs \
+       Interfaces/GUI/IAnalysisWindow.cs \
        Interfaces/GUI/IBusyDialog.cs \
-       Interfaces/GUI/ICapturer.cs \
+       Interfaces/GUI/ICapturerBin.cs \
        Interfaces/GUI/IGUIToolkit.cs \
-       Interfaces/GUI/IMainWindow.cs \
-       Interfaces/GUI/IPlayer.cs \
+       Interfaces/GUI/IMainController.cs \
+       Interfaces/GUI/IPanel.cs \
+       Interfaces/GUI/IPlayerBin.cs \
        Interfaces/GUI/IPlaylistWidget.cs \
        Interfaces/GUI/IRenderingStateBar.cs \
-       Interfaces/Multimedia/IFramesCapturer.cs \
-       Interfaces/Multimedia/IMultimediaToolkit.cs \
-       Interfaces/Multimedia/IRemuxer.cs \
-       Interfaces/Multimedia/IVideoConverter.cs \
-       Interfaces/Multimedia/IVideoEditor.cs \
-       Interfaces/IDatabase.cs \
        Interfaces/IDataBaseManager.cs \
+       Interfaces/IDatabase.cs \
+       Interfaces/IIDObject.cs \
        Interfaces/IPlayList.cs \
+       Interfaces/IProjectsImporter.cs \
        Interfaces/IRenderingJobsManager.cs \
-       Interfaces/ISubCategory.cs \
-       Interfaces/ITag.cs \
        Interfaces/ITemplates.cs \
        Interfaces/ITemplatesService.cs \
        Interfaces/ITimelineNode.cs \
+       Interfaces/Multimedia/ICapturer.cs \
+       Interfaces/Multimedia/IFramesCapturer.cs \
+       Interfaces/Multimedia/IMultimediaToolkit.cs \
+       Interfaces/Multimedia/IPlayer.cs \
+       Interfaces/Multimedia/IRemuxer.cs \
+       Interfaces/Multimedia/IVideoConverter.cs \
+       Interfaces/Multimedia/IVideoEditor.cs \
        Stats/CategoryStats.cs \
-       Stats/GameUnitStats.cs \
-       Stats/GameUnitsStats.cs \
        Stats/PercentualStat.cs \
        Stats/PlayersStats.cs \
        Stats/ProjectStats.cs \
        Stats/Stat.cs \
        Stats/SubCategoryStat.cs \
        Store/Category.cs \
-       Store/Drawing.cs \
-       Store/GameUnit.cs \
-       Store/GameUnitsList.cs \
-       Store/TimelineNode.cs \
+       Store/Coordinates.cs \
+       Store/Drawables/Angle.cs \
+       Store/Drawables/Counter.cs \
+       Store/Drawables/Cross.cs \
+       Store/Drawables/Drawable.cs \
+       Store/Drawables/Ellipse.cs \
+       Store/Drawables/Line.cs \
+       Store/Drawables/MultiPoints.cs \
+       Store/Drawables/Quadrilateral.cs \
+       Store/Drawables/Rectangle.cs \
+       Store/Drawables/Selection.cs \
+       Store/Drawables/Text.cs \
+       Store/FrameDrawing.cs \
        Store/HotKey.cs \
        Store/MediaFile.cs \
+       Store/PenaltyCard.cs \
+       Store/PenaltyCardEvent.cs \
+       Store/Period.cs \
        Store/PixbufTimeNode.cs \
        Store/Play.cs \
-       Store/Player.cs \
        Store/PlayListPlay.cs \
+       Store/Player.cs \
+       Store/Point.cs \
        Store/Project.cs \
        Store/ProjectDescription.cs \
+       Store/Score.cs \
+       Store/ScoreEvent.cs \
        Store/SubCategory.cs \
        Store/Tag.cs \
        Store/TagStore.cs \
        Store/Templates/CategoriesTemplate.cs \
-       Store/Templates/SubCategoryTemplate.cs \
        Store/Templates/TeamTemplate.cs \
        Store/Time.cs \
-       Store/TimeNode.cs
+       Store/TimeNode.cs \
+       Store/TimelineNode.cs \
+       Store/Timer.cs
 
-RESOURCES = \
-       $(top_srcdir)/images/field_background.svg \
-       $(top_srcdir)/images/half_field_background.svg \
-       $(top_srcdir)/images/goal_background.svg
+RESOURCES = $(top_srcdir)/images/field_background.svg \
+       $(top_srcdir)/images/goal_background.svg \
+       $(top_srcdir)/images/half_field_background.svg
 
 include $(top_srcdir)/build/build.mk
diff --git a/LongoMatch.Drawing.Cairo/Makefile.am b/LongoMatch.Drawing.Cairo/Makefile.am
new file mode 100644
index 0000000..c293948
--- /dev/null
+++ b/LongoMatch.Drawing.Cairo/Makefile.am
@@ -0,0 +1,20 @@
+ASSEMBLY = LongoMatch.Drawing.Cairo
+TARGET = library
+
+LINK = $(REF_DEP_LONGOMATCH_DRAWING_CAIRO)
+
+SOURCES = CairoBackend.cs \
+       CairoContext.cs \
+       Surface.cs \
+       WidgetWrapper.cs
+
+RESOURCES = $(top_srcdir)/images/cursors/text \
+       $(top_srcdir)/images/cursors/rect \
+       $(top_srcdir)/images/cursors/number \
+       $(top_srcdir)/images/cursors/freehand \
+       $(top_srcdir)/images/cursors/ellipse \
+       $(top_srcdir)/images/cursors/arrow \
+       $(top_srcdir)/images/tools/draw-eraser.png \
+       $(top_srcdir)/images/tools/draw-cross.png
+
+include $(top_srcdir)/build/build.mk
diff --git a/LongoMatch.Drawing/Makefile.am b/LongoMatch.Drawing/Makefile.am
new file mode 100644
index 0000000..55c9d42
--- /dev/null
+++ b/LongoMatch.Drawing/Makefile.am
@@ -0,0 +1,35 @@
+
+ASSEMBLY = LongoMatch.Drawing
+TARGET = library
+
+LINK = $(REF_DEP_LONGOMATCH_DRAWING)
+
+SOURCES = Canvas.cs \
+       CanvasObject/CanvasObject.cs \
+       CanvasObject/CategoryLabel.cs \
+       CanvasObject/CounterObject.cs \
+       CanvasObject/CrossObject.cs \
+       CanvasObject/EllipseObject.cs \
+       CanvasObject/LineObject.cs \
+       CanvasObject/PlayObject.cs \
+       CanvasObject/PlayerObject.cs \
+       CanvasObject/PositionObject.cs \
+       CanvasObject/QuadrilateralObject.cs \
+       CanvasObject/RectangleObject.cs \
+       CanvasObject/TextObject.cs \
+       CanvasObject/TimeNodeObject.cs \
+       CanvasObject/TimelineObject.cs \
+       Constants.cs \
+       Utils.cs \
+       Widgets/Blackboard.cs \
+       Widgets/CategoriesLabels.cs \
+       Widgets/PlaysTimeline.cs \
+       Widgets/PositionTagger.cs \
+       Widgets/TeamTagger.cs \
+       Widgets/TimersTimeline.cs \
+       Widgets/Timerule.cs \
+       enums.cs
+
+RESOURCES = 
+
+include $(top_srcdir)/build/build.mk
diff --git a/LongoMatch.GUI.Helpers/Makefile.am b/LongoMatch.GUI.Helpers/Makefile.am
new file mode 100644
index 0000000..b2cb6d7
--- /dev/null
+++ b/LongoMatch.GUI.Helpers/Makefile.am
@@ -0,0 +1,13 @@
+
+ASSEMBLY = LongoMatch.GUI.Helpers
+TARGET = library
+
+LINK = $(REF_DEP_LONGOMATCH_GUI_HELPERS)
+
+SOURCES = FileChooserHelper.cs \
+       MessagesHelpers.cs \
+       Misc.cs
+
+RESOURCES =
+
+include $(top_srcdir)/build/build.mk
diff --git a/LongoMatch.GUI.Multimedia/Makefile.am b/LongoMatch.GUI.Multimedia/Makefile.am
index a8436ad..e55f83a 100644
--- a/LongoMatch.GUI.Multimedia/Makefile.am
+++ b/LongoMatch.GUI.Multimedia/Makefile.am
@@ -3,21 +3,20 @@ TARGET = library
 
 LINK = $(REF_DEP_LONGOMATCH_GUI_MULTIMEDIA)
 
-SOURCES = \
-       gtk-gui/generated.cs \
+SOURCES = Gui/CapturerBin.cs \
+       Gui/PlayerBin.cs \
+       Gui/PlayerCapturerBin.cs \
+       Gui/Utils/FramesCapturer.cs \
+       Gui/Utils/Remuxer.cs \
+       Gui/VolumeWindow.cs \
+       MultimediaToolkit.cs \
        gtk-gui/LongoMatch.Gui.CapturerBin.cs \
        gtk-gui/LongoMatch.Gui.PlayerBin.cs \
        gtk-gui/LongoMatch.Gui.PlayerCapturerBin.cs \
        gtk-gui/LongoMatch.Gui.VolumeWindow.cs \
-       Gui/CapturerBin.cs \
-       Gui/PlayerBin.cs \
-       Gui/PlayerCapturerBin.cs \
-       Gui/VolumeWindow.cs \
-       Gui/Utils/Remuxer.cs
+       gtk-gui/generated.cs
 
-RESOURCES = \
-       gtk-gui/objects.xml \
-       gtk-gui/gui.stetic
+RESOURCES = gtk-gui/gui.stetic
 
 include $(top_srcdir)/build/build.mk
 
diff --git a/LongoMatch.GUI/Makefile.am b/LongoMatch.GUI/Makefile.am
index 380bddb..9caeb44 100644
--- a/LongoMatch.GUI/Makefile.am
+++ b/LongoMatch.GUI/Makefile.am
@@ -3,103 +3,27 @@ TARGET = library
 
 LINK = $(REF_DEP_LONGOMATCH_GUI)
 
-SOURCES = \
-       gtk-gui/generated.cs \
-       gtk-gui/LongoMatch.Gui.Base.TemplatesEditorBase.cs \
-       gtk-gui/LongoMatch.Gui.Base.TimelineWidgetBase.cs \
-       gtk-gui/LongoMatch.Gui.Component.ButtonsWidget.cs \
-       gtk-gui/LongoMatch.Gui.Component.ButtonTagger.cs \
-       gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs \
-       gtk-gui/LongoMatch.Gui.Component.CoordinatesTagger.cs \
-       gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs \
-       gtk-gui/LongoMatch.Gui.Component.DrawingWidget.cs \
-       gtk-gui/LongoMatch.Gui.Component.GameUnitsEditor.cs \
-       gtk-gui/LongoMatch.Gui.Component.GameUnitsTagger.cs \
-       gtk-gui/LongoMatch.Gui.Component.GameUnitWidget.cs \
-       gtk-gui/LongoMatch.Gui.Component.GeneralPreferencesPanel.cs \
-       gtk-gui/LongoMatch.Gui.Component.LiveAnalysisPreferences.cs \
-       gtk-gui/LongoMatch.Gui.Component.NotesWidget.cs \
-       gtk-gui/LongoMatch.Gui.Component.PlayerProperties.cs \
-       gtk-gui/LongoMatch.Gui.Component.PlayersListTreeWidget.cs \
-       gtk-gui/LongoMatch.Gui.Component.PlayersTaggerWidget.cs \
-       gtk-gui/LongoMatch.Gui.Component.PlayersTagger.cs \
-       gtk-gui/LongoMatch.Gui.Component.PlaysSelectionWidget.cs \
-       gtk-gui/LongoMatch.Gui.Component.PlaysCoordinatesTagger.cs \
-       gtk-gui/LongoMatch.Gui.Component.PlayListWidget.cs \
-       gtk-gui/LongoMatch.Gui.Component.PlaysListTreeWidget.cs \
-       gtk-gui/LongoMatch.Gui.Component.ProjectDetailsWidget.cs \
-       gtk-gui/LongoMatch.Gui.Component.ProjectListWidget.cs \
-       gtk-gui/LongoMatch.Gui.Component.RenderingStateBar.cs \
-       gtk-gui/LongoMatch.Gui.Component.GameViewer.cs \
-       gtk-gui/LongoMatch.Gui.Component.Stats.CategoriesViewer.cs \
-       gtk-gui/LongoMatch.Gui.Component.Stats.CategoryViewer.cs \
-       gtk-gui/LongoMatch.Gui.Component.Stats.PlayerCategoriesViewer.cs \
-       gtk-gui/LongoMatch.Gui.Component.Stats.PlayerCategoryViewer.cs \
-       gtk-gui/LongoMatch.Gui.Component.Stats.PlayerSubcategoryViewer.cs \
-       gtk-gui/LongoMatch.Gui.Component.Stats.PlayersViewer.cs \
-       gtk-gui/LongoMatch.Gui.Component.Stats.Plotter.cs \
-       gtk-gui/LongoMatch.Gui.Component.Stats.SubCategoryViewer.cs \
-       gtk-gui/LongoMatch.Gui.Component.StringTaggerWidget.cs \
-       gtk-gui/LongoMatch.Gui.Component.TaggerWidget.cs \
-       gtk-gui/LongoMatch.Gui.Component.TeamTaggerWidget.cs \
-       gtk-gui/LongoMatch.Gui.Component.VideoPreferencesPanel.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.BusyDialog.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.DatabasesManager.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.EditPlayerDialog.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.PropertiesEditor.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.EndCaptureDialog.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.FramesCaptureProgressDialog.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.HotKeySelectorDialog.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.NewProjectDialog.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.OpenProjectDialog.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.ProjectsManager.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.RenderingJobsDialog.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.ShortcutsHelpDialog.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.SnapshotsDialog.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.StatsViewer.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.SubCategoryTagsEditor.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.TaggerDialog.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.TemplateEditorDialog.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.TemplatesManager.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.UpdateDialog.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.VideoConversionTool.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.VideoEditionProperties.cs \
-       gtk-gui/LongoMatch.Gui.Dialog.Win32CalendarDialog.cs \
-       gtk-gui/LongoMatch.Gui.MainWindow.cs \
-       gtk-gui/LongoMatch.Gui.Popup.CalendarPopup.cs \
-       gtk-gui/LongoMatch.Gui.Popup.TransparentDrawingArea.cs \
-       Gui/Base/TemplatesEditorBase.cs \
-       Gui/Base/TimelineWidgetBase.cs \
-       Gui/Base/TimeScaleBase.cs \
-       Gui/Component/ButtonsWidget.cs \
+SOURCES = Gui/Cairo.cs \
+       Gui/Component/AnalysisComponent.cs \
+       Gui/Component/AnalysisTemplateEditor.cs \
+       Gui/Component/BackgroundWidget.cs \
        Gui/Component/ButtonTagger.cs \
-       Gui/Component/CategoriesTemplateEditor.cs \
+       Gui/Component/ButtonsWidget.cs \
        Gui/Component/CategoryProperties.cs \
+       Gui/Component/CodingWidget.cs \
        Gui/Component/CoordinatesTagger.cs \
-       Gui/Component/DrawingToolBox.cs \
-       Gui/Component/DrawingWidget.cs \
-       Gui/Component/GameUnitsEditor.cs \
-       Gui/Component/GameUnitsTagger.cs \
-       Gui/Component/GameUnitTimeScale.cs \
-       Gui/Component/GameUnitsTimelineWidget.cs \
-       Gui/Component/GameUnitWidget.cs \
        Gui/Component/GeneralPreferencesPanel.cs \
        Gui/Component/LiveAnalysisPreferences.cs \
        Gui/Component/NotesWidget.cs \
-       Gui/Component/PlayerProperties.cs \
+       Gui/Component/PeriodsRecoder.cs \
+       Gui/Component/PlayListWidget.cs \
        Gui/Component/PlayersListTreeWidget.cs \
        Gui/Component/PlaysCoordinatesTagger.cs \
-       Gui/Component/PlaysSelectionWidget.cs \
-       Gui/Component/PlayersTaggerWidget.cs \
-       Gui/Component/PlayersTagger.cs \
-       Gui/Component/PlayListWidget.cs \
        Gui/Component/PlaysListTreeWidget.cs \
-       Gui/Component/ProjectDetailsWidget.cs \
+       Gui/Component/PlaysPositionViewer.cs \
+       Gui/Component/PlaysSelectionWidget.cs \
        Gui/Component/ProjectListWidget.cs \
+       Gui/Component/ProjectPeriods.cs \
        Gui/Component/RenderingStateBar.cs \
        Gui/Component/Stats/CategoriesViewer.cs \
        Gui/Component/Stats/CategoryViewer.cs \
@@ -111,72 +35,131 @@ SOURCES = \
        Gui/Component/Stats/PlayersViewer.cs \
        Gui/Component/Stats/Plotter.cs \
        Gui/Component/Stats/SubcategoryViewer.cs \
-       Gui/Component/StringTaggerWidget.cs \
-       Gui/Component/TaggerWidget.cs \
-       Gui/Component/TeamTaggerWidget.cs \
        Gui/Component/TeamTemplateEditor.cs \
-       Gui/Component/TimelineLabelsWidget.cs \
-       Gui/Component/TimeLineWidget.cs \
-       Gui/Component/TimeReferenceWidget.cs \
-       Gui/Component/TimeScale.cs \
+       Gui/Component/Timeline.cs \
        Gui/Component/VideoPreferencesPanel.cs \
        Gui/Dialog/About.cs \
        Gui/Dialog/BusyDialog.cs \
+       Gui/Dialog/CalendarDialog.cs \
        Gui/Dialog/DatabasesManager.cs \
        Gui/Dialog/DrawingTool.cs \
        Gui/Dialog/EditCategoryDialog.cs \
-       Gui/Dialog/EditPlayerDialog.cs \
        Gui/Dialog/EndCaptureDialog.cs \
        Gui/Dialog/EntryDialog.cs \
        Gui/Dialog/FramesCaptureProgressDialog.cs \
        Gui/Dialog/HotKeySelectorDialog.cs \
-       Gui/Dialog/NewProjectDialog.cs \
-       Gui/Dialog/OpenProjectDialog.cs \
-       Gui/Dialog/ProjectSelectionDialog.cs \
-       Gui/Dialog/ProjectsManager.cs \
-       Gui/Dialog/PropertiesEditor.cs \
        Gui/Dialog/RenderingJobsDialog.cs \
        Gui/Dialog/ShortcutsHelpDialog.cs \
        Gui/Dialog/SnapshotsDialog.cs \
        Gui/Dialog/StatsViewer.cs \
-       Gui/Dialog/SubCategoryTagsEditor.cs \
-       Gui/Dialog/TaggerDialog.cs \
-       Gui/Dialog/TemplateEditorDialog.cs \
-       Gui/Dialog/TemplatesManager.cs \
        Gui/Dialog/UpdateDialog.cs \
-       Gui/Dialog/VideoEditionProperties.cs \
        Gui/Dialog/VideoConversionTool.cs \
-       Gui/Dialog/Win32CalendarDialog.cs \
-       Gui/Helpers/FileChooserHelper.cs \
-       Gui/Helpers/MessagesHelpers.cs \
-       Gui/Helpers/Misc.cs \
-       Gui/Popup/CalendarPopup.cs \
+       Gui/Dialog/VideoEditionProperties.cs \
+       Gui/GUIToolkit.cs \
+       Gui/GtkGlue.cs \
+       Gui/MainWindow.cs \
+       Gui/Menu/PlaysMenu.cs \
+       Gui/Panel/NewProjectPanel.cs \
+       Gui/Panel/OpenProjectPanel.cs \
+       Gui/Panel/PreferencesPanel.cs \
+       Gui/Panel/ProjectsManagerPanel.cs \
+       Gui/Panel/SportsTemplatesPanel.cs \
+       Gui/Panel/TeamsTemplatesPanel.cs \
+       Gui/Panel/WelcomePanel.cs \
        Gui/TransparentDrawingArea.cs \
        Gui/TreeView/CategoriesFilterTreeView.cs \
        Gui/TreeView/CategoriesTreeView.cs \
        Gui/TreeView/FilterBaseView.cs \
        Gui/TreeView/ListTreeViewBase.cs \
-       Gui/TreeView/PlayersFilterTreeView.cs \
+       Gui/TreeView/PlayListTreeView.cs \
        Gui/TreeView/PlayerPropertiesTreeView.cs \
+       Gui/TreeView/PlayersFilterTreeView.cs \
        Gui/TreeView/PlayersTreeView.cs \
-       Gui/TreeView/PlayListTreeView.cs \
        Gui/TreeView/PlaysTreeView.cs \
        Gui/TreeView/RenderingJobsTreeView.cs \
        Gui/TreeView/SubCategoriesTreeView.cs \
-       Gui/Cairo.cs \
-       Gui/GUIToolkit.cs \
-       Gui/MainWindow.cs
+       gtk-gui/LongoMatch.Gui.Component.AnalysisComponent.cs \
+       gtk-gui/LongoMatch.Gui.Component.AnalysisTemplateEditor.cs \
+       gtk-gui/LongoMatch.Gui.Component.BackgroundWidget.cs \
+       gtk-gui/LongoMatch.Gui.Component.ButtonTagger.cs \
+       gtk-gui/LongoMatch.Gui.Component.ButtonsWidget.cs \
+       gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs \
+       gtk-gui/LongoMatch.Gui.Component.CodingWidget.cs \
+       gtk-gui/LongoMatch.Gui.Component.CoordinatesTagger.cs \
+       gtk-gui/LongoMatch.Gui.Component.GameViewer.cs \
+       gtk-gui/LongoMatch.Gui.Component.GeneralPreferencesPanel.cs \
+       gtk-gui/LongoMatch.Gui.Component.LiveAnalysisPreferences.cs \
+       gtk-gui/LongoMatch.Gui.Component.NotesWidget.cs \
+       gtk-gui/LongoMatch.Gui.Component.PeriodsRecoder.cs \
+       gtk-gui/LongoMatch.Gui.Component.PlayListWidget.cs \
+       gtk-gui/LongoMatch.Gui.Component.PlayersListTreeWidget.cs \
+       gtk-gui/LongoMatch.Gui.Component.PlaysCoordinatesTagger.cs \
+       gtk-gui/LongoMatch.Gui.Component.PlaysListTreeWidget.cs \
+       gtk-gui/LongoMatch.Gui.Component.PlaysPositionViewer.cs \
+       gtk-gui/LongoMatch.Gui.Component.PlaysSelectionWidget.cs \
+       gtk-gui/LongoMatch.Gui.Component.ProjectListWidget.cs \
+       gtk-gui/LongoMatch.Gui.Component.ProjectPeriods.cs \
+       gtk-gui/LongoMatch.Gui.Component.RenderingStateBar.cs \
+       gtk-gui/LongoMatch.Gui.Component.Stats.CategoriesViewer.cs \
+       gtk-gui/LongoMatch.Gui.Component.Stats.CategoryViewer.cs \
+       gtk-gui/LongoMatch.Gui.Component.Stats.PlayerCategoriesViewer.cs \
+       gtk-gui/LongoMatch.Gui.Component.Stats.PlayerCategoryViewer.cs \
+       gtk-gui/LongoMatch.Gui.Component.Stats.PlayerSubcategoryViewer.cs \
+       gtk-gui/LongoMatch.Gui.Component.Stats.PlayersViewer.cs \
+       gtk-gui/LongoMatch.Gui.Component.Stats.Plotter.cs \
+       gtk-gui/LongoMatch.Gui.Component.Stats.SubCategoryViewer.cs \
+       gtk-gui/LongoMatch.Gui.Component.TeamTemplateEditor.cs \
+       gtk-gui/LongoMatch.Gui.Component.Timeline.cs \
+       gtk-gui/LongoMatch.Gui.Component.VideoPreferencesPanel.cs \
+       gtk-gui/LongoMatch.Gui.Dialog.BusyDialog.cs \
+       gtk-gui/LongoMatch.Gui.Dialog.CalendarDialog.cs \
+       gtk-gui/LongoMatch.Gui.Dialog.DatabasesManager.cs \
+       gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs \
+       gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs \
+       gtk-gui/LongoMatch.Gui.Dialog.EndCaptureDialog.cs \
+       gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs \
+       gtk-gui/LongoMatch.Gui.Dialog.FramesCaptureProgressDialog.cs \
+       gtk-gui/LongoMatch.Gui.Dialog.HotKeySelectorDialog.cs \
+       gtk-gui/LongoMatch.Gui.Dialog.RenderingJobsDialog.cs \
+       gtk-gui/LongoMatch.Gui.Dialog.ShortcutsHelpDialog.cs \
+       gtk-gui/LongoMatch.Gui.Dialog.SnapshotsDialog.cs \
+       gtk-gui/LongoMatch.Gui.Dialog.StatsViewer.cs \
+       gtk-gui/LongoMatch.Gui.Dialog.UpdateDialog.cs \
+       gtk-gui/LongoMatch.Gui.Dialog.VideoConversionTool.cs \
+       gtk-gui/LongoMatch.Gui.Dialog.VideoEditionProperties.cs \
+       gtk-gui/LongoMatch.Gui.MainWindow.cs \
+       gtk-gui/LongoMatch.Gui.Panel.NewProjectPanel.cs \
+       gtk-gui/LongoMatch.Gui.Panel.OpenProjectPanel.cs \
+       gtk-gui/LongoMatch.Gui.Panel.PreferencesPanel.cs \
+       gtk-gui/LongoMatch.Gui.Panel.ProjectsManagerPanel.cs \
+       gtk-gui/LongoMatch.Gui.Panel.SportsTemplatesPanel.cs \
+       gtk-gui/LongoMatch.Gui.Panel.TeamsTemplatesPanel.cs \
+       gtk-gui/LongoMatch.Gui.Panel.WelcomePanel.cs \
+       gtk-gui/LongoMatch.Gui.Popup.TransparentDrawingArea.cs \
+       gtk-gui/generated.cs
 
-RESOURCES = \
-       $(top_srcdir)/images/logo.svg\
-       $(top_srcdir)/images/stock_draw-line-45.png\
-       $(top_srcdir)/images/stock_draw-circle-unfilled.png\
-       $(top_srcdir)/images/stock_draw-line-ends-with-arrow.png\
-       $(top_srcdir)/images/stock_draw-rectangle-unfilled.png\
-       $(top_srcdir)/images/stock_draw-freeform-line.png\
-       $(top_srcdir)/images/camera-video.png\
+RESOURCES = gtk-gui/gui.stetic \
+       $(top_srcdir)/images/logo.svg \
        $(top_srcdir)/images/video.png \
-       gtk-gui/objects.xml \
-       gtk-gui/gui.stetic
+       $(top_srcdir)/images/camera-video.png \
+       $(top_srcdir)/images/background.svg \
+       $(top_srcdir)/images/background.png \
+       $(top_srcdir)/images/tools/draw-arrow.png \
+       $(top_srcdir)/images/tools/draw-circle-unfilled.png \
+       $(top_srcdir)/images/tools/draw-cross.png \
+       $(top_srcdir)/images/tools/draw-ellipse.png \
+       $(top_srcdir)/images/tools/draw-eraser.png \
+       $(top_srcdir)/images/tools/draw-freehand.png \
+       $(top_srcdir)/images/tools/draw-number.png \
+       $(top_srcdir)/images/tools/draw-pointer.png \
+       $(top_srcdir)/images/tools/draw-rectangle.png \
+       $(top_srcdir)/images/tools/draw-rectangle-unfilled.png \
+       $(top_srcdir)/images/tools/draw-text.png \
+       $(top_srcdir)/images/tools/dash-line.svg \
+       $(top_srcdir)/images/tools/line.svg \
+       $(top_srcdir)/images/tools/line-double-dot.svg \
+       $(top_srcdir)/images/tools/line-dot.svg \
+       $(top_srcdir)/images/tools/line-double-arrow.svg \
+       $(top_srcdir)/images/tools/line-arrow.svg
 
 include $(top_srcdir)/build/build.mk
diff --git a/LongoMatch.Migration/Makefile.am b/LongoMatch.Migration/Makefile.am
new file mode 100644
index 0000000..617c0a1
--- /dev/null
+++ b/LongoMatch.Migration/Makefile.am
@@ -0,0 +1,53 @@
+ASSEMBLY = LongoMatch
+TARGET = winexe
+
+LINK = $(REF_DEP_LONGOMATCH_MIGRATION)
+
+SOURCES = Common/Color.cs \
+       Common/Config.cs \
+       Common/ConsoleCrayon.cs \
+       Common/Constants.cs \
+       Common/Enums.cs \
+       Common/Image.cs \
+       Common/Log.cs \
+       Common/SerializableObject.cs \
+       Converter.cs \
+       Core/Category.cs \
+       Core/Coordinates.cs \
+       Core/Drawing.cs \
+       Core/GameUnit.cs \
+       Core/GameUnitsList.cs \
+       Core/HotKey.cs \
+       Core/Interfaces/ISubCategory.cs \
+       Core/Interfaces/ITag.cs \
+       Core/Interfaces/ITemplates.cs \
+       Core/Interfaces/ITimelineNode.cs \
+       Core/MediaFile.cs \
+       Core/Period.cs \
+       Core/PixbufTimeNode.cs \
+       Core/Play.cs \
+       Core/PlayListPlay.cs \
+       Core/Player.cs \
+       Core/Point.cs \
+       Core/Project.cs \
+       Core/ProjectDescription.cs \
+       Core/SubCategory.cs \
+       Core/Tag.cs \
+       Core/TagStore.cs \
+       Core/Templates/CategoriesTemplate.cs \
+       Core/Templates/SubCategoryTemplate.cs \
+       Core/Templates/TeamTemplate.cs \
+       Core/Time.cs \
+       Core/TimeNode.cs \
+       Core/TimelineNode.cs \
+       Core/Timer.cs \
+       DataBase.cs \
+       MainWindow.cs \
+       Program.cs \
+       Properties/AssemblyInfo.cs \
+       gtk-gui/MainWindow.cs \
+       gtk-gui/generated.cs
+
+RESOURCES = gtk-gui/gui.stetic
+
+include $(top_srcdir)/build/build.mk
diff --git a/LongoMatch.Multimedia/Makefile.am b/LongoMatch.Multimedia/Makefile.am
index af4e30d..260786f 100644
--- a/LongoMatch.Multimedia/Makefile.am
+++ b/LongoMatch.Multimedia/Makefile.am
@@ -3,8 +3,7 @@ TARGET = library
 
 LINK = $(REF_DEP_LONGOMATCH_MULTIMEDIA)
 
-SOURCES = \
-       Capturer/FakeCapturer.cs \
+SOURCES = Capturer/FakeCapturer.cs \
        Capturer/GstCameraCapturer.cs \
        Capturer/LiveSourceTimer.cs \
        Capturer/ObjectManager.cs \
@@ -13,23 +12,21 @@ SOURCES = \
        Common/Handlers.cs \
        Converter/GstVideoConverter.cs \
        Converter/ObjectManager.cs \
-       Editor/VideoSegment.cs \
        Editor/GstVideoSplitter.cs \
-       Interfaces/ICapturer.cs \
-       Interfaces/IPlayer.cs \
+       Editor/VideoSegment.cs \
        Player/GstPlayer.cs \
        Player/ObjectManager.cs \
        Remuxer/GstRemuxer.cs \
        Remuxer/MpegRemuxer.cs \
        Remuxer/ObjectManager.cs \
-       Utils/FramesCapturer.cs \
        Utils/GStreamer.cs \
+       Utils/GtkHelpers.cs \
        Utils/IMetadataReader.cs \
+       Utils/MultimediaFactory.cs \
        Utils/PreviewMediaFile.cs \
        Utils/Seeker.cs \
        Utils/TimeString.cs \
-       Utils/VideoDevice.cs \
-       MultimediaFactory.cs
+       Utils/VideoDevice.cs
 
 DLLCONFIG = LongoMatch.Multimedia.dll.config
 
diff --git a/LongoMatch.Plugins/Makefile.am b/LongoMatch.Plugins/Makefile.am
index 6a4ed87..b6c712c 100644
--- a/LongoMatch.Plugins/Makefile.am
+++ b/LongoMatch.Plugins/Makefile.am
@@ -4,11 +4,10 @@ INSTALL_DIR = $(pkglibdir)/plugins
 
 LINK = $(REF_DEP_LONGOMATCH_PLUGINS)
 
-SOURCES = \
-       Assembly.cs \
+SOURCES = Assembly.cs \
        CSVExporter.cs
 
-RESOURCES =
+RESOURCES = 
 
 include $(top_srcdir)/build/build.mk
 
diff --git a/LongoMatch.Services/Makefile.am b/LongoMatch.Services/Makefile.am
index 48d46f2..baa02c4 100644
--- a/LongoMatch.Services/Makefile.am
+++ b/LongoMatch.Services/Makefile.am
@@ -3,18 +3,15 @@ TARGET = library
 
 LINK = $(REF_DEP_LONGOMATCH_SERVICES)
 
-SOURCES = \
-       Services/Core.cs \
-       Services/FileDB.cs \
+SOURCES = Services/Core.cs \
        Services/DataBaseManager.cs \
        Services/EventsManager.cs \
-       Services/GameUnitsManager.cs \
+       Services/FileDB.cs \
        Services/HotKeysManager.cs \
-       Services/MigrationsManager.cs \
        Services/PlaylistManager.cs \
        Services/ProjectsManager.cs \
-       Services/TemplatesService.cs \
        Services/RenderingJobsManager.cs \
-       Services/VideoDrawingsManager.cs
+       Services/TemplatesService.cs \
+       Services/ToolsManager.cs
 
 include $(top_srcdir)/build/build.mk
diff --git a/LongoMatch/Makefile.am b/LongoMatch/Makefile.am
index 914e043..43f35c7 100644
--- a/LongoMatch/Makefile.am
+++ b/LongoMatch/Makefile.am
@@ -2,8 +2,7 @@ ASSEMBLY = LongoMatchGtk
 TARGET = exe
 LINK = $(REF_DEP_LONGOMATCH)
 
-SOURCES = \
-       AssemblyInfo.cs \
+SOURCES = AssemblyInfo.cs \
        Main.cs
 
 IMAGES = $(top_srcdir)/images/logo.svg \
diff --git a/Makefile.am b/Makefile.am
index efd06ae..7fc5c89 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,11 +12,15 @@ SUBDIRS = \
        LongoMatch.Core \
        LongoMatch.Addins \
        LongoMatch.Multimedia \
+       LongoMatch.Drawing \
+       LongoMatch.Drawing.Cairo \
+       LongoMatch.GUI.Helpers \
        LongoMatch.GUI.Multimedia \
        LongoMatch.GUI \
        LongoMatch.Plugins \
        LongoMatch.Services \
        LongoMatch \
+       LongoMatch.Migration \
        po
 
 DISTCLEANFILES =       intltool-extract\
diff --git a/Tests/Makefile.am b/Tests/Makefile.am
new file mode 100644
index 0000000..89bbd00
--- /dev/null
+++ b/Tests/Makefile.am
@@ -0,0 +1,6 @@
+
+ASSEMBLY = Tests
+TARGET = Exe
+
+LINK = $(REF_DEP_LONGOMATCH_ADDINS)
+
diff --git a/build/build.environment.mk b/build/build.environment.mk
index 8cff4e8..e514684 100644
--- a/build/build.environment.mk
+++ b/build/build.environment.mk
@@ -17,12 +17,16 @@ LINK_GLIB = $(GLIBSHARP_LIBS)
 LINK_GTK = $(GTKSHARP_LIBS)
 LINK_GCONF = $(GCONFSHARP_LIBS)
 LINK_DB40 = $(DB4O_LIBS)
+LINK_JSON = $(JSON_LIBS)
 LINK_OSXYPLOT = -r:$(DIR_BIN)/OxyPlotMono.dll
 LINK_LONGOMATCH_ADDINS = -r:$(DIR_BIN)/LongoMatch.Addins.dll
 LINK_LONGOMATCH_CORE = -r:$(DIR_BIN)/LongoMatch.dll
 LINK_LONGOMATCH_MULTIMEDIA = -r:$(DIR_BIN)/LongoMatch.Multimedia.dll
 LINK_LONGOMATCH_GUI_MULTIMEDIA = -r:$(DIR_BIN)/LongoMatch.GUI.Multimedia.dll
 LINK_LONGOMATCH_GUI = -r:$(DIR_BIN)/LongoMatch.GUI.dll
+LINK_LONGOMATCH_GUI_HELPERS = -r:$(DIR_BIN)/LongoMatch.GUI.Helpers.dll
+LINK_LONGOMATCH_DRAWING = -r:$(DIR_BIN)/LongoMatch.Drawing.dll
+LINK_LONGOMATCH_DRAWING_CAIRO = -r:$(DIR_BIN)/LongoMatch.Drawing.Cairo.dll
 LINK_LONGOMATCH_SERVICES = -r:$(DIR_BIN)/LongoMatch.Services.dll
 
 
@@ -40,6 +44,7 @@ REF_DEP_LONGOMATCH_CORE = \
                      $(LINK_SYSTEM_DRAWING) \
                      $(LINK_MONO_POSIX) \
                      $(LINK_GLIB) \
+                     $(LINK_JSON) \
                      $(LINK_GTK)
 
 REF_DEP_LONGOMATCH_MULTIMEDIA = \
@@ -53,7 +58,20 @@ REF_DEP_LONGOMATCH_GUI_MULTIMEDIA = \
                      $(LINK_GLIB) \
                      $(LINK_GTK) \
                      $(LINK_LONGOMATCH_CORE) \
-                     $(LINK_LONGOMATCH_MULTIMEDIA)
+                     $(LINK_LONGOMATCH_MULTIMEDIA) \
+                     $(LINK_LONGOMATCH_GUI_HELPERS) \
+                     $(LINK_LONGOMATCH_DRAWING) \
+                     $(LINK_LONGOMATCH_DRAWING_CAIRO)
+
+REF_DEP_LONGOMATCH_GUI_HELPERS = \
+                     $(LINK_SYSTEM_DRAWING) \
+                     $(LINK_SYSTEM_CORE) \
+                     $(LINK_MONO_POSIX) \
+                     $(LINK_GLIB) \
+                     $(LINK_GTK) \
+                     $(LINK_ATK) \
+                     $(LINK_CAIRO) \
+                     $(LINK_LONGOMATCH_CORE)
 
 REF_DEP_LONGOMATCH_GUI = \
                      $(LINK_SYSTEM_DRAWING) \
@@ -64,8 +82,24 @@ REF_DEP_LONGOMATCH_GUI = \
                      $(LINK_LONGOMATCH_CORE) \
                      $(LINK_LONGOMATCH_MULTIMEDIA) \
                      $(LINK_LONGOMATCH_GUI_MULTIMEDIA) \
+                     $(LINK_LONGOMATCH_GUI_HELPERS) \
+                     $(LINK_LONGOMATCH_DRAWING) \
+                     $(LINK_LONGOMATCH_DRAWING_CAIRO) \
                      $(LINK_OSXYPLOT)
 
+REF_DEP_LONGOMATCH_DRAWING = \
+                     $(LINK_SYSTEM) \
+                     $(LINK_SYSTEM_CORE) \
+                     $(LINK_LONGOMATCH_CORE)
+
+REF_DEP_LONGOMATCH_DRAWING_CAIRO = \
+                     $(LINK_SYSTEM) \
+                     $(LINK_GTK) \
+                     $(LINK_ATK) \
+                     $(LINK_GDK) \
+                     $(LINK_CAIRO) \
+                     $(LINK_LONGOMATCH_CORE)
+
 REF_DEP_LONGOMATCH_SERVICES = \
                      $(LINK_MONO_POSIX) \
                      $(LINK_DB40) \
@@ -73,9 +107,8 @@ REF_DEP_LONGOMATCH_SERVICES = \
                      $(LINK_GTK) \
                      $(LINK_CAIRO) \
                      $(LINK_LONGOMATCH_CORE) \
-                     $(LINK_LONGOMATCH_MULTIMEDIA) \
-                     $(LINK_LONGOMATCH_GUI) \
-                     $(LINK_LONGOMATCH_GUI_MULTIMEDIA)
+                     $(LINK_LONGOMATCH_ADDINS) \
+                     $(LINK_LONGOMATCH_DRAWING)
 
 REF_DEP_LONGOMATCH = \
                      $(LINK_MONO_POSIX) \
@@ -83,9 +116,25 @@ REF_DEP_LONGOMATCH = \
                      $(LINK_GTK) \
                      $(LINK_LONGOMATCH_ADDINS) \
                      $(LINK_LONGOMATCH_CORE) \
+                     $(LINK_LONGOMATCH_DRAWING_CAIRO) \
+                     $(LINK_LONGOMATCH_GUI) \
+                     $(LINK_LONGOMATCH_GUI_HELPERS) \
+                     $(LINK_LONGOMATCH_GUI_MULTIMEDIA) \
                      $(LINK_LONGOMATCH_MULTIMEDIA) \
-                     $(LINK_LONGOMATCH_SERVICES) \
-                     $(LINK_LONGOMATCH_GUI)
+                     $(LINK_LONGOMATCH_SERVICES)
+
+REF_DEP_LONGOMATCH_MIGRATION = \
+                     $(LINK_SYSTEM) \
+                     $(LINK_SYSTEM_CORE) \
+                     $(LINK_SYSTEM_DRAWING) \
+                     $(LINK_DB4O) \
+                     $(LINK_MONO_POSIX) \
+                     $(LINK_GLIB) \
+                     $(LINK_GTK) \
+                     $(LINK_ATK) \
+                     $(LINK_GDK) \
+                     $(LINK_DB40) \
+                     $(LINK_JSON)
 
 REF_DEP_OXYPLOT = \
                      $(LINK_SYSTEM) \
diff --git a/configure.ac b/configure.ac
index ec44b05..78a5bbe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,6 +72,8 @@ PKG_CHECK_MODULES([GLIBSHARP], [glib-sharp-2.0])
 AC_SUBST(GLIBSHARP_LIBS)
 PKG_CHECK_MODULES([GTKSHARP], [gtk-sharp-2.0])
 AC_SUBST(GTKSHARP_LIBS)
+PKG_CHECK_MODULES([JSON], [newtonsoft-json])
+AC_SUBST(JSON_LIBS)
 PKG_CHECK_MODULES([DB4O], [db4o])
 AC_SUBST(DB4O_LIBS)
 PKG_CHECK_MODULES([MONO_ADDINS], [mono-addins])
@@ -126,8 +128,12 @@ oxyplot/Makefile
 
 LongoMatch.Addins/Makefile
 LongoMatch.Core/Makefile
+LongoMatch.Drawing/Makefile
+LongoMatch.Drawing.Cairo/Makefile
+LongoMatch.Migration/Makefile
 LongoMatch.Multimedia/Makefile
 LongoMatch.Multimedia/LongoMatch.Multimedia.dll.config
+LongoMatch.GUI.Helpers/Makefile
 LongoMatch.GUI.Multimedia/Makefile
 LongoMatch.GUI/Makefile
 LongoMatch.Plugins/Makefile
diff --git a/tools/mdptomakefile.py b/tools/mdptomakefile.py
new file mode 100644
index 0000000..983b615
--- /dev/null
+++ b/tools/mdptomakefile.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python
+import sys
+import os
+import re
+
+TEMPLATE = '''
+ASSEMBLY = %s
+TARGET = %s
+
+LINK = $(REF_DEP_LONGOMATCH_ADDINS)
+
+SOURCES = %s
+
+RESOURCES = %s
+
+include $(top_srcdir)/build/build.mk
+'''
+
+def mdptoam(mdp):
+    with open (mdp) as f:
+        l = f.read()
+        try:
+            assembly = re.findall('assembly="([^"]*)"', l)[0]
+        except:
+            assembly = ""
+        try:
+            target = re.findall('target="([^"]*)"', l)[0].lower()
+        except:
+            assembly = "library"
+        try:
+            files = re.findall('subtype="Code" buildaction="Compile" name="([^"]*)"', l)
+        except:
+            files = []
+        try:
+            resources = re.findall('subtype="Code" buildaction="EmbedAsResource" name="([^"]*)"', l)
+            resources = [x.replace("../", "$(top_srcdir)/") for x in resources]
+        except:
+            resources = []
+    files.sort()
+    am = os.path.join(mdp.rsplit('/', 1)[0], 'Makefile.am')
+    if not os.path.exists(am):
+        with open (am, "w+") as f:
+            f.write (TEMPLATE % (assembly, target,
+                " \\\n\t".join(files),
+                " \\\n\t".join(resources)))
+    else:
+        f = open(am)
+        fr = f.readlines()
+        f.close()
+        insources = False
+        inresources = False
+        with open (am, "w+") as f:
+            for l in fr:
+                if l.startswith("SOURCES"):
+                    insources = True
+                if l.startswith("RESOURCES"):
+                    inresources = True
+                if insources and l == '\n':
+                    insources = False
+                    f.write ("SOURCES = %s" % (" \\\n\t".join(files)))
+                    f.write ("\n")
+                if inresources and l == '\n':
+                    inresources = False
+                    f.write ("RESOURCES = %s" % (" \\\n\t".join(resources)))
+                    f.write ("\n")
+                if not insources and not inresources:
+                    f.write(l)
+
+def main():
+    mdps = []
+    p = sys.argv[1]
+    for d in os.listdir(p):
+        if not os.path.isdir(d):
+            continue
+        for f in os.listdir(os.path.join(p, d)):
+            if not f.endswith(".mdp"):
+                continue
+            mdps.append(os.path.join(d, f))
+    for mdp in mdps:
+        print "Updating " + mdp
+        mdptoam(mdp)
+
+if __name__ == "__main__":
+    main()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]