[GRASS-SVN] r61714 - grass/trunk/gui/wxpython/core

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 22 06:08:07 PDT 2014


Author: martinl
Date: 2014-08-22 06:08:07 -0700 (Fri, 22 Aug 2014)
New Revision: 61714

Modified:
   grass/trunk/gui/wxpython/core/globalvar.py
Log:
winGRASS: fix addons scanning (python scripts have now bat wrapper)

Modified: grass/trunk/gui/wxpython/core/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/core/globalvar.py	2014-08-22 06:48:26 UTC (rev 61713)
+++ grass/trunk/gui/wxpython/core/globalvar.py	2014-08-22 13:08:07 UTC (rev 61714)
@@ -131,7 +131,7 @@
 
 if sys.platform == 'win32':
     BIN_EXT = '.exe'
-    SCT_EXT = '.py'
+    SCT_EXT = '.bat'
 else:
     BIN_EXT = SCT_EXT = ''
 
@@ -148,9 +148,10 @@
     addonPath = os.getenv('GRASS_ADDON_PATH', '')
     addonBase = os.getenv('GRASS_ADDON_BASE')
     if addonBase:
-        addonPath += os.pathsep + os.path.join(addonBase, 'bin') + os.pathsep + \
-            os.path.join(addonBase, 'scripts')
-
+        addonPath += os.pathsep + os.path.join(addonBase, 'bin')
+        if sys.platform != 'win32':
+            addonPath += os.pathsep + os.path.join(addonBase, 'scripts')
+    
     # remove commands first
     if eList:
         for ext in eList:
@@ -189,12 +190,12 @@
                     grassCmd.add(fname)
                     Debug.msg(3, "AddOn commands: %s", fname)
                     nCmd += 1
+    
+    Debug.msg(1, "Number of GRASS AddOn commands: %d", nCmd)
 
-    Debug.msg(1, "Number of new AddOn commands: %d", nCmd)
-
 """@brief Collected GRASS-relared binaries/scripts"""
 grassCmd, grassScripts = get_commands()
-Debug.msg(1, "Number of GRASS commands: %d", len(grassCmd))
+Debug.msg(1, "Number of core GRASS commands: %d", len(grassCmd))
 UpdateGRASSAddOnCommands()
 
 """@Toolbar icon size"""



More information about the grass-commit mailing list