Commit 3d66c493 authored by Rashad Kanavath's avatar Rashad Kanavath

use otbFolder to make wrapper script

parent 426456fb
......@@ -125,7 +125,7 @@ class OTBAlgorithmProvider(QgsProcessingProvider):
raise ValueError(self.tr("Cannot find '{}'. OTB will be disabled".format(os.path.join(v,'bin', otb_exe_file('otbApplicationLauncherCommandLine')))))
def write_otbcli_wrapper_script(self):
otb_folder = self.normalize_path(OTBUtils.appFolder())
otb_folder = self.normalize_path(OTBUtils.otbFolder())
otb_app_path_env = os.pathsep.join(self.otb_app_dir_list(OTBUtils.appFolder()))
gdal_data_dir = None
geotiff_csv_dir = None
......@@ -273,8 +273,9 @@ class OTBAlgorithmProvider(QgsProcessingProvider):
if os.path.exists(env_profile) and os.path.isfile(env_profile):
OTBUtils.OTB_CLI_FILE = os.path.join(QgsApplication.qgisSettingsDirPath(), 'processing', 'qgis_otb_cli' + cli_ext)
if not os.path.exists(OTBUtils.OTB_CLI_FILE):
self.write_otbcli_wrapper_script()
#if not os.path.exists(OTBUtils.OTB_CLI_FILE):
#rewrite always for now..
self.write_otbcli_wrapper_script()
else:
OTBUtils.OTB_CLI_FILE = os.path.join(folder, 'bin', 'otbcli' + cli_ext)
......
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