tasque r22 - in trunk: . src src/Backends src/Backends/IceCore
- From: btimothy svn gnome org
- To: svn-commits-list gnome org
- Subject: tasque r22 - in trunk: . src src/Backends src/Backends/IceCore
- Date: Fri, 14 Mar 2008 03:43:27 +0000 (GMT)
Author: btimothy
Date: Fri Mar 14 03:43:27 2008
New Revision: 22
URL: http://svn.gnome.org/viewvc/tasque?rev=22&view=rev
Log:
* src/Application.cs: Do better checking when checking for types in a
backend dll so Tasque doesn't crash when there are problems.
* src/Backends/IceCore/Makefile.am, src/Backends/Makefile.am,
src/Makefile.am: Modify the makefiles to build IceCore.Backend.dll
instead of packaging it directly inside Tasque.exe.
* configure.ac: Add src/Backends/Makefile and
src/Backends/IceCore/Makefile.
Added:
trunk/src/Backends/IceCore/Makefile.am
trunk/src/Backends/Makefile.am
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/src/Application.cs
trunk/src/Makefile.am
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Mar 14 03:43:27 2008
@@ -194,12 +194,19 @@
./RtmNet/Makefile
./src/Makefile
./src/tasque.pc
+./src/Backends/Makefile
+./src/Backends/IceCore/Makefile
./data/Makefile
./data/images/Makefile
./data/sounds/Makefile
./po/Makefile.in
])
+#./src/Backends/Dummy/Makefile
+#./src/Backends/EDS/Makefile
+#./src/Backends/Rtm/Makefile
+#./src/Backends/Sqlite/Makefile
+
AC_OUTPUT
echo "
Modified: trunk/src/Application.cs
==============================================================================
--- trunk/src/Application.cs (original)
+++ trunk/src/Application.cs Fri Mar 14 03:43:27 2008
@@ -256,11 +256,22 @@
{
List<IBackend> backends = new List<IBackend> ();
- foreach (Type type in asm.GetTypes ()) {
- if (type.IsClass == false)
+ Type[] types = null;
+
+ try {
+ types = asm.GetTypes ();
+ } catch (Exception e) {
+ Logger.Warn ("Exception reading types from assembly '{0}': {1}",
+ asm.ToString (), e.Message);
+ return backends;
+ }
+ foreach (Type type in types) {
+ if (type.IsClass == false) {
continue; // Skip non-class types
- if (type.GetInterface ("Tasque.Backends.IBackend") == null)
+ }
+ if (type.GetInterface ("Tasque.Backends.IBackend") == null) {
continue;
+ }
Logger.Debug ("Found Available Backend: {0}", type.ToString ());
IBackend availableBackend = null;
@@ -274,8 +285,9 @@
continue;
}
- if (availableBackend != null)
+ if (availableBackend != null) {
backends.Add (availableBackend);
+ }
}
return backends;
Added: trunk/src/Backends/IceCore/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/src/Backends/IceCore/Makefile.am Fri Mar 14 03:43:27 2008
@@ -0,0 +1,45 @@
+include $(top_srcdir)/Makefile.include
+
+CSFLAGS = \
+ -debug \
+ -define:DEBUG \
+ -target:library
+
+ASSMS = \
+ -r:$(top_builddir)/src/Tasque.exe \
+ $(GLIB_SHARP_20_LIBS) \
+ $(GNOME_SHARP_20_LIBS) \
+ $(GTK_DOTNET_20_LIBS) \
+ $(ICE_DESKTOP_LIBS) \
+ $(NDESK_DBUS_10_LIBS) \
+ $(NDESK_DBUS_GLIB_10_LIBS) \
+ -r:System \
+ -r:Mono.Posix
+ -r:System.xml
+
+BACKEND_NAME = IceCore.Backend
+CSFILES = \
+ IceBackend.cs \
+ IceCategory.cs \
+ IceNote.cs \
+ IceTask.cs
+
+if ENABLE_BACKEND_ICECORE
+TARGET = $(BACKEND_NAME).dll
+RESOURCES =
+
+$(TARGET): $(CSFILES) $(top_builddir)/src/Tasque.exe
+ $(CSC) -out:$@ $(CSFLAGS) $(ASSMS) $(CSFILES) $(RESOURCES)
+endif
+
+backendsdir = $(pkglibdir)
+backends_DATA = \
+ $(TARGET)
+
+EXTRA_DIST = \
+ $(CSFILES)
+
+CLEANFILES = \
+ $(TARGET).mdb \
+ $(TARGET)
+
Added: trunk/src/Backends/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/src/Backends/Makefile.am Fri Mar 14 03:43:27 2008
@@ -0,0 +1,7 @@
+SUBDIRS = \
+ IceCore
+
+# Dummy
+# EDS
+# Rtm
+# Sqlite
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Fri Mar 14 03:43:27 2008
@@ -1,3 +1,5 @@
+SUBDIRS = Backends
+
CSC = gmcs
TARGET = Tasque.exe
@@ -28,14 +30,6 @@
RTM_CSFILES =
endif
-if ENABLE_BACKEND_ICECORE
-ICECORE_CSFILES = \
- $(srcdir)/Backends/IceCore/*.cs
-else
-ICECORE_CSFILES =
-endif
-
-
if ENABLE_BACKEND_SQLITE
SQLITE_CSFILES = \
$(srcdir)/Backends/Sqlite/*.cs
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]