Skip to content

Commit 328000e

Browse files
committed
[processing] don't ask for MSYS folder for GRASS7 (fix #14431)
(cherry picked from commit 525194d)
1 parent 0bde357 commit 328000e

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

python/plugins/processing/algs/grass7/Grass7AlgorithmProvider.py

-5
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ def initializeSettings(self):
5252
self.getDescription(),
5353
Grass7Utils.GRASS_FOLDER, self.tr('GRASS7 folder'),
5454
Grass7Utils.grassPath(), valuetype=Setting.FOLDER))
55-
ProcessingConfig.addSetting(Setting(
56-
self.getDescription(),
57-
Grass7Utils.GRASS_WIN_SHELL, self.tr('Msys folder'),
58-
Grass7Utils.grassWinShell(), valuetype=Setting.FOLDER))
5955
ProcessingConfig.addSetting(Setting(
6056
self.getDescription(),
6157
Grass7Utils.GRASS_LOG_COMMANDS,
@@ -69,7 +65,6 @@ def unload(self):
6965
AlgorithmProvider.unload(self)
7066
if isWindows() or isMac():
7167
ProcessingConfig.removeSetting(Grass7Utils.GRASS_FOLDER)
72-
ProcessingConfig.removeSetting(Grass7Utils.GRASS_WIN_SHELL)
7368
ProcessingConfig.removeSetting(Grass7Utils.GRASS_LOG_COMMANDS)
7469
ProcessingConfig.removeSetting(Grass7Utils.GRASS_LOG_CONSOLE)
7570

python/plugins/processing/algs/grass7/Grass7Utils.py

-15
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ class Grass7Utils:
4545
GRASS_REGION_YMAX = 'GRASS7_REGION_YMAX'
4646
GRASS_REGION_CELLSIZE = 'GRASS7_REGION_CELLSIZE'
4747
GRASS_FOLDER = 'GRASS7_FOLDER'
48-
GRASS_WIN_SHELL = 'GRASS7_WIN_SHELL'
4948
GRASS_LOG_COMMANDS = 'GRASS7_LOG_COMMANDS'
5049
GRASS_LOG_CONSOLE = 'GRASS7_LOG_CONSOLE'
5150

@@ -103,24 +102,13 @@ def grassPath():
103102

104103
return folder
105104

106-
@staticmethod
107-
def grassWinShell():
108-
folder = ProcessingConfig.getSetting(Grass7Utils.GRASS_WIN_SHELL)
109-
if not os.path.exists(folder):
110-
folder = None
111-
if folder is None:
112-
folder = os.path.dirname(unicode(QgsApplication.prefixPath()))
113-
folder = os.path.join(folder, 'msys')
114-
return folder
115-
116105
@staticmethod
117106
def grassDescriptionPath():
118107
return os.path.join(os.path.dirname(__file__), 'description')
119108

120109
@staticmethod
121110
def createGrass7Script(commands):
122111
folder = Grass7Utils.grassPath()
123-
shell = Grass7Utils.grassWinShell()
124112

125113
script = Grass7Utils.grassScriptFilename()
126114
gisrc = userFolder() + os.sep + 'processing.gisrc7' # FIXME: use temporary file
@@ -139,9 +127,6 @@ def createGrass7Script(commands):
139127
output = open(script, 'w')
140128
output.write('set HOME=' + os.path.expanduser('~') + '\n')
141129
output.write('set GISRC=' + gisrc + '\n')
142-
output.write('set GRASS_SH=' + shell + '\\bin\\sh.exe\n')
143-
output.write('set PATH=' + shell + os.sep + 'bin;' + shell + os.sep
144-
+ 'lib;' + '%PATH%\n')
145130
output.write('set WINGISBASE=' + folder + '\n')
146131
output.write('set GISBASE=' + folder + '\n')
147132
output.write('set GRASS_PROJSHARE=' + folder + os.sep + 'share'

0 commit comments

Comments
 (0)