altairwei / WizNotePlus

A community-driven cross-platform note-taking client.

Home Page:https://altairwei.github.io/WizNotePlus/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[enhancement] Windows预编译包缺失vcruntime等dll

notplus opened this issue · comments

Windows预编译包缺失msvcp140.dll vcruntime140_1.dll vcruntime140.dll

你的 Windows 什么版本?我日常在 Windows 10 上使用预编译的包,没有发现这个问题。

你的 Windows 什么版本?我日常在 Windows 10 上使用预编译的包,没有发现这个问题。

重装系统后的纯净Win10,没装 Microsoft Visual C++ Redistributable package 就会提示缺失动态库

参考这个:https://doc.qt.io/qt-5/windows-deployment.html

我印象中 windeployqt 会帮忙干这事儿来着?

加个 --compiler-runtime 选项应该就行了。

软件部署逻辑在这里:

deployqt = os.path.join(qt_bin, "windeployqt")

你有空试试?

The correct way to include the runtime libraries with your application is to ensure that they are installed on the end-user's system.

To install the runtime libraries on the end-user's system, you need to include the appropriate Visual C++ Redistributable Package (VCRedist) executable with your application and ensure that it is executed when the user installs your application.

They are named vcredist_x64.exe (64-bit) or vcredist_x86.exe (32-bit) and can be found in the folder /VC/redist/.

Alternatively, they can be downloaded from the web, for example vcredist_x64.exe for Visual Studio 2015.

Note: The application you ship must be compiled with exactly the same compiler version against the same C runtime version. This prevents deploying errors caused by different versions of the C runtime libraries.

from: https://doc.qt.io/qt-5/windows-deployment.html

看起来最好的方式还是提示用户下载,自行安装

如果只是提供64位的预编译包,也许可以直接从VS相关目录中拷贝一份?

如果只是提供64位的预编译包,也许可以直接从VS相关目录中拷贝一份?

-compiler-runtime 试过了吗?它拷贝过来的是 runtime 的 exe 安装程序还是 dll ?

如果只是提供64位的预编译包,也许可以直接从VS相关目录中拷贝一份?

-compiler-runtime 试过了吗?它拷贝过来的是 runtime 的 exe 安装程序还是 dll ?

试过了,这个选项其实是默认开启的。我提了个pr解决这个问题,可能实现的不是很好。

For Windows desktop applications, the required runtime files for the compiler are also copied to the deployable folder by default (unless the option --no-compiler-runtime is specified).

For Windows desktop applications, the required runtime files for the compiler are also copied to the deployable folder by default (unless the option --no-compiler-runtime is specified). In the case of release builds using Microsoft Visual C++, these consist of the Visual C++ Redistributable Packages, which are intended for recursive installation by the application's installer on the target machine. Otherwise, the shared libraries of the compiler runtime are used.

奇怪的是,为什么 WizNotePlus 使用 windeployqt 时没有把 Visual C++ Redistributable Packages 打包进来。我记得以前打包的时候能看见 vcredist_x64.exe

刚刚看了 WizNotePlus v2.8.0-beta.1 的预编译包,的确有包含 vc_redist.x64.exe