Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt 6.2 版本在 deploy 打包无法显示 SVG 图标 #32

Closed
vooidzero opened this issue May 21, 2022 · 1 comment
Closed

Qt 6.2 版本在 deploy 打包无法显示 SVG 图标 #32

vooidzero opened this issue May 21, 2022 · 1 comment

Comments

@vooidzero
Copy link
Owner

之前把 Qt 升到了 6.2 版本,deploy 打包时发现 SVG 图标显示不出来(在 Qt Creator 中启动应用是没问题的),一番探索后发现是 iconengines/qsvgicon.dll 没被加载。我不知道 Qt 6.2 版本对此有什么改动或者说我的 build 配置出了什么问题,不知道 PATH 为 Qt 安装目录时是怎么确定加载 iconengines 的。试过配置文件 qt.confQCoreApplication::addLibraryPath,没用。

试出的解决方法是,创建一个名为 plugins 的文件夹将 iconengines 放入其中。为了整洁把 platforms, stylestls 也放了进去。新的打包文件结构如下:

B23Downloader.exe
plugins:
    iconengines: [qsvgicon.dll]
    platforms: [qwindows.dll]
    styles: [qwindowsvistastyle.dll]
    tls: [qcertonlybackend.dll, qopensslbackend.dll, qschannelbackend.dll]
libgcc_s_seh-1.dll
...
Qt6Core.dll
...
@vooidzero
Copy link
Owner Author

vooidzero commented May 21, 2022

  • Qt 6.2 版本开始在 plugins 中加入了 tls,在 Windows 平台上不再需要手动添加 openssh 库;从 deploy 的角度看,之前 openssh 的两个共享库文件 libcrypto 和 libssl 以及依赖的 msvcr100.dll (显示“网络请求错误”是怎么回事 #3) 总大小是 4 MB(zip 压缩后为 1.5 MB),而 plugins/tlsqcertonlybackend.dll, qopensslbackend.dll, qschannelbackend.dll 三个文件总大小是 670 KB(zip 压缩后为 260 KB)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant