From a35e0f3607c6ad28c0bb95f5f8c6d8b330a95461 Mon Sep 17 00:00:00 2001 From: John Smith Date: Sun, 17 Mar 2024 17:49:35 +0800 Subject: [PATCH] =?UTF-8?q?GUI=E6=8F=92=E4=BB=B6=E6=89=93=E5=8C=85WebView2?= =?UTF-8?q?Loader.dll?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/native-ui/native-ui.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/native-ui/native-ui.spec b/plugins/native-ui/native-ui.spec index 489dcfe..62bf99a 100644 --- a/plugins/native-ui/native-ui.spec +++ b/plugins/native-ui/native-ui.spec @@ -26,6 +26,14 @@ DATAS = [ ('data/blivechat.ico', 'data'), ('log/.gitkeep', 'log'), ] +# 动态库 +BINARIES = [] +if sys.platform == 'win32': + import wx + + # https://docs.wxpython.org/wx.html2.WebView.html#phoenix-title-webview-backend-edge-msw + bin_path = os.path.join(os.path.dirname(wx.__file__), 'WebView2Loader.dll') + BINARIES.append((bin_path, '.')) block_cipher = None @@ -33,7 +41,7 @@ block_cipher = None a = Analysis( ['main.pyw'], pathex=PYTHONPATH, - binaries=[], + binaries=BINARIES, datas=DATAS, hiddenimports=[], hookspath=[],