Install vcrun2019 for 64-bit only

Questions about Wine on Linux
Locked
miktoki
Newbie
Newbie
Posts: 2
Joined: Sun Jan 23, 2022 3:32 pm

Install vcrun2019 for 64-bit only

Post by miktoki »

wine version: staging 6.23
WINETRICKS_VERSION=20210206-next

I have installed wine64 on archlinux and would like to add dlls to a wineprefix i have set up.
I am aware that this is a trivial operation using winetricks when wine32 is installed, but I am interested in attempting this without it.

To get past some hurdles with pacman dependencies i have symlinked wine64 to wine. I do not know if this is a sane thing to do.

I am assuming that vc_redist.x64 is a valid replacement for vc_redist.x86.exe, and that it is possible to get the neccessary dlls for vcrun2019 without 32-bit.

When running `winetricks vcrun2019` it attempts to get vc_redist.x86.exe, and fails the sh256sum, I'm guessing due to my wine alias not pointing to wine32.

If I run it with the --force option I get the following log output:

```
Executing wine vc_redist.x86.exe
002c:fixme:winediag:LdrInitializeThunk wine-staging 6.23 is a testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org.
wine: Unhandled page fault on execute access to 00007F1050087CC0 at address 00007F1050087CC0 (thread 0084), starting debugger...
wine: Unhandled page fault on execute access to 00007FABBBF50640 at address 00007FABBBF50640 (thread 00c8), starting debugger...
00d0:fixme:dbghelp:elf_search_auxv can't find symbol in module
...
00dc:fixme:dbghelp:elf_search_auxv can't find symbol in module
0024:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0)
012c:err:module:load_wow64_ntdll failed to load L"\\??\\C:\\windows\\syswow64\\ntdll.dll" error c0000135
Application could not be started, or no application associated with the specified file.
ShellExecuteEx failed: Internal error.
```

Here is the relevant section of winetricks:

```
load_vcrun2019()
{
# https://support.microsoft.com/en-us/hel ... -downloads
# 2019/12/26: e59ae3e886bd4571a811fe31a47959ae5c40d87c583f786816c60440252cd7ec
# 2020/03/23: ac96016f1511ae3eb5ec9de04551146fe351b7f97858dcd67163912e2302f5d6
# 2020/05/20: a06aac66734a618ab33c1522920654ddfc44fc13cafaa0f0ab85b199c3d51dc0
# 2020/08/05: b4d433e2f66b30b478c0d080ccd5217ca2a963c16e90caf10b1e0592b7d8d519
# 2020/10/03: caa38fd474164a38ab47ac1755c8ccca5ccfacfa9a874f62609e6439924e87ec
# 2020/11/13: 4521ed84b9b1679a706e719423d54ef5e413dc50dde1cf362232d7359d7e89c4
# 2021/03/09: 4521ed84b9b1679a706e719423d54ef5e413dc50dde1cf362232d7359d7e89c4
# 2021/03/28: e830c313aa99656748f9d2ed582c28101eaaf75f5377e3fb104c761bf3f808b2
# 2021/04/05: e830c313aa99656748f9d2ed582c28101eaaf75f5377e3fb104c761bf3f808b2
# 2021/04/13: 14563755ac24a874241935ef2c22c5fce973acb001f99e524145113b2dc638c1
# 2021/06/06: 91c21c93a88dd82e8ae429534dacbc7a4885198361eae18d82920c714e328cf9

w_warn "ucrtbase.dll is no longer included in vcrun2019. For details see: https://github.com/Winetricks/winetricks/issues/1770"

w_override_dlls native,builtin api-ms-win-crt-private-l1-1-0 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 msvcp140_1 msvcp140_2 msvcr140 vcomp140 vcruntime140

w_download https://aka.ms/vs/16/release/vc_redist.x86.exe 91c21c93a88dd82e8ae429534dacbc7a4885198361eae18d82920c714e328cf9

if w_workaround_wine_bug 50894 "Working around failing wusa.exe lookup via C:\windows\SysNative"; then
w_set_winver winxp
fi

w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
w_try "${WINE}" vc_redist.x86.exe ${W_OPT_UNATTENDED:+/q}

case "${W_ARCH}" in
win64)
# Also install the 64-bit version
# 2019/12/26: 40ea2955391c9eae3e35619c4c24b5aaf3d17aeaa6d09424ee9672aa9372aeed
# 2020/03/23: b6c82087a2c443db859fdbeaae7f46244d06c3f2a7f71c35e50358066253de52
# 2020/05/20: 7d7105c52fcd6766beee1ae162aa81e278686122c1e44890712326634d0b055e
# 2020/08/05: 952a0c6cb4a3dd14c3666ef05bb1982c5ff7f87b7103c2ba896354f00651e358
# 2020/10/03: 4b5890eb1aefdf8dfa3234b5032147eb90f050c5758a80901b201ae969780107
# 2020/11/13: f299953673de262fefad9dd19bfbe6a5725a03ae733bebfec856f1306f79c9f7
# 2021/03/09: f299953673de262fefad9dd19bfbe6a5725a03ae733bebfec856f1306f79c9f7
# 2021/03/28: b6c82087a2c443db859fdbeaae7f46244d06c3f2a7f71c35e50358066253de52
# 2021/04/05: 015edd4e5d36e053b23a01adb77a2b12444d3fb6eccefe23e3a8cd6388616a16
# 2021/04/13: 52b196bbe9016488c735e7b41805b651261ffa5d7aa86eb6a1d0095be83687b2
# 2021/06/06: a1592d3da2b27230c087a3b069409c1e82c2664b0d4c3b511701624702b2e2a3

# vcruntime140_1 is only shipped on x64:
w_override_dlls native,builtin vcruntime140_1

w_download https://aka.ms/vs/16/release/vc_redist.x64.exe a1592d3da2b27230c087a3b069409c1e82c2664b0d4c3b511701624702b2e2a3
w_try "${WINE}" vc_redist.x64.exe ${W_OPT_UNATTENDED:+/q}
;;
esac

w_set_winver 'default'
}
```
Would it work to just run the x64 part of the code?
jkfloris
Level 12
Level 12
Posts: 3136
Joined: Thu Aug 14, 2014 10:10 am

Re: Install vcrun2019 for 64-bit only

Post by jkfloris »

The vc_redist.x64.exe installer is a 32-bit application:

Code: Select all

file vc_redist.x64.exe
vc_redist.x64.exe: PE32 executable (GUI) Intel 80386, for MS Windows
You need a 32-bit Wine installation to run this file.

Maybe you can use cabextract to extract the installer, copy the dll-files into the wineprefix and create the dll overrides by hand.
miktoki
Newbie
Newbie
Posts: 2
Joined: Sun Jan 23, 2022 3:32 pm

Re: Install vcrun2019 for 64-bit only

Post by miktoki »

Oh, I was unaware how useful file was for this.

Code: Select all

cabextract vc_redist.x64.exe
which gave me 48 files of which a12, and a13 are cab files with the dlls I expect to need.
Is it correct to assume that these dlls should be copied to drive_c/windows/system32/ ?
jkfloris
Level 12
Level 12
Posts: 3136
Joined: Thu Aug 14, 2014 10:10 am

Re: Install vcrun2019 for 64-bit only

Post by jkfloris »

You can copy them to system32, or in the same folder as where the exe file is that needs them.
Don't forget to use winecfg to create a dll override.
Locked