gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: rev 43349 - in gump/trunk/python/gump: build model
Date Sat, 04 Sep 2004 19:11:16 GMT
Author: ajack
Date: Sat Sep  4 12:11:14 2004
New Revision: 43349

Modified:
   gump/trunk/python/gump/build/nant.py
   gump/trunk/python/gump/model/workspace.py
Log:
Allow <dotnet framework="mono-1.0.1" /> in the workspace.
Get's passed as -t:mono-1.0.1 to NAnt.

Modified: gump/trunk/python/gump/build/nant.py
==============================================================================
--- gump/trunk/python/gump/build/nant.py	(original)
+++ gump/trunk/python/gump/build/nant.py	Sat Sep  4 12:11:14 2004
@@ -119,16 +119,18 @@
         # Library Path
         libpath=languageHelper.getAssemblyPath(project)
         
-        # Launch with mono if available
-        exe=''
-        if not self.run.getEnvironment().noMono:
-            exe='mono '
-        exe+='NAnt.exe'
-   
         # Run java on apache NAnt...
-        cmd=Cmd(exe,'build_'+project.getModule().getName()+'_'+project.getName(),
+        cmd=Cmd('NAnt.exe','build_'+project.getModule().getName()+'_'+project.getName(),
             basedir,{'LIBPATH':libpath})
-            
+        
+        # Launch with specified framework (e.g. mono-1.0.1) if
+        # required.
+        workspace=self.run.getWorkspace()
+        if workspace.hasDotNetInformation():
+            dotnetInfo=workspace.getDotNetInformation()
+            if dotnetInfo.hasFramework():                
+                cmd.addParameter('-t:',dotnetInfo.getFramework(),'')
+   
         # These are workspace + project system properties
         cmd.addNamedParameters(sysproperties)
         

Modified: gump/trunk/python/gump/model/workspace.py
==============================================================================
--- gump/trunk/python/gump/model/workspace.py	(original)
+++ gump/trunk/python/gump/model/workspace.py	Sat Sep  4 12:11:14 2004
@@ -64,6 +64,32 @@
     def getUser(self): return self.user
     def getPasswd(self): return self.passwd
     def getDatabase(self): return self.database
+    
+class DotNetInformation(ModelObject):
+    def __init__(self,dom):    
+        ModelObject.__init__(self,dom)  
+        
+        # Some defaults...
+        self.framework=None
+        
+    def complete(self,workspace): 
+        if self.isComplete(): return
+        
+        # In case we care
+        self.workspace=workspace
+        
+        # Import DOM attributes into self as attributes
+        transferDomInfo(self.element, self, {})   
+        
+        self.setComplete()
+        
+    def hasFramework(self): 
+        if self.framework: return True
+        return False
+        
+    def getFramework(self):
+        return self.framework
+
         
 class Workspace(NamedModelObject, PropertyContainer, Statable, Resultable):
     """
@@ -99,10 +125,12 @@
         # Database Informaton
         self.dbInfo=None
 
+        # DotNet Informaton
+        self.dotnetInfo=None
+
         # Where the merged XML was put
         self.mergeFile=None
  
-        
     def getChildren(self):
         return self.getModules() 
     
@@ -217,6 +245,13 @@
     def getDatabaseInformation(self):
         return self.dbInfo
         
+    def hasDotNetInformation(self):
+        if self.dotnetInfo: return True
+        return False
+        
+    def getDotNetInformation(self):
+        return self.dotnetInfo
+        
     def isMultithreading(self):
         return self.hasUpdaters() or self.hasBuilders()
         
@@ -338,6 +373,10 @@
         if self.hasDomChild('database'):
             self.dbInfo=DatabaseInformation(self.getDomChild('database'))
             self.dbInfo.complete(self)
+                                                             
+        if self.hasDomChild('dotnet'):
+            self.dotnetInfo=DotNetInformation(self.getDomChild('dotnet'))
+            self.dotnetInfo.complete(self)
                                                              
         # Complete the properies
         self.completeProperties()

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Mime
View raw message