فهرست منبع

winGRASS: fix addons scanning (python scripts have now bat wrapper)
(merge https://trac.osgeo.org/grass/changeset/61714 from trunk)


git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@61870 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 10 سال پیش
والد
کامیت
0e8294f3f2
1فایلهای تغییر یافته به همراه8 افزوده شده و 7 حذف شده
  1. 8 7
      gui/wxpython/core/globalvar.py

+ 8 - 7
gui/wxpython/core/globalvar.py

@@ -131,7 +131,7 @@ else:
 
 
 if sys.platform == 'win32':
 if sys.platform == 'win32':
     BIN_EXT = '.exe'
     BIN_EXT = '.exe'
-    SCT_EXT = '.py'
+    SCT_EXT = '.bat'
 else:
 else:
     BIN_EXT = SCT_EXT = ''
     BIN_EXT = SCT_EXT = ''
 
 
@@ -148,9 +148,10 @@ def UpdateGRASSAddOnCommands(eList = None):
     addonPath = os.getenv('GRASS_ADDON_PATH', '')
     addonPath = os.getenv('GRASS_ADDON_PATH', '')
     addonBase = os.getenv('GRASS_ADDON_BASE')
     addonBase = os.getenv('GRASS_ADDON_BASE')
     if addonBase:
     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
     # remove commands first
     if eList:
     if eList:
         for ext in eList:
         for ext in eList:
@@ -189,12 +190,12 @@ def UpdateGRASSAddOnCommands(eList = None):
                     grassCmd.add(fname)
                     grassCmd.add(fname)
                     Debug.msg(3, "AddOn commands: %s", fname)
                     Debug.msg(3, "AddOn commands: %s", fname)
                     nCmd += 1
                     nCmd += 1
-
-    Debug.msg(1, "Number of new AddOn commands: %d", nCmd)
+    
+    Debug.msg(1, "Number of GRASS AddOn commands: %d", nCmd)
 
 
 """@brief Collected GRASS-relared binaries/scripts"""
 """@brief Collected GRASS-relared binaries/scripts"""
 grassCmd, grassScripts = get_commands()
 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()
 UpdateGRASSAddOnCommands()
 
 
 """@Toolbar icon size"""
 """@Toolbar icon size"""