Unverified Commit 3435b09f authored by Julien Veyssier's avatar Julien Veyssier
Browse files

small adjustments


Signed-off-by: default avatarJulien Veyssier <eneiluj@posteo.net>
parent d043ebf1
......@@ -49,7 +49,7 @@ class HruDelin:
#locale = QSettings().value('locale/userLocale')[0:2]
# we now take the whole locale name to determine which file to load
locale = QSettings().value('locale/userLocale')
print('LOCALE %s'%locale)
#print('LOCALE %s'%locale)
locale_path = os.path.join(
self.plugin_dir,
'i18n',
......
Subproject commit 69e355f0d8cbf11b9bbb8bb1ee0d67289dcd8b7d
Subproject commit 26905975a8d7adfc2cbf00454428d03bc0599645
......@@ -505,15 +505,13 @@ class HruDelinDockWidget(QtWidgets.QDockWidget, FORM_CLASS):
# the goal is to chain with the rest of the run
def step1FinishedAuto(self):
self.step1Finished()
#self.doStep2(True, self.step2FinishedAuto)
self.doStep2(True, self.step2FinishedAuto)
# called when step2 ended during a full run
# it will chain with the rest of the run
def step2FinishedAuto(self):
self.step2Finished()
# launch all maps generation
#self.doStep3(False, self.step3FinishedAuto)
self.doStep3(False, self.step3FinishedAuto)
def step3FinishedAuto(self):
self.step3Finished()
......
......@@ -35,7 +35,6 @@ def split_list(alist, wanted_parts=1):
def prepareGrassEnv():
grassBasePath = None
# sys.path (to be able to import grass.script)
# find grass depending on the system
if isWindows():
for grassVersion in ['74', '75', '76', '77', '78', '79']:
......@@ -62,19 +61,22 @@ def prepareGrassEnv():
raise Exception('GRASS not found on your system')
return
print('found grass root %s' % grassBasePath)
print('found grass root => %s' % grassBasePath)
# sys.path (to be able to import grass.script)
grassPythonPath = os.path.join(grassBasePath, 'etc', 'python')
if grassPythonPath not in sys.path:
sys.path.append(grassPythonPath)
os.environ['GISBASE'] = grassBasePath
# PYTHON_PATH, just in case
existingPYTHONPATH = ''
if 'PYTHONPATH' in os.environ:
existingPYTHONPATH = os.environ['PYTHONPATH']
if grassPythonPath not in existingPYTHONPATH.split(os.pathsep):
os.environ['PYTHONPATH'] = '%s%s%s' % (existingPYTHONPATH, os.pathsep, grassPythonPath)
# mandatory LD_LIBRARY_PATH to allow grass binaries to load dynamic libraries
libPathToAdd = os.path.join(grassBasePath, 'lib')
existingLdLibraryPath = ''
if 'LD_LIBRARY_PATH' in os.environ:
......@@ -82,6 +84,7 @@ def prepareGrassEnv():
if libPathToAdd not in existingLdLibraryPath.split(os.pathsep):
os.environ['LD_LIBRARY_PATH'] = '%s%s%s' % (existingLdLibraryPath, os.pathsep, libPathToAdd)
# PATH is obviously needed
grassBinPath = os.path.join(grassBasePath, 'bin')
grassScriptPath = os.path.join(grassBasePath, 'scripts')
existingPath = ''
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment