Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
hru-delin-dev
hru-delin-qgis
Commits
3435b09f
Unverified
Commit
3435b09f
authored
Apr 23, 2020
by
Julien Veyssier
Browse files
small adjustments
Signed-off-by:
Julien Veyssier
<
eneiluj@posteo.net
>
parent
d043ebf1
Changes
4
Hide whitespace changes
Inline
Side-by-side
hrudelin.py
View file @
3435b09f
...
...
@@ -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'
,
...
...
hrudelinCore
@
26905975
Compare
69e355f0
...
26905975
Subproject commit 69
e355f0d8cbf11b9bbb8bb1ee0d67289dcd8b7d
Subproject commit
2
69
05975a8d7adfc2cbf00454428d03bc0599645
hrudelin_dockwidget.py
View file @
3435b09f
...
...
@@ -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
()
...
...
pluginUtils/tools.py
View file @
3435b09f
...
...
@@ -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
=
''
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment