Skip to content

Commit

Permalink
vcrun2017: new verb
Browse files Browse the repository at this point in the history
  • Loading branch information
mmengden authored and austin987 committed Oct 18, 2017
1 parent b5ef847 commit 471f1bd
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions src/winetricks
Original file line number Diff line number Diff line change
Expand Up @@ -9505,6 +9505,7 @@ w_metadata vcrun2015 dlls \
publisher="Microsoft" \
year="2015" \
media="download" \
conflicts="vcrun2017" \
file1="vc_redist.x86.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/mfc140.dll"

Expand Down Expand Up @@ -9562,6 +9563,71 @@ load_vcrun2015()

#----------------------------------------------------------------

w_metadata vcrun2017 dlls \
title="Visual C++ 2017 libraries (concrt140.dll,mfc140.dll,mfc140u.dll,mfcm140.dll,mfcm140u.dll,msvcp140.dll,vcamp140.dll,vccorlib140.dll,vcomp140.dll,vcruntime140.dll)" \
publisher="Microsoft" \
year="2017" \
media="download" \
conflicts="vcrun2015" \
file1="VC_redist.x86.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/mfc140.dll"

# FIXME: There's a conflict with vcrun2015 because the dll's version number for 2017 and 2015 are the same. Correct behavior should be compared to native Windows.
load_vcrun2017()
{
# https://go.microsoft.com/fwlink/?LinkId=746571
# 2017/10/02: 2da11e22a276be85970eaed255daf3d92af84e94142ec04252326a882e57303e
w_download https://download.visualstudio.microsoft.com/download/pr/11100229/78c1e864d806e36f6035d80a0e80399e/VC_redist.x86.exe 2da11e22a276be85970eaed255daf3d92af84e94142ec04252326a882e57303e

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

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
# https://go.microsoft.com/fwlink/?LinkId=746572
# 2017/10/02: 7434bf559290cccc3dd3624f10c9e6422cce9927d2231d294114b2f929f0e465
w_download https://download.visualstudio.microsoft.com/download/pr/11100230/15ccb3f02745c7b206ad10373cbca89b/VC_redist.x64.exe 7434bf559290cccc3dd3624f10c9e6422cce9927d2231d294114b2f929f0e465
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
}

#----------------------------------------------------------------

w_metadata vjrun20 dlls \
title="MS Visual J# 2.0 SE libraries (requires dotnet20)" \
publisher="Microsoft" \
Expand Down

0 comments on commit 471f1bd

Please sign in to comment.