mhanft wrote:Meanwhile, I found out that changing the Wine DLL attributes of msvcp140 and vcruntime140 to "Native, Builtin" seems to solve the problem. Not quite sure if this suffices, but everything seems to work until now.
...
I'd appreciate any comments if this was the correct solution anyway, or if I should do something different...
-Matt
Yup that looks fine.
Wine will look to the API calls for the native dynamic link libraries you've installed first - then fallback to the Wine builtin ones (which won't exist in the case of VCRedist 2017 I guess... core components maybe??)
That's pretty much what the
winetricks script, does behind the scenes, for the earlier supported versions of the MS runtimes...
E.g.
Visual C++ 2015 runtime:
Code: Select all
title="Visual C++ 2015 libraries (concrt140.dll,mfc140.dll,mfc140u.dll,mfcm140.dll,mfcm140u.dll,msvcp140.dll,vcamp140.dll,vccorlib140.dll,vcomp140.dll,vcruntime140.dll)" \
publisher="Microsoft" \
year="2015" \
media="download" \
file1="vc_redist.x86.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/mfc140.dll"
load_vcrun2015()
{
# https://www.microsoft.com/en-us/download/details.aspx?id=48145
# 2015/10/12: fdd1e1f0dcae2d0aa0720895eff33b927d13076e64464bb7c7e5843b7667cd14
w_download https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe fdd1e1f0dcae2d0aa0720895eff33b927d13076e64464bb7c7e5843b7667cd14
if w_workaround_wine_bug 37781; then
w_warn "This may fail in non-XP mode, see https://bugs.winehq.org/show_bug.cgi?id=37781"
fi
# THIS LINE HERE!! >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
w_override_dlls native,builtin api-ms-win-crt-conio-l1-1-0 api-ms-win-crt-heap-l1-1-0 api-ms-win-crt-locale-l1-1-0 api-ms-win-crt-math-l1-1-0 api-ms-win-crt-runtime-l1-1-0 api-ms-win-crt-stdio-l1-1-0 api-ms-win-crt-time-l1-1-0 atl140 concrt140 msvcp140 msvcr140 ucrtbase vcomp140 vcruntime140
w_set_winver winxp
w_try_cd "$W_CACHE"/"$W_PACKAGE"
w_try "$WINE" vc_redist.x86.exe $W_UNATTENDED_SLASH_Q
case "$W_ARCH" in
win64)
# Also install the 64-bit version
# 2015/10/12: 5eea714e1f22f1875c1cb7b1738b0c0b1f02aec5ecb95f0fdb1c5171c6cd93a3
w_download https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe 5eea714e1f22f1875c1cb7b1738b0c0b1f02aec5ecb95f0fdb1c5171c6cd93a3
if w_workaround_wine_bug 30713 "Manually extracting the 64-bit dlls"; then
rm -f "$W_TMP"/* # Avoid permission error
w_try_cabextract --directory="$W_TMP" vc_redist.x64.exe
w_try_cabextract --directory="$W_TMP" "$W_TMP/a10"
w_try_cabextract --directory="$W_TMP" "$W_TMP/a11"
cp "$W_TMP"/concrt140.dll "$W_SYSTEM64_DLLS"/concrt140.dll
cp "$W_TMP"/mfc140.dll "$W_SYSTEM64_DLLS"/mfc140.dll
cp "$W_TMP"/mfc140u.dll "$W_SYSTEM64_DLLS"/mfc140u.dll
cp "$W_TMP"/mfcm140.dll "$W_SYSTEM64_DLLS"/mfcm140.dll
cp "$W_TMP"/mfcm140u.dll "$W_SYSTEM64_DLLS"/mfcm140u.dll
cp "$W_TMP"/msvcp140.dll "$W_SYSTEM64_DLLS"/msvcp140.dll
cp "$W_TMP"/vcamp140.dll "$W_SYSTEM64_DLLS"/vcamp140.dll
cp "$W_TMP"/vccorlib140.dll "$W_SYSTEM64_DLLS"/vccorlib140.dll
cp "$W_TMP"/vcomp140.dll "$W_SYSTEM64_DLLS"/vcomp140.dll
cp "$W_TMP"/vcruntime140.dll "$W_SYSTEM64_DLLS"/vcruntime140.dll
cp "$W_TMP"/api_ms_win_crt_conio_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-conio-l1-1-0.dll
cp "$W_TMP"/api_ms_win_crt_heap_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-heap-l1-1-0.dll
cp "$W_TMP"/api_ms_win_crt_locale_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-locale-l1-1-0.dll
cp "$W_TMP"/api_ms_win_crt_math_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-math-l1-1-0.dll
cp "$W_TMP"/api_ms_win_crt_runtime_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-runtime-l1-1-0.dll
cp "$W_TMP"/api_ms_win_crt_stdio_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-stdio-l1-1-0.dll
cp "$W_TMP"/ucrtbase.dll "$W_SYSTEM64_DLLS"/ucrtbase.dll
else
w_try "$WINE" vc_redist.x64.exe $W_UNATTENDED_SLASH_Q
fi
;;
esac
}
Always worth checking this script out - even if you're trying to install a newer unsupported runtime...
Bob