浏览代码

attempt to fix g.manual on Windows (see also https://trac.osgeo.org/grass/changeset/65179)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65180 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 年之前
父节点
当前提交
64d26bb7ad
共有 4 个文件被更改,包括 5 次插入8 次删除
  1. 3 2
      lib/init/grass.py
  2. 0 2
      mswindows/env.bat
  3. 0 2
      mswindows/osgeo4w/env.bat.tmpl
  4. 2 2
      scripts/g.manual/g.manual.py

+ 3 - 2
lib/init/grass.py

@@ -478,8 +478,9 @@ def set_browser():
             browser = gfile('etc', "html_browser_mac.sh")
             os.environ['GRASS_HTML_BROWSER_MACOSX'] = "-b com.apple.helpviewer"
 
-        if windows or cygwin:
-            # MinGW startup moved to into init.bat
+        if windows:
+            browser = "start"
+        elif cygwin:
             browser = "explorer"
         else:
             # the usual suspects

+ 0 - 2
mswindows/env.bat

@@ -6,8 +6,6 @@ REM Default prompt: cmd.exe
 REM To enable bash prompt please uncomment the line bellow
 REM set GRASS_SH=%GISBASE%\msys\bin\sh.exe
 
-set GRASS_HTML_BROWSER=explorer
-
 set GRASS_PYTHON=%GISBASE%\extrabin\python.exe
 set PYTHONHOME=%GISBASE%\Python27
 

+ 0 - 2
mswindows/osgeo4w/env.bat.tmpl

@@ -7,8 +7,6 @@ REM Default prompt: cmd.exe
 REM To enable bash prompt please uncomment the line bellow
 REM set GRASS_SH=%OSGEO4W_ROOT%\apps\msys\bin\sh.exe
 
-set GRASS_HTML_BROWSER=explorer
-
 set GRASS_PYTHON=%OSGEO4W_ROOT%\bin\python.exe
 set PYTHONHOME=%OSGEO4W_ROOT%\apps\Python27
 

+ 2 - 2
scripts/g.manual/g.manual.py

@@ -56,7 +56,7 @@ from grass.script import core as grass
 
 def start_browser(entry):
     if browser and \
-       browser not in ('xdg-open', 'explorer') and \
+       browser not in ('xdg-open', 'start') and \
        not grass.find_program(browser):
         grass.fatal(_("Browser '%s' not found") % browser)
 
@@ -75,7 +75,7 @@ def start_browser(entry):
     
         url_path = 'file://' + path
     
-    if browser:
+    if browser and browser not in ('xdg-open', 'start'):
         webbrowser.register(browser_name, None)
     
     grass.verbose(_("Starting browser '%(browser)s' for manual"