-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Make portable ZIP more portable by bundling MSVC DLLs #11497
Comments
Many more than that are needed, unfortunately. The WinRT dlls are also required. I believe those are loaded at runtime which is why they don't appear in the ldd report. |
If WinRT DLLs are loaded at runtime, I guess they are not needed until relevant functionality (Windows Hello?) is used. If so, bundling those 4 files can be a good start. I have been using portable ZIP + those 4 DLLs (copied manually from another PC) for several weeks. Basic functionalities are fine - entry operations, autotype, browser integration. I cannot setup Windows Hello on that machine for testing, though. |
No, they are loaded at startup. You can see what dependencies are actually attached/loaded by using a tool like Process Explorer. https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer |
Also, if you are using the legacywindows portable then WinRT is not a part of that build. |
Yeah, I see CryptoWinRT.dll in procexp. Looks like it's a built-in DLL in Windows, as install.wim in Windows 10 ISO contains that file, so maybe it's not needed to bundle them. On the other hand, MSVCP140.dll, MSVCP140_1.dll, VCRUNTIME140.dll, VCRUNTIME140_1.dll do not appear in Windows 10 ISO. I didn't find them on a freshly-installed Windows 10 VM, either. |
Summary
As shown in #10925, out-dated MSVC redistributable packages prevent KeePassXC from being started. In some cases, installing newer MSVC redist is not an option. How about bundling necessary DLLs in portable ZIP archives, so that KeePassXC can work out-of-box (almost) everywhere?
Examples
I believe bundling individual DLLs in portable ZIP is allowed by the license. Such an approach is mentioned on https://learn.microsoft.com/en-us/cpp/windows/redistributing-visual-cpp-files?view=msvc-170 (not recommended, though):
Technically, relevant DLLs can be copied from Visual Studio as per https://learn.microsoft.com/en-us/cpp/windows/determining-which-dlls-to-redistribute?view=msvc-170:
It seems 4 files are needed: MSVCP140.dll, MSVCP140_1.dll, VCRUNTIME140.dll, VCRUNTIME140_1.dll
ldd output for KeePassXC.exe
Context
I'd like to use KeePassXC on computers where I don't have admin rights.
The text was updated successfully, but these errors were encountered: