follow-up prev: electrum-ecc should search for libsecp dll in electrum/
The hack needs to be applied before we try importing electrum_ecc, i.e. it needs to be in the main script. However, it should also be applied if the main script is not invoked directly, but e.g. the user imports electrum directly. Hence the duplication.
This commit is contained in:
@@ -6,7 +6,7 @@ is_bundle = getattr(sys, 'frozen', False)
|
||||
is_local = not is_bundle and os.path.exists(os.path.join(os.path.dirname(os.path.dirname(__file__)), "electrum.desktop"))
|
||||
|
||||
# when running from source, on Windows, also search for DLLs in inner 'electrum' folder
|
||||
if is_local and os.name == 'nt':
|
||||
if is_local and os.name == 'nt': # fixme: duplicated between main script and __init__.py :(
|
||||
os.add_dll_directory(os.path.dirname(__file__))
|
||||
|
||||
|
||||
|
||||
@@ -65,6 +65,11 @@ if is_pyinstaller:
|
||||
_file = open(sys.executable, 'rb')
|
||||
|
||||
|
||||
# when running from source, on Windows, also search for DLLs in inner 'electrum' folder
|
||||
if is_local and os.name == 'nt': # fixme: duplicated between main script and __init__.py :(
|
||||
os.add_dll_directory(os.path.join(os.path.dirname(__file__), 'electrum'))
|
||||
|
||||
|
||||
def check_imports():
|
||||
# pure-python dependencies need to be imported here for pyinstaller
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user