浏览代码

introduce GRASS_WXVERSION variable

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@64151 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 年之前
父节点
当前提交
4316895d4f
共有 2 个文件被更改,包括 11 次插入2 次删除
  1. 1 1
      gui/wxpython/core/globalvar.py
  2. 10 1
      lib/init/variables.html

+ 1 - 1
gui/wxpython/core/globalvar.py

@@ -49,7 +49,7 @@ def CheckWxVersion(version):
 
     return True
 
-def CheckForWx(forceVersion = None):
+def CheckForWx(forceVersion = os.getenv('GRASS_WXVERSION', None)):
     """Try to import wx module and check its version
 
     :param forceVersion: force wxPython version, eg. '2.8'

+ 10 - 1
lib/init/variables.html

@@ -288,7 +288,16 @@ PERMANENT
     When set, the wxGUI will not check the wxPython version, as this
     function is incompatible with a bundled wxPython.  It is up to the
     packager to make sure that a compatible wxPython version is bundled.</dd>
-  
+
+  <dt>GRASS_WXVERSION</dt>
+  <dd>[wxGUI]<br>
+    
+    set to tell wxGUI which version of wxPython to use.<br>
+
+    When set, the wxGUI will select the given wxPython version. It's
+    useful when multiple versions of wxPython are installed and the
+    user wants to run wxGUI with non-default wxPython version.</dd>
+
   <dt>GRASS_XTERM</dt>
   <dd>[lib/init/grass-xterm-wrapper, lib/init/grass-xterm-mac]<br>
     set to any value (e.g. rxvt, aterm, gnome-terminal, konsole) to