From cddbbc5001b7db861b0c1a37ec1df0afbcb1b984 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 13 Oct 2020 14:13:40 -0700 Subject: [PATCH] Modify the PATH, if needed, to allow the MS Edge Loader DLL to be found --- etg/webview.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/etg/webview.py b/etg/webview.py index a2033024..d816a3c0 100644 --- a/etg/webview.py +++ b/etg/webview.py @@ -72,6 +72,18 @@ def run(): #endif """) + module.addPyCode(order=15, code="""\ + # On Windows we need to ensure that the wx pacakge folder is on on the + # PATH, so the MS Edge Loader DLLs can be found when they are dynamically + # loaded. + import os + if os.name == 'nt': + _path = os.environ.get('PATH') + _pkg_path = os.path.abspath(os.path.dirname(wx.__file__)) + if _pkg_path.lower() not in _path.lower(): + os.environ['PATH'] = _path + os.pathsep + _pkg_path + """) + # Pull out the obj for wxWebViewIE so we can use it later, but not include it in the stubs wvie = module.find('wxWebViewIE') module.items.remove(wvie)