gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1679372 - /gump/live/python/gump/core/run/gumpenv.py
Date Thu, 14 May 2015 13:54:26 GMT
Author: bodewig
Date: Thu May 14 13:54:26 2015
New Revision: 1679372

URL: http://svn.apache.org/r1679372
Log:
check for msbuild/xbuild on startup

Modified:
    gump/live/python/gump/core/run/gumpenv.py

Modified: gump/live/python/gump/core/run/gumpenv.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/run/gumpenv.py?rev=1679372&r1=1679371&r2=1679372&view=diff
==============================================================================
--- gump/live/python/gump/core/run/gumpenv.py (original)
+++ gump/live/python/gump/core/run/gumpenv.py Thu May 14 13:54:26 2015
@@ -75,6 +75,8 @@ class GumpEnvironment(Annotatable, Worka
         self.noMono = False
         self.noNAnt = False
         self.nant_command = None
+        self.noMSBuild = False
+        self.msbuild_command = None
         self.noMaven = False
         self.noMaven2 = False
         self.noMaven3 = False
@@ -217,6 +219,7 @@ class GumpEnvironment(Annotatable, Worka
                                        cmd_env = {'M2_HOME' : self.m3_home})
 
         self._check_nant()
+        self._check_msbuild()
         self.noMono = self._checkWithDashVersion('mono', "no Mono runtime")
 
         self.noMake = self._checkWithDashVersion('make', "no make builds")
@@ -435,6 +438,26 @@ class GumpEnvironment(Annotatable, Worka
             return None
         return self.nant_command
 
+    def _check_msbuild(self):
+        if not self.checked:
+            if not self._checkWithDashVersion('MSBuild', "no MSBuild builds", '/help'):
+                if not self._checkWithDashVersion('MSBuild.exe', "no MSBUild builds", '/help'):
+                    self.noNAnt = self._checkWithDashVersion('xbuild',
+                                                             "no MSBuild builds",
+                                                             '/help')
+                    if self.noNAnt:
+                        self.nant_command = 'xbuild'
+                    else:
+                        self.nant_command = 'MSBuild.exe'
+                else:
+                    self.nant_command = 'MSBuild'
+
+    def get_msbuild_command(self):
+        self._check_msbuild()
+        if not self.noMSBuild:
+            return None
+        return self.msbuild_command
+
 if __name__ == '__main__':
     env = GumpEnvironment()
     env.checkEnvironment()



Mime
View raw message