Skip to content

Commit

Permalink
[processing] always use SAGA shipped with OSGeo4W
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed May 30, 2017
1 parent 962e2ca commit 75ee7da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
8 changes: 0 additions & 8 deletions python/plugins/processing/algs/saga/SagaAlgorithmProvider.py
Expand Up @@ -47,11 +47,6 @@ def __init__(self):
self.activate = True

def initializeSettings(self):
if (isWindows() or isMac()):
ProcessingConfig.addSetting(Setting("SAGA",
SagaUtils.SAGA_FOLDER, self.tr('SAGA folder'),
'',
valuetype=Setting.FOLDER))
ProcessingConfig.addSetting(Setting("SAGA",
SagaUtils.SAGA_IMPORT_EXPORT_OPTIMIZATION,
self.tr('Enable SAGA Import/Export optimizations'), False))
Expand All @@ -67,9 +62,6 @@ def initializeSettings(self):

def unload(self):
AlgorithmProvider.unload(self)
if (isWindows() or isMac()):
ProcessingConfig.removeSetting(SagaUtils.SAGA_FOLDER)

ProcessingConfig.removeSetting(SagaUtils.SAGA_LOG_CONSOLE)
ProcessingConfig.removeSetting(SagaUtils.SAGA_LOG_COMMANDS)

Expand Down
11 changes: 3 additions & 8 deletions python/plugins/processing/algs/saga/SagaUtils.py
Expand Up @@ -38,7 +38,6 @@

SAGA_LOG_COMMANDS = 'SAGA_LOG_COMMANDS'
SAGA_LOG_CONSOLE = 'SAGA_LOG_CONSOLE'
SAGA_FOLDER = 'SAGA_FOLDER'
SAGA_IMPORT_EXPORT_OPTIMIZATION = 'SAGA_IMPORT_EXPORT_OPTIMIZATION'

_installedVersion = None
Expand Down Expand Up @@ -82,14 +81,10 @@ def findSagaFolder():


def sagaPath():
folder = ProcessingConfig.getSetting(SAGA_FOLDER)
if folder and not os.path.isdir(folder):
folder = None
ProcessingLog.addToLog(ProcessingLog.LOG_WARNING,
'Specified SAGA folder does not exist. Will try to find built-in binaries.')
if folder is None or folder == '':
folder = findSagaFolder()
if not isWindows() and not isMac():
return ''

folder = findSagaFolder()
return folder or ''


Expand Down

0 comments on commit 75ee7da

Please sign in to comment.