[banshee] [Banshee.NotificationArea] Reconcile build setups



commit 34864bde414c35f8a872f04c83c766c59158e906
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Tue Mar 2 18:36:39 2010 -0800

    [Banshee.NotificationArea] Reconcile build setups
    
    Instead of conditionally including the Notification/*.cs files into the
    build, add #if statements into them, like we do to conditionally build
    unit tests.  Define that const (to enable them to be built) in the
    Windows csproj configuration.

 .../Banshee.NotificationArea.csproj                |    1 +
 .../Banshee.NotificationArea/Makefile.am           |   10 ++++------
 .../Notifications/Notification.cs                  |    4 ++++
 .../Notifications/Notifications.cs                 |    3 +++
 4 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea.csproj b/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea.csproj
index 0498c90..95c04e0 100644
--- a/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea.csproj
+++ b/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea.csproj
@@ -32,6 +32,7 @@
     <WarningLevel>4</WarningLevel>
     <Optimize>false</Optimize>
     <OutputPath>..\..\..\bin</OutputPath>
+    <DefineConstants>INTERNAL_NOTIFY_SHARP</DefineConstants>
   </PropertyGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\Core\Banshee.Core\Banshee.Core.csproj">
diff --git a/src/Extensions/Banshee.NotificationArea/Makefile.am b/src/Extensions/Banshee.NotificationArea/Makefile.am
index 39db29a..d948f01 100644
--- a/src/Extensions/Banshee.NotificationArea/Makefile.am
+++ b/src/Extensions/Banshee.NotificationArea/Makefile.am
@@ -1,9 +1,7 @@
-REAL_NOTIFY_SHARP_SOURCES = Notifications/Notifications.cs Notifications/Notification.cs
 if EXTERNAL_NOTIFY_SHARP
-NOTIFY_SHARP_SOURCES = 
 NOTIFY_SHARP_LIBS = $(NOTIFY_SHARP_LIBS)
 else
-NOTIFY_SHARP_SOURCES = $(REAL_NOTIFY_SHARP_SOURCES)
+GMCS_FLAGS="-define:INTERNAL_NOTIFY_SHARP"
 NOTIFY_SHARP_LIBS = 
 endif
 
@@ -18,9 +16,9 @@ SOURCES =  \
 	Banshee.NotificationArea/NotificationAreaService.cs \
 	Banshee.NotificationArea/TrackInfoPopup.cs \
 	Banshee.NotificationArea/X11NotificationArea.cs \
-	Banshee.NotificationArea/X11NotificationAreaBox.cs
-
-SOURCES += $(NOTIFY_SHARP_SOURCES)
+	Banshee.NotificationArea/X11NotificationAreaBox.cs \
+	Notifications/Notification.cs \
+	Notifications/Notifications.cs
 
 RESOURCES =  \
 	Banshee.NotificationArea.addin.xml \
diff --git a/src/Extensions/Banshee.NotificationArea/Notifications/Notification.cs b/src/Extensions/Banshee.NotificationArea/Notifications/Notification.cs
index 9f9d3b3..dea0a7f 100644
--- a/src/Extensions/Banshee.NotificationArea/Notifications/Notification.cs
+++ b/src/Extensions/Banshee.NotificationArea/Notifications/Notification.cs
@@ -20,6 +20,8 @@
  * THE SOFTWARE.
  */
 
+#if INTERNAL_NOTIFY_SHARP
+
 using System;
 using System.Reflection;
 using System.Collections.Generic;
@@ -382,3 +384,5 @@ namespace Notifications {
 		}
 	}
 }
+
+#endif
diff --git a/src/Extensions/Banshee.NotificationArea/Notifications/Notifications.cs b/src/Extensions/Banshee.NotificationArea/Notifications/Notifications.cs
index 7c7b042..b4404c6 100644
--- a/src/Extensions/Banshee.NotificationArea/Notifications/Notifications.cs
+++ b/src/Extensions/Banshee.NotificationArea/Notifications/Notifications.cs
@@ -20,6 +20,8 @@
  * THE SOFTWARE.
  */
 
+#if INTERNAL_NOTIFY_SHARP
+
 using System;
 using System.Collections.Generic;
 
@@ -93,3 +95,4 @@ namespace Notifications {
 	}
 }
 
+#endif



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