diff --git a/src/_build_windows.py b/src/_build_windows.py index c4ca9b1..a99ed19 100644 --- a/src/_build_windows.py +++ b/src/_build_windows.py @@ -9,39 +9,45 @@ if 'win32' not in sys.platform: exit() def clean(additional=None): - removethese = ['__pycache__','build','dist','*.spec'] - if additional: - removethese.append(additional) - for _object in removethese: - target=glob(os.path.join('.', _object)) - for _target in target: - try: - if os.path.isdir(_target): - shutil.rmtree(_target) - else: - os.remove(_target) - except: - print(f'Error deleting {_target}.') + removethese = ['__pycache__','build','dist','*.spec'] + if additional: + removethese.append(additional) + for _object in removethese: + target=glob(os.path.join('.', _object)) + for _target in target: + try: + if os.path.isdir(_target): + shutil.rmtree(_target) + else: + os.remove(_target) + except: + print(f'Error deleting {_target}.') THIS_VERSION = None try: - mainfile = open('duckypad_config.py') - for line in mainfile: - if "THIS_VERSION_NUMBER =" in line: - THIS_VERSION = line.replace('\n', '').replace('\r', '').split("'")[-2] - mainfile.close() + mainfile = open('duckypad_config.py') + for line in mainfile: + if "THIS_VERSION_NUMBER =" in line: + THIS_VERSION = line.replace('\n', '').replace('\r', '').split("'")[-2] + mainfile.close() except Exception as e: - print('build_windows exception:', e) - exit() + print('build_windows exception:', e) + exit() if THIS_VERSION is None: - print('could not find version number!') - exit() + print('could not find version number!') + exit() # --noconsole clean(additional='duckypad*.zip') -PyInstaller.__main__.run(['duckypad_config.py','--icon=_icon.ico']) + +# Using --collect-all=certifi to automatically grab all certs and modules +PyInstaller.__main__.run([ + 'duckypad_config.py', + '--icon=_icon.ico', + '--collect-all=certifi' +]) output_folder_path = os.path.join('.', "dist") original_name = os.path.join(output_folder_path, "duckypad_config") diff --git a/src/duckypad_config.py b/src/duckypad_config.py index eac8edb..5281908 100644 --- a/src/duckypad_config.py +++ b/src/duckypad_config.py @@ -192,7 +192,7 @@ New HID command format Allows empty IF, WHILE, and FUN block allows '\' in DEFINEs chained boolops working - +fixed SSL certificate not found error """ THIS_VERSION_NUMBER = '4.0.2' diff --git a/src/duckypad_config_4.0.2_win10_x64.zip b/src/duckypad_config_4.0.2_win10_x64.zip new file mode 100644 index 0000000..2ec9cab Binary files /dev/null and b/src/duckypad_config_4.0.2_win10_x64.zip differ diff --git a/src/shared.py b/src/shared.py index 6ce691a..8f48256 100644 --- a/src/shared.py +++ b/src/shared.py @@ -1,5 +1,7 @@ import os import shutil +import certifi +os.environ["SSL_CERT_FILE"] = certifi.where() import webbrowser from platformdirs import * from pathlib import Path