From def8715ead09680987f19c9ac11afb34122eeea1 Mon Sep 17 00:00:00 2001 From: Boadi Samson Date: Wed, 5 Jul 2023 04:18:19 +0200 Subject: [PATCH] Updated StreetSmart to check for Cefpython3 installation Updated StreetSmart to check for Cefpython3 installation before displaying the dialog to copy the needed DLLS, so that ones Cefpython3 is installed in the app directory it could persist for all Qgis installations, no need to copy any specifc DLLS, if not any new Qgis installation will require its own DLL copy which is not necessary --- street_smart.py | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/street_smart.py b/street_smart.py index 7d0f11e..a7fb3e1 100644 --- a/street_smart.py +++ b/street_smart.py @@ -234,26 +234,27 @@ def __init__(self, iface, streetsmart): #TODO refactor checks if the required DLLS are available if not copies them from the Bin dir to the DLLS dir - if not check_DLLS()[0]: - files = ['libssl-1_1-x64.dll', 'libcrypto-1_1-x64.dll'] - checkbox_dialog = CheckboxDialog(files) - result = checkbox_dialog.exec_() - # Get the selected files if the OK button is clicked - print("returned files",check_DLLS()[1]) - - if result == QDialog.Accepted: - #selected_files = checkbox_dialog.selected_files - print("Selected files:", files) - for files in files: - print(files) - copy_missen_DLLS(os.path.join(return_Qgis_bin_path(check_DLLS()[1]),files),os.path.join(check_DLLS()[1],files)) - else: - print("Dialog canceled") - - - #TODO check if Cefpython3 is not installed and install it if not check_Cefpython_installation(): - install_cefpython3() + if not check_DLLS()[0]: + files = ['libssl-1_1-x64.dll', 'libcrypto-1_1-x64.dll'] + checkbox_dialog = CheckboxDialog(files) + result = checkbox_dialog.exec_() + # Get the selected files if the OK button is clicked + print("returned files",check_DLLS()[1]) + + if result == QDialog.Accepted: + #selected_files = checkbox_dialog.selected_files + print("Selected files:", files) + for files in files: + print(files) + copy_missen_DLLS(os.path.join(return_Qgis_bin_path(check_DLLS()[1]),files),os.path.join(check_DLLS()[1],files)) + else: + print("Dialog canceled") + + + #TODO check if Cefpython3 is not installed and install it + if not check_Cefpython_installation(): + install_cefpython3()