hlwhl / webview_cef

WebView for Flutter Desktop Apps using CEF(Chromium Embedded Framework) [Work in Progress]
Apache License 2.0
176 stars 52 forks source link

构建失败 windows #35

Closed newer-android closed 1 year ago

newer-android commented 1 year ago

加入组件构建时提示 LINK : fatal error LNK1104: �޷����ļ���E:\Flutter2020\hd_smart_dsp_tf\windows\flutter\ephemeral.plugin_symlinks\webview_cef\windows\cefbins\debug\libcef.lib�� [E:\Flutter2020\hd_smart_dsp_tf\build\windows\plugins\webview_cef\webview_cef_plugin.vcxproj] Exception: Build process failed.,下载Demo和引入都是这哥错误

hlwhl commented 1 year ago

看下 \webview_cef\windows\cefbins\ 是否存在,在编译时cmake脚本会自动下载cef的二进制包。可以看下是否下载失败。

newer-android commented 1 year ago

E:\Flutter2020\webview_cef-main\windows\cefbins 这个文件夹是空的

newer-android commented 1 year ago

这是下载失败了吗?

newer-android commented 1 year ago

Flutter2020\webview_cef-main\example\windows\flutter\ephemeral.plugin_symlinks\webview_cef\windows\cefbins\这个没有这个文件夹 example底下的windows

hlwhl commented 1 year ago

这是下载失败了吗?

是的,下载失败了

hlwhl commented 1 year ago

这是下载失败了吗?

https://github.com/hlwhl/webview_cef/releases/download/prebuilt_cef_bin/webview_cef_bin_0.0.1_101.0.18+chromium-101.0.4951.67_windows64.zip 可以手动下载下,在release里

newer-android commented 1 year ago

好的 谢谢 我试试

newer-android commented 1 year ago

使用下载的Demo运行无问题,集成到项目里提示错误Could not load chrome_100_percent.pak、 Could not load chrome_200_percent.pak、Network service crashed, restarting service 会打开多个桌面

newer-android commented 1 year ago

alloy_main_delegate.cc(563)] Could not load chrome_200_percent.pak

newer-android commented 1 year ago

是需要配置什么信息吗

newer-android commented 1 year ago

一直弹空白的窗口,关闭就打开

hlwhl commented 1 year ago

chrome_200_percent.pak, 看错误是因为有一些resources文件没有复制到你打出来的exe旁边,能否对比下demo和你的app打包后产物文件的差异?

newer-android commented 1 year ago

加载全景文件,提示 ERROR: Adobe Flashplayer ir HTML5 Browser with WebGL or CSS3D support required!,我该如何设置以支持这些属性

Doflatango commented 1 year ago

chrome_200_percent.pak, 看错误是因为有一些resources文件没有复制到你打出来的exe旁边,能否对比下demo和你的app打包后产物文件的差异?

@hlwhl 请问 chrome_100_percent.pakchrome_200_percent.pak 这两个文件是从哪里来的?https://github.com/hlwhl/webview_cef/releases/download/prebuilt_cef_bin/webview_cef_bin_0.0.1_101.0.18+chromium-101.0.4951.67_windows64.zip 不包含这两个文件。

实际运行虽然会打印下面的警告信息,但是并不影响运行:

[1228/132236.172:ERROR:alloy_main_delegate.cc(554)] Could not load chrome_100_percent.pak [1228/132236.172:ERROR:alloy_main_delegate.cc(563)] Could not load chrome_200_percent.pak

hlwhl commented 1 year ago

chrome_200_percent.pak, 看错误是因为有一些resources文件没有复制到你打出来的exe旁边,能否对比下demo和你的app打包后产物文件的差异?

@hlwhl 请问 chrome_100_percent.pakchrome_200_percent.pak 这两个文件是从哪里来的?https://github.com/hlwhl/webview_cef/releases/download/prebuilt_cef_bin/webview_cef_bin_0.0.1_101.0.18+chromium-101.0.4951.67_windows64.zip 不包含这两个文件。

实际运行虽然会打印下面的警告信息,但是并不影响运行:

[1228/132236.172:ERROR:alloy_main_delegate.cc(554)] Could not load chrome_100_percent.pak [1228/132236.172:ERROR:alloy_main_delegate.cc(563)] Could not load chrome_200_percent.pak

@Doflatango 是cef附带的资源文件,应该与高DPI有关,测试时确实不是必要文件,因此没有放入预编译包中。

Doflatango commented 1 year ago

@Doflatango 是cef附带的资源文件,应该与高DPI有关,测试时确实不是必要文件,因此没有放入预编译包中。

@hlwhl 谢谢回答,这两个文件与其它资源文件比起来算是比较小,我认为还是可以放进去插件里面,以避免一些可能存在的不必要的问题。

hlwhl commented 1 year ago

@Doflatango 是cef附带的资源文件,应该与高DPI有关,测试时确实不是必要文件,因此没有放入预编译包中。

@hlwhl 谢谢回答,这两个文件与其它资源文件比起来算是比较小,我认为还是可以放进去插件里面,以避免一些可能存在的不必要的问题。

@Doflatango 嗯,下个版本升级cef时会带上这些文件

newer-android commented 1 year ago

加载3D全景提示 错误 ,这个如何设置可以做到支持

hlwhl commented 1 year ago

加载3D全景提示 错误 ,这个如何设置可以做到支持

image

@newer-android 你使用的哪个平台?我这里试打开你那个链接是没问题的

hlwhl commented 1 year ago

@newer-android CEF开启WEBGL支持 可以尝试下这个链接呢。在webview_app.h这个文件中设置。

newer-android commented 1 year ago

@ hlwhl windows11,修改了还不行 企业微信截图_16749751591916


 void OnBeforeCommandLineProcessing(
                                       const CefString& process_type,
                                       CefRefPtr<CefCommandLine> command_line) override {
                                           command_line->AppendSwitch("disable-gpu");
                                           command_line->AppendSwitch("disable-gpu-compositing");
                                           command_line->AppendSwitchWithValue("enable-webgl", "1");
                                           command_line->AppendSwitchWithValue("ignore-gpu-blacklist", "1");
                                           command_line->AppendSwitchWithValue("allow-file-access-from-files", "1");
                                           #ifdef __APPLE__
                                                command_line->AppendSwitch("use-mock-keychain");
                                                command_line->AppendSwitch("single-process");
                                           #endif
                                       }

// command_line->AppendSwitch("disable-gpu");
                                           //command_line->AppendSwitch("disable-gpu-compositing");
                                           command_line->AppendSwitchWithValue("enable-webgl", "1");
                                           command_line->AppendSwitchWithValue("ignore-gpu-blacklist", "1");
                                           command_line->AppendSwitchWithValue("allow-file-access-from-files", "1");
                                           #ifdef __APPLE__
                                                command_line->AppendSwitch("use-mock-keychain");
                                                command_line->AppendSwitch("single-process");
                                           #endif