Skip to content

Commit d4bba67

Browse files
committed
vcrun2015/17/19/22: manually install msvcp140.dll
1 parent 0d6c871 commit d4bba67

File tree

1 file changed

+36
-10
lines changed

1 file changed

+36
-10
lines changed

Diff for: src/winetricks

+36-10
Original file line numberDiff line numberDiff line change
@@ -12873,9 +12873,11 @@ load_vcrun2015()
1287312873
w_set_winver winxp
1287412874
fi
1287512875

12876-
# Setup will refuse to install ucrtbase because builtin's version number is higher, so manually replace it
12877-
# See https://bugs.winehq.org/show_bug.cgi?id=46317
12878-
w_try_cabextract --directory="${W_TMP}/win32" "${W_CACHE}"/vcrun2015/vc_redist.x86.exe -F 'a10'
12876+
# Setup will refuse to install msvcp140 & ucrtbase because builtin's version number is higher, so manually replace them
12877+
# See https://bugs.winehq.org/show_bug.cgi?id=46317 and
12878+
# https://bugs.winehq.org/show_bug.cgi?id=57518
12879+
w_try_cabextract --directory="${W_TMP}/win32" "${W_CACHE}"/"${W_PACKAGE}"/vc_redist.x86.exe -F 'a10'
12880+
w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}/win32/a10" -F 'msvcp140.dll'
1287912881
w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}/win32/a10" -F 'ucrtbase.dll'
1288012882

1288112883
w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
@@ -12886,8 +12888,9 @@ load_vcrun2015()
1288612888
# Also install the 64-bit version
1288712889
# 2022/09/16: d7257265dbc0635c96dd67ddf938a09abe0866cb2d4fa05f8b758c8644e724e4
1288812890
w_download https://download.microsoft.com/download/6/D/F/6DF3FF94-F7F9-4F0B-838C-A328D1A7D0EE/vc_redist.x64.exe d7257265dbc0635c96dd67ddf938a09abe0866cb2d4fa05f8b758c8644e724e4
12889-
# Also replace 64-bit ucrtbase.dll
12890-
w_try_cabextract --directory="${W_TMP}/win64" "${W_CACHE}"/vcrun2015/vc_redist.x64.exe -F 'a10'
12891+
# Also replace 64-bit msvcp140.dll & ucrtbase.dll
12892+
w_try_cabextract --directory="${W_TMP}/win64" "${W_CACHE}"/"${W_PACKAGE}"/vc_redist.x64.exe -F 'a10'
12893+
w_try_cabextract --directory="${W_SYSTEM64_DLLS}" "${W_TMP}/win32/a10" -F 'msvcp140.dll'
1289112894
w_try_cabextract --directory="${W_SYSTEM64_DLLS}" "${W_TMP}/win64/a10" -F 'ucrtbase.dll'
1289212895
w_try_ms_installer "${WINE}" vc_redist.x64.exe ${W_OPT_UNATTENDED:+/q}
1289312896
;;
@@ -12956,9 +12959,11 @@ load_vcrun2017()
1295612959
w_set_winver winxp
1295712960
fi
1295812961

12959-
# Setup will refuse to install ucrtbase because builtin's version number is higher, so manually replace it
12960-
# See https://bugs.winehq.org/show_bug.cgi?id=46317
12961-
w_try_cabextract --directory="${W_TMP}/win32" "${W_CACHE}"/vcrun2017/vc_redist.x86.exe -F 'a10'
12962+
# Setup will refuse to install msvcp140 & ucrtbase because builtin's version number is higher, so manually replace them
12963+
# See https://bugs.winehq.org/show_bug.cgi?id=46317 and
12964+
# https://bugs.winehq.org/show_bug.cgi?id=57518
12965+
w_try_cabextract --directory="${W_TMP}/win32" "${W_CACHE}"/"${W_PACKAGE}"/vc_redist.x86.exe -F 'a10'
12966+
w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}/win32/a10" -F 'msvcp140.dll'
1296212967
w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}/win32/a10" -F 'ucrtbase.dll'
1296312968

1296412969
w_try_cd "${W_CACHE}/${W_PACKAGE}"
@@ -12973,8 +12978,9 @@ load_vcrun2017()
1297312978
# 2019/08/14: 5b0cbb977f2f5253b1ebe5c9d30edbda35dbd68fb70de7af5faac6423db575b5
1297412979
# 2024/10/17: 7cf24eba2bd67ea6229b7dd131e06f4e92ebefc06e36fe401cdd227d7ed78264
1297512980
w_download https://aka.ms/vs/15/release/vc_redist.x64.exe 7cf24eba2bd67ea6229b7dd131e06f4e92ebefc06e36fe401cdd227d7ed78264
12976-
# Also replace 64-bit ucrtbase.dll
12977-
w_try_cabextract --directory="${W_TMP}/win64" "${W_CACHE}"/vcrun2017/vc_redist.x64.exe -F 'a10'
12981+
# Also replace 64-bit msvcp140.dll & ucrtbase.dll
12982+
w_try_cabextract --directory="${W_TMP}/win64" "${W_CACHE}"/"${W_PACKAGE}"/vc_redist.x64.exe -F 'a10'
12983+
w_try_cabextract --directory="${W_SYSTEM64_DLLS}" "${W_TMP}/win64/a10" -F 'msvcp140.dll'
1297812984
w_try_cabextract --directory="${W_SYSTEM64_DLLS}" "${W_TMP}/win64/a10" -F 'ucrtbase.dll'
1297912985
w_try_ms_installer "${WINE}" vc_redist.x64.exe ${W_OPT_UNATTENDED:+/q}
1298012986
;;
@@ -13022,6 +13028,11 @@ load_vcrun2019()
1302213028
w_set_winver winxp
1302313029
fi
1302413030

13031+
# Setup will refuse to install msvcp140 because the builtin's version number is higher, so manually replace it
13032+
# See https://bugs.winehq.org/show_bug.cgi?id=57518
13033+
w_try_cabextract --directory="${W_TMP}/win32" "${W_CACHE}"/"${W_PACKAGE}"/vc_redist.x86.exe -F 'a10'
13034+
w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}/win32/a10" -F 'msvcp140.dll'
13035+
1302513036
w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
1302613037
w_try_ms_installer "${WINE}" vc_redist.x86.exe ${W_OPT_UNATTENDED:+/q}
1302713038

@@ -13049,6 +13060,11 @@ load_vcrun2019()
1304913060
w_override_dlls native,builtin vcruntime140_1
1305013061

1305113062
w_download https://aka.ms/vs/16/release/vc_redist.x64.exe 5d9999036f2b3a930f83b7fe3e2186b12e79ae7c007d538f52e3582e986a37c3
13063+
13064+
# Also replace 64-bit msvcp140.dll
13065+
w_try_cabextract --directory="${W_TMP}/win64" "${W_CACHE}"/"${W_PACKAGE}"/vc_redist.x64.exe -F 'a11'
13066+
w_try_cabextract --directory="${W_SYSTEM64_DLLS}" "${W_TMP}/win64/a11" -F 'msvcp140.dll'
13067+
1305213068
w_try_ms_installer "${WINE}" vc_redist.x64.exe ${W_OPT_UNATTENDED:+/q}
1305313069
;;
1305413070
esac
@@ -13116,6 +13132,11 @@ load_vcrun2022()
1311613132

1311713133
w_download https://aka.ms/vs/17/release/vc_redist.x86.exe dd1a8be03398367745a87a5e35bebdab00fdad080cf42af0c3f20802d08c25d4
1311813134

13135+
# Setup will refuse to install msvcp140 because the builtin's version number is higher, so manually replace it
13136+
# See https://bugs.winehq.org/show_bug.cgi?id=57518
13137+
w_try_cabextract --directory="${W_TMP}/win32" "${W_CACHE}"/"${W_PACKAGE}"/vc_redist.x86.exe -F 'a10'
13138+
w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}/win32/a10" -F 'msvcp140.dll'
13139+
1311913140
w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
1312013141
w_try_ms_installer "${WINE}" vc_redist.x86.exe ${W_OPT_UNATTENDED:+/q}
1312113142

@@ -13134,6 +13155,11 @@ load_vcrun2022()
1313413155
w_override_dlls native,builtin vcruntime140_1
1313513156

1313613157
w_download https://aka.ms/vs/17/release/vc_redist.x64.exe 1821577409c35b2b9505ac833e246376cc68a8262972100444010b57226f0940
13158+
13159+
# Also replace 64-bit msvcp140.dll
13160+
w_try_cabextract --directory="${W_TMP}/win64" "${W_CACHE}"/"${W_PACKAGE}"/vc_redist.x64.exe -F 'a11'
13161+
w_try_cabextract --directory="${W_SYSTEM64_DLLS}" "${W_TMP}/win64/a11" -F 'msvcp140.dll'
13162+
1313713163
w_try_ms_installer "${WINE}" vc_redist.x64.exe ${W_OPT_UNATTENDED:+/q}
1313813164
;;
1313913165
esac

0 commit comments

Comments
 (0)