Browse Source

wxGUI: OnSystemInfo - print also info about OSGeo4W

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@53465 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 years ago
parent
commit
ee61c2fa7f
1 changed files with 10 additions and 2 deletions
  1. 10 2
      gui/wxpython/lmgr/frame.py

+ 10 - 2
gui/wxpython/lmgr/frame.py

@@ -813,6 +813,7 @@ class GMFrame(wx.Frame):
         """!Print system information"""
         vInfo = grass.version()
         
+        # GDAL/OGR
         try:
             from osgeo import gdal
             gdalVersion = gdal.__version__
@@ -821,10 +822,17 @@ class GMFrame(wx.Frame):
                 gdalVersion = grass.Popen(['gdalinfo', '--version'], stdout = grass.PIPE).communicate()[0].rstrip('\n')
             except:
                 gdalVersion = _("unknown")
+        # PROJ4
         try:
             projVersion = RunCommand('proj', getErrorMsg = True)[1].splitlines()[0]
         except:
             projVersion = _("unknown")
+        # check also OSGeo4W on MS Windows
+        if sys.platform == 'win32' and \
+                os.path.exists(os.path.join(os.getenv("GISBASE"), "WinGRASS-README.url")):
+            osgeo4w = ' (OSGeo4W)'
+        else:
+            osgeo4w = ''
         
         self.goutput.WriteCmdLog(_("System Info"))
         self.goutput.WriteLog("%s: %s\n"
@@ -834,13 +842,13 @@ class GMFrame(wx.Frame):
                               "PROJ4: %s\n"
                               "Python: %s\n"
                               "wxPython: %s\n"
-                              "%s: %s\n"% (_("GRASS version"), vInfo['version'],
+                              "%s: %s%s\n"% (_("GRASS version"), vInfo['version'],
                                            _("GRASS SVN Revision"), vInfo['revision'],
                                            _("GIS Library Revision"), vInfo['libgis_revision'], vInfo['libgis_date'].split(' ', 1)[0],
                                            gdalVersion, projVersion,
                                            platform.python_version(),
                                            wx.__version__,
-                                           _("Platform"), platform.platform()),
+                                           _("Platform"), platform.platform(), osgeo4w),
                               switchPage = True)
         self.goutput.WriteCmdLog(' ')