From ba57f2dcdcb8253298c90da5c27354cabad75ede Mon Sep 17 00:00:00 2001 From: Dean M Greer <38226388+Gcenx@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:42:22 -0500 Subject: [PATCH 01/23] origin: Updated workaround to v3 --- src/winetricks | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/winetricks b/src/winetricks index 6f9894c7f..58ea1c63c 100755 --- a/src/winetricks +++ b/src/winetricks @@ -16740,14 +16740,27 @@ w_metadata origin apps \ year="2011" \ media="download" \ file1="OriginSetup.exe" \ - file2="version_v2.dll" \ + file2="version_v3.dll" \ installed_file1="${W_PROGRAMS_X86_WIN}/Origin/Origin.exe" \ homepage="https://www.origin.com/" load_origin() { w_download_to origin https://taskinoz.com/downloads/OriginSetup-10.5.119.52718.exe ed6ee5174f697744ac7c5783ff9021da603bbac42ae9836cd468d432cadc9779 OriginSetup.exe - w_download_to origin https://github.com/p0358/Fuck_off_EA_App/releases/download/v2/version.dll 5f0bbb15f7cff8540642c28739db0cd6b15e77e5935f4e6701351eea86d929ab version_v2.dll + w_download_to origin https://github.com/p0358/Fuck_off_EA_App/releases/download/v3/version.dll 6c2df238a5cbff3475527aa7adf1d8b76d4d2d1a33a6d62edd4749408305c2be version_v3.dll + + w_try_mkdir "${W_DRIVE_C}/ProgramData/Origin" + + w_warn "Stopping Origin from finding updates" + cat > "${W_DRIVE_C}/ProgramData/Origin/local.xml" <<_EOF_ + + + + + + + +_EOF_ w_try_cd "${W_CACHE}/${W_PACKAGE}" w_try "${WINE}" "${file1}" /NoLaunch ${W_OPT_UNATTENDED:+/SILENT} @@ -16781,7 +16794,7 @@ load_origin() fi w_warn "Workaround Forced EA app upgrade." - w_try cp -f "${W_CACHE}/${W_PACKAGE}/version_v2.dll" "${W_PROGRAMS_X86_UNIX}/Origin/version.dll" + w_try cp -f "${W_CACHE}/${W_PACKAGE}/version_v3.dll" "${W_PROGRAMS_X86_UNIX}/Origin/version.dll" w_override_app_dlls Origin.exe native version w_warn "Pretend EA app is installed" From 4302a8d2d8c76de1134b5462bcdc5492dfd65450 Mon Sep 17 00:00:00 2001 From: Jens Reyer Date: Sat, 10 Feb 2024 01:42:02 +0100 Subject: [PATCH 02/23] winetricks: update Debian package recommendations - Recommend 7zip, keep p7zip-full as alternative. 7zip replaces p7zip-full in upcoming Debian trixie and Ubuntu noble. - Use "apt" instead of "apt-get". For non-scripted commands this is recommended nowadays. The command exists for multiple years now. - Suggest unrar-free instead of unrar. --- src/winetricks | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/winetricks b/src/winetricks index 58ea1c63c..4bdc9da0c 100755 --- a/src/winetricks +++ b/src/winetricks @@ -39,11 +39,11 @@ WINETRICKS_VERSION=20240105-next # - xz is used by some verbs to decompress tar archives. # - zenity is needed by the GUI, though it can limp along somewhat with kdialog/xmessage. # -# On Ubuntu (20.04 and newer), the following line can be used to install all the prerequisites: -# sudo apt install aria2 binutils cabextract fuseiso p7zip-full pkexec tor unrar unzip wine xdg-utils xz-utils zenity +# On Ubuntu (23.04 and newer), the following line can be used to install all the prerequisites: +# sudo apt install 7zip aria2 binutils cabextract fuseiso pkexec tor unrar-free unzip wine xdg-utils xz-utils zenity # # On older Ubuntu, the following line can be used to install all the prerequisites: -# sudo apt install aria2 binutils cabextract fuseiso p7zip-full policykit-1 tor unrar unzip wine xdg-utils xz-utils zenity +# sudo apt install aria2 binutils cabextract fuseiso p7zip-full policykit-1 tor unrar-free unzip wine xdg-utils xz-utils zenity # # On Fedora, these commands can be used (RPM Fusion is used to install unrar): # sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm @@ -698,7 +698,7 @@ w_try_7z() if [ -z "${WINETRICKS_FORCE_WIN_7Z}" ] && [ -x "$(command -v 7z 2>/dev/null)" ] ; then w_try 7z x "${filename}" -o"${destdir}" "$@" else - w_warn "Cannot find 7z. Using Windows 7-Zip instead. (You can avoid this by installing 7z, e.g. 'sudo apt-get install p7zip-full' or 'sudo yum install p7zip-plugins')." + w_warn "Cannot find 7z. Using Windows 7-Zip instead. (You can avoid this by installing 7z, e.g. 'sudo apt install 7zip' or 'sudo yum install p7zip-plugins')." WINETRICKS_OPT_SHAREDPREFIX=1 w_call 7zip # w_call above will wipe $W_TMP; if that's the CWD, things will break. So forcefully reset the directory: @@ -718,7 +718,7 @@ w_try_ar() if [ -z "${WINETRICKS_FORCE_WIN_7Z}" ] && [ -x "$(command -v ar 2>/dev/null)" ]; then w_try ar x "$@" else - w_warn "Cannot find ar. Using Windows 7-zip instead. (You can avoid this by installing binutils, e.g. 'sudo apt-get install binutils' or 'sudo yum install binutils')." + w_warn "Cannot find ar. Using Windows 7-zip instead. (You can avoid this by installing binutils, e.g. 'sudo apt install binutils' or 'sudo yum install binutils')." WINETRICKS_OPT_SHAREDPREFIX=1 w_call 7zip # w_call above will wipe $W_TMP; if that's the CWD, things will break. So forcefully reset the directory: @@ -734,7 +734,7 @@ w_try_cabextract() { # Not always installed, but shouldn't be fatal unless it's being used if test ! -x "$(command -v cabextract 2>/dev/null)"; then - w_die "Cannot find cabextract. Please install it (e.g. 'sudo apt-get install cabextract' or 'sudo yum install cabextract')." + w_die "Cannot find cabextract. Please install it (e.g. 'sudo apt install cabextract' or 'sudo yum install cabextract')." fi w_try cabextract -q "$@" @@ -900,7 +900,7 @@ w_try_unrar() if [ -z "${WINETRICKS_FORCE_WIN_7Z}" ] && [ -x "$(command -v unrar 2>/dev/null)" ]; then w_try unrar x "$@" else - w_warn "Cannot find unrar. Using Windows 7-Zip instead. (You can avoid this by installing unrar, e.g. 'sudo apt-get install unrar' or 'sudo yum install unrar')." + w_warn "Cannot find unrar. Using Windows 7-Zip instead. (You can avoid this by installing unrar, e.g. 'sudo apt install unrar-free' or 'sudo yum install unrar')." WINETRICKS_OPT_SHAREDPREFIX=1 w_call 7zip # w_call above will wipe $W_TMP; if that's the CWD, things will break. So forcefully reset the directory: @@ -931,7 +931,7 @@ w_try_unzip() 1|*) w_warn "Unzip failed, trying Windows 7-Zip instead." ;; esac else - w_warn "Cannot find unzip. Using Windows 7-Zip instead. (You can avoid this by installing unzip, e.g. 'sudo apt-get install unzip' or 'sudo yum install unzip')." + w_warn "Cannot find unzip. Using Windows 7-Zip instead. (You can avoid this by installing unzip, e.g. 'sudo apt install unzip' or 'sudo yum install unzip')." fi WINETRICKS_OPT_SHAREDPREFIX=1 w_call 7zip @@ -1018,7 +1018,7 @@ w_verify_cabextract_available() # This should be called by verb_a, to give a proper warning if test ! -x "$(command -v cabextract 2>/dev/null)"; then - w_die "Cannot find cabextract. Please install it (e.g. 'sudo apt-get install cabextract' or 'sudo yum install cabextract')." + w_die "Cannot find cabextract. Please install it (e.g. 'sudo apt install cabextract' or 'sudo yum install cabextract')." fi w_try_cabextract -q -v >/dev/null 2>&1 From 02a555d6b17b80f5fadbaef9a29902661fd5a77d Mon Sep 17 00:00:00 2001 From: Jens Reyer Date: Sun, 18 Feb 2024 18:32:38 +0100 Subject: [PATCH 03/23] debian: recommend 7zip, keep p7zip-full as alternative 7zip replaces p7zip-full in upcoming Debian trixie and Ubuntu noble. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index ef1c19a3b..1819b572d 100644 --- a/debian/control +++ b/debian/control @@ -12,10 +12,10 @@ Package: winetricks Architecture: all Multi-Arch: foreign Depends: + 7zip | p7zip-full, aria2 | wget | curl, binutils, cabextract, - p7zip-full, unzip, Recommends: fuseiso | archivemount, From 99b9f0113838b89df35a226ee41ced295d50bbaa Mon Sep 17 00:00:00 2001 From: Dean M Greer <38226388+Gcenx@users.noreply.github.com> Date: Mon, 31 Jul 2023 22:37:59 -0400 Subject: [PATCH 04/23] d2gl: new verb --- src/winetricks | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/winetricks b/src/winetricks index 4bdc9da0c..1631b170a 100755 --- a/src/winetricks +++ b/src/winetricks @@ -6223,6 +6223,25 @@ load_binkw32() #---------------------------------------------------------------- +w_metadata d2gl dlls \ + title="Diablo 2 LoD Glide to OpenGL Wrapper" \ + publisher="Bayaraa" \ + year="2023" \ + media="download" \ + file1="D2GL.v1.3.3.zip" \ + installed_file1="${W_PROGRAMS_X86_WIN}/Diablo II/glide3x.dll" \ + homepage="https://github.com/bayaraa/d2gl" + +load_d2gl() +{ + w_download https://github.com/bayaraa/d2gl/releases/download/v1.3.3/D2GL.v1.3.3.zip 33862ab74f314f9e72f992dd8850f8bfd0d6533ef0e4a0015867fc6524125ea2 + w_try_unzip "${W_PROGRAMS_X86_UNIX}/Diablo II" "${W_CACHE}/${W_PACKAGE}/${file1}" + + w_warn "Run Diablo II using game.exe -3dfx" +} + +#---------------------------------------------------------------- + w_metadata d3dcompiler_42 dlls \ title="MS d3dcompiler_42.dll" \ publisher="Microsoft" \ From 8d7bc91caca476b2dad9ddb3589f217901c59aaa Mon Sep 17 00:00:00 2001 From: Dean M Greer <38226388+Gcenx@users.noreply.github.com> Date: Fri, 16 Feb 2024 09:39:11 -0500 Subject: [PATCH 05/23] dotnet8|dotnetdesktop8: new verbs --- src/winetricks | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/src/winetricks b/src/winetricks index 1631b170a..cb4eb168d 100755 --- a/src/winetricks +++ b/src/winetricks @@ -10176,6 +10176,56 @@ load_dotnetdesktop7() #---------------------------------------------------------------- +w_metadata dotnet8 dlls \ + title="MS .NET Runtime 8.0 LTS" \ + publisher="Microsoft" \ + year="2024" \ + media="download" \ + file1="dotnet-runtime-8.0.2-win-x86.exe" \ + installed_file1="${W_PROGRAMS_WIN}/dotnet/dotnet.exe" + +load_dotnet8() +{ + # Official version, see https://dotnet.microsoft.com/en-us/download/dotnet/8.0 + w_download https://download.visualstudio.microsoft.com/download/pr/e4987764-bda2-4a72-8820-52605f30e899/f5b412fec80d7f4b20fc4ac7740f7279/dotnet-runtime-8.0.2-win-x86.exe b765676fc2f85cb393cabf2bef5dd118578a2a8761be97454352c0c2634957a4 + + w_try_cd "${W_CACHE}"/"${W_PACKAGE}" + w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/quiet} + + if [ "${W_ARCH}" = "win64" ]; then + # Also install the 64-bit version + w_download https://download.visualstudio.microsoft.com/download/pr/a4bc7333-6e30-4e2d-b300-0b4f23537e5b/4b81af6d46a02fba5d9ce030af438c67/dotnet-runtime-8.0.2-win-x64.exe ec10da69116d12691abcb374929cf9eec65e4607095ff1ff035989848fd1db00 + w_try "${WINE}" "dotnet-runtime-8.0.2-win-x64.exe" ${W_OPT_UNATTENDED:+/quiet} + fi +} + +#---------------------------------------------------------------- + +w_metadata dotnetdesktop8 dlls \ + title="MS .NET Desktop Runtime 8.0 LTS" \ + publisher="Microsoft" \ + year="2024" \ + media="download" \ + file1="windowsdesktop-runtime-8.0.2-win-x86.exe" \ + installed_file1="${W_PROGRAMS_WIN}/dotnet/dotnet.exe" + +load_dotnetdesktop8() +{ + # Official version, see https://dotnet.microsoft.com/en-us/download/dotnet/8.0 + w_download https://download.visualstudio.microsoft.com/download/pr/9b77b480-7e32-4321-b417-a41e0f8ea952/3922bbf5538277b1d41e9b49ee443673/windowsdesktop-runtime-8.0.2-win-x86.exe 548bcca012cde72bfa68e693ee3dab175c3aa7926d3a3621c8f6f3b12904b909 + + w_try_cd "${W_CACHE}"/"${W_PACKAGE}" + w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/quiet} + + if [ "${W_ARCH}" = "win64" ]; then + # Also install the 64-bit version + w_download https://download.visualstudio.microsoft.com/download/pr/84ba33d4-4407-4572-9bfa-414d26e7c67c/bb81f8c9e6c9ee1ca547396f6e71b65f/windowsdesktop-runtime-8.0.2-win-x64.exe 52099c00372c1ef6c78878f98f6994777170c8f8556bc3b42a6c291a268ce750 + w_try "${WINE}" "windowsdesktop-runtime-8.0.2-win-x64.exe" ${W_OPT_UNATTENDED:+/quiet} + fi +} + +#---------------------------------------------------------------- + w_metadata dotnet_verifier dlls \ title="MS .NET Verifier" \ publisher="Microsoft" \ From f87bf9e6a7c67a06487a1ef710c0d9c548ae6f01 Mon Sep 17 00:00:00 2001 From: Dean M Greer <38226388+Gcenx@users.noreply.github.com> Date: Wed, 21 Feb 2024 22:39:50 -0500 Subject: [PATCH 06/23] cnc_ddraw: Update to v6.2.0.0 --- src/winetricks | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/winetricks b/src/winetricks index cb4eb168d..05b6683d8 100755 --- a/src/winetricks +++ b/src/winetricks @@ -6064,17 +6064,32 @@ load_cmd() w_metadata cnc_ddraw dlls \ title="Reimplentation of ddraw for CnC games" \ - homepage="https://github.com/CnCNet/cnc-ddraw" \ + homepage="https://github.com/FunkyFr3sh/cnc-ddraw" \ publisher="CnCNet" \ year="2021" \ media="download" \ - file1="cnc-ddraw-v5.0.0.0.zip" \ + file1="cnc-ddraw-v6.2.0.0.zip" \ installed_file1="${W_SYSTEM32_DLLS_WIN}/Shaders/readme.txt" load_cnc_ddraw() { # Note: only works if ddraw.ini contains settings for the executable - w_download https://github.com/CnCNet/cnc-ddraw/releases/download/v5.0.0.0/cnc-ddraw.zip 9f37010bf87aafbe3d97a95f4253460a8f0869fb52bb45bcffbb73182b4b00fe cnc-ddraw-v5.0.0.0.zip + # 2018/12/11 https://github.com/FunkyFr3sh/cnc-ddraw/releases/download/1.3.4.0/cnc-ddraw.zip + # 2020/02/03 https://github.com/FunkyFr3sh/cnc-ddraw/releases/download/1.3.5.0/cnc-ddraw.zip + # 2021/09/29 https://github.com/FunkyFr3sh/cnc-ddraw/releases/download/v4.4.4.0/cnc-ddraw.zip + # 2022/03/27 https://github.com/FunkyFr3sh/cnc-ddraw/releases/download/v4.4.7.0/cnc-ddraw.zip + # 2022/09/18 https://github.com/FunkyFr3sh/cnc-ddraw/releases/download/v4.4.9.0/cnc-ddraw.zip + # 2022/10/03 https://github.com/FunkyFr3sh/cnc-ddraw/releases/download/v4.6.0.0/cnc-ddraw.zip + # 2023/02/08 https://github.com/FunkyFr3sh/cnc-ddraw/releases/download/v5.0.0.0/cnc-ddraw.zip + # 2023/08/15 https://github.com/FunkyFr3sh/cnc-ddraw/releases/download/v5.6.0.0/cnc-ddraw.zip + # 2023/08/24 https://github.com/FunkyFr3sh/cnc-ddraw/releases/download/v5.7.0.0/cnc-ddraw.zip + # 2023/09/26 https://github.com/FunkyFr3sh/cnc-ddraw/releases/download/v5.8.0.0/cnc-ddraw.zip + # 2023/10/20 https://github.com/FunkyFr3sh/cnc-ddraw/releases/download/v5.9.0.0/cnc-ddraw.zip + # 2023/11/04 https://github.com/FunkyFr3sh/cnc-ddraw/releases/download/v6.0.0.0/cnc-ddraw.zip + # 2024/02/03 https://github.com/FunkyFr3sh/cnc-ddraw/releases/download/v6.1.0.0d/cnc-ddraw.zip + # 2024/02/21 https://github.com/FunkyFr3sh/cnc-ddraw/releases/download/v6.2.0.0/cnc-ddraw.zip + + w_download https://github.com/FunkyFr3sh/cnc-ddraw/releases/download/v6.2.0.0/cnc-ddraw.zip e5677ba52c31ffa93421a16edacff0c4d1f03e107aea6fc860861b43e3356119 cnc-ddraw-v6.2.0.0.zip w_try_unzip "${W_SYSTEM32_DLLS}" "${W_CACHE}/${W_PACKAGE}/${file1}" w_override_dlls native,builtin ddraw From 23de3a8dcdc98bc3a3d41995ad2d6b46eb3eba55 Mon Sep 17 00:00:00 2001 From: Gijs Vermeulen Date: Thu, 7 Mar 2024 01:34:30 +0100 Subject: [PATCH 07/23] alldlls=builtin: remove openal32 Wine no longer has a builtin openal32. --- src/winetricks | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/winetricks b/src/winetricks index 05b6683d8..c7c5e1dec 100755 --- a/src/winetricks +++ b/src/winetricks @@ -2350,7 +2350,7 @@ w_override_all_dlls() newdev ninput normaliz npmshtml npptools ntdsapi \ ntprint objsel odbc32 odbccp32 odbccu32 ole32 oleacc \ oleaut32 olecli32 oledb32 oledlg olepro32 olesvr32 \ - olethk32 opcservices openal32 opencl packager pdh \ + olethk32 opcservices opencl packager pdh \ photometadatahandler pidgen powrprof printui prntvpt \ propsys psapi pstorec qcap qedit qmgr qmgrprxy \ quartz query qwave rasapi32 rasdlg regapi resutils \ From 44fcb61f7d0fda7467215b2d92262a57cc296ad1 Mon Sep 17 00:00:00 2001 From: Austin English Date: Thu, 18 Apr 2024 09:24:31 -0500 Subject: [PATCH 08/23] opensymbol: update download URL --- src/winetricks | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/winetricks b/src/winetricks index c7c5e1dec..6ead6ad6b 100755 --- a/src/winetricks +++ b/src/winetricks @@ -15080,9 +15080,9 @@ load_lucida() w_metadata opensymbol fonts \ title="OpenSymbol fonts (replacement for Wingdings)" \ publisher="libreoffice.org" \ - year="2022" \ + year="2023" \ media="download" \ - file1="fonts-opensymbol_102.12+LibO7.6.4~rc1-1~bpo12+1_all.deb" \ + file1="fonts-opensymbol_102.12+LibO24.2.0-1~bpo12+1_all.deb" \ installed_file1="${W_FONTSDIR_WIN}/opens___.ttf" load_opensymbol() @@ -15090,7 +15090,7 @@ load_opensymbol() # The OpenSymbol fonts are a replacement for the Windows Wingdings font from OpenOffice.org. # Need to w_download Debian since I can't find a standalone download from OpenOffice # Note: The source download package on debian is for _all_ of OpenOffice, which is 266 MB. - w_download http://ftp.us.debian.org/debian/pool/main/libr/libreoffice/fonts-opensymbol_102.12+LibO7.6.4~rc1-1~bpo12+1_all.deb e35e57a0a703fe656230a30c7675a5c5c4772a11c6f650634765234d1f0fa35f + w_download http://ftp.us.debian.org/debian/pool/main/libr/libreoffice/fonts-opensymbol_102.12+LibO24.2.0-1~bpo12+1_all.deb 08687cba8b0fed3d8c6ff714c4ec17a66c57157c65a1e09c0fadff10aee29ca5 w_try_cd "${W_TMP}" w_try_ar "${W_CACHE}/${W_PACKAGE}/${file1}" data.tar.xz w_try tar -Jxf "${W_TMP}/data.tar.xz" ./usr/share/fonts/truetype/libreoffice/opens___.ttf From 8a4221661800feabca576b444a0c83820bba2936 Mon Sep 17 00:00:00 2001 From: Austin English Date: Sun, 21 Apr 2024 11:05:35 -0500 Subject: [PATCH 09/23] tests/winetricks-test: vb5run is broken upstream --- tests/winetricks-test | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/winetricks-test b/tests/winetricks-test index cd2193629..6fa3f1d1a 100755 --- a/tests/winetricks-test +++ b/tests/winetricks-test @@ -102,6 +102,8 @@ BLACKLIST="${BLACKLIST}|ffdshow|python26|python27" BLACKLIST="${BLACKLIST}|dirac" # https://bugs.winehq.org/show_bug.cgi?id=50061 / https://github.com/Winetricks/winetricks/issues/1644 BLACKLIST="${BLACKLIST}|quicktime76" +# https://bugs.winehq.org/show_bug.cgi?id=56209 +BLACKLIST="${BLACKLIST}|vb5run" # Tests that fail under Xvfb XVFB_DOTNET_BLACKLIST="dotnet11|dotnet11sp1|dotnet20|dotnet20sdk|dotnet20sp1|dotnet30|dotnet40|dotnet46" From 13becaf04fd630cc386c43e9eb943f16b2f2c035 Mon Sep 17 00:00:00 2001 From: Jens Reyer Date: Sat, 10 Feb 2024 18:47:59 +0100 Subject: [PATCH 10/23] winetricks: display messages for users to stderr This is especially needed if called inside redirected code to assign variables. Currently there's an issue where in case of an error winetricks_get_file_arch erroneously assigns the error message of w_die to the variable instead of showing it in the terminal. w_die calls w_warn, so we need to fix w_warn. The missing error message on the terminal goes unnoticed unless it is also shown in the GUI. Since the general start-the-gui logic is after winetricks_get_file_arch, this only happens here if "--gui" was specified explicitly. Still in both cases the error message erroneously gets assigned to the variable. w_warn already had this until f34f34ba winetricks: introduce $WINETRICKS_SUPER_QUIET to silence some output that breaks winetricks-test Although I see no current issues I also changed w_askpermission, w_info, w_try, and w_read_key for consistency. Except w_try they all output the same message also to the GUI. w_warn_cancel and w_question already output on stderr. --- src/winetricks | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/winetricks b/src/winetricks index 6ead6ad6b..88b045256 100755 --- a/src/winetricks +++ b/src/winetricks @@ -193,7 +193,7 @@ W_TEXT_LINE="------------------------------------------------------" # Ask permission to continue w_askpermission() { - printf '%s\n%b\n%s\n' "${W_TEXT_LINE}" "${@}" "${W_TEXT_LINE}" + printf '%s\n%b\n%s\n' "${W_TEXT_LINE}" "${@}" "${W_TEXT_LINE}" >&2 if test "${W_OPT_UNATTENDED}"; then _W_timeout="--timeout" @@ -208,7 +208,7 @@ w_askpermission() # -t / TMOUT don't seem to be portable, so just assume yes in unattended mode w_info "Unattended mode, not prompting for confirmation" else - printf %s "Press Y or N, then Enter: " + printf %s "Press Y or N, then Enter: " >&2 read -r response test "${response}" = Y || test "${response}" = y fi @@ -232,7 +232,7 @@ w_info() { # If $WINETRICKS_SUPER_QUIET is set, w_info is a no-op: if [ -z "${WINETRICKS_SUPER_QUIET}" ] ; then - printf '%s\n%b\n%s\n' "${W_TEXT_LINE}" "${@}" "${W_TEXT_LINE}" + printf '%s\n%b\n%s\n' "${W_TEXT_LINE}" "${@}" "${W_TEXT_LINE}" >&2 fi # kdialog doesn't allow a timeout unless you use --passivepopup @@ -254,9 +254,9 @@ w_info() # Display warning message to stderr (since it is called inside redirected code) w_warn() { - # If $WINETRICKS_SUPER_QUIET is set, w_info is a no-op: + # If $WINETRICKS_SUPER_QUIET is set, w_warn is a no-op: if [ -z "${WINETRICKS_SUPER_QUIET}" ] ; then - printf '%s\nwarning: %b\n%s\n' "${W_TEXT_LINE}" "${*}" "${W_TEXT_LINE}" + printf '%s\nwarning: %b\n%s\n' "${W_TEXT_LINE}" "${*}" "${W_TEXT_LINE}" >&2 fi # kdialog doesn't allow a timeout unless you use --passivepopup @@ -618,7 +618,7 @@ w_try() export WINEDLLOVERRIDES # If $WINETRICKS_SUPER_QUIET is set, make w_try quiet if [ -z "${WINETRICKS_SUPER_QUIET}" ]; then - printf '%s\n' "Executing $*" + printf '%s\n' "Executing $*" >&2 fi # On Vista, we need to jump through a few hoops to run commands in Cygwin. @@ -999,7 +999,7 @@ w_read_key() *zenity) W_KEY=$(zenity --entry --text "${_W_keymsg}") ;; *kdialog) W_KEY=$(kdialog --inputbox "${_W_keymsg}") ;; *xmessage) w_die "sorry, can't read key from GUI with xmessage" ;; - none) printf %s "${_W_keymsg}": ; read -r W_KEY ;; + none) printf %s "${_W_keymsg}": >&2 ; read -r W_KEY ;; esac if test "${W_KEY}" = ""; then From cab3af381a8d1a33abdf859f4db8374fcf54e21f Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Thu, 4 Apr 2024 05:12:55 +0200 Subject: [PATCH 11/23] depends: new verb --- files/verbs/apps.txt | 1 + src/winetricks | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/files/verbs/apps.txt b/files/verbs/apps.txt index d01cc4759..9b99fd448 100644 --- a/files/verbs/apps.txt +++ b/files/verbs/apps.txt @@ -8,6 +8,7 @@ cmake CMake 2.8 (Kitware, 2013) [downloadable] colorprofile Standard RGB color profile (Microsoft, 2005) [downloadable] controlpad MS ActiveX Control Pad (Microsoft, 1997) [downloadable] controlspy Control Spy 6 (Microsoft, 2005) [downloadable] +depends Dependency Walker (Steve P. Miller, 2006) [downloadable] dotnet20sdk MS .NET 2.0 SDK (Microsoft, 2006) [downloadable] dxsdk_aug2006 MS DirectX SDK, August 2006 (developers only) (Microsoft, 2006) [downloadable] dxsdk_jun2010 MS DirectX SDK, June 2010 (developers only) (Microsoft, 2010) [downloadable] diff --git a/src/winetricks b/src/winetricks index 88b045256..6af8aa888 100755 --- a/src/winetricks +++ b/src/winetricks @@ -7106,6 +7106,23 @@ load_dsdmo() #---------------------------------------------------------------- +w_metadata depends apps \ + title="Dependency Walker" \ + publisher="Steve P. Miller" \ + year="2006" \ + media="download" \ + +load_depends() +{ + w_download https://www.dependencywalker.com/depends22_x86.zip 03d73abba0e856c81ba994505373fdb94a13b84eb29e6c268be1bf21b7417ca3 + w_try_unzip "${W_TMP}" "${W_CACHE}"/depends/depends22_x86.zip + w_try cp "${W_TMP}"/depends.* "${W_WINDIR_UNIX}" + # depends.exe uses mfc42 + w_call mfc42 +} + +#---------------------------------------------------------------- + w_metadata dxsdk_aug2006 apps \ title="MS DirectX SDK, August 2006 (developers only)" \ publisher="Microsoft" \ From 4413dcca315ef615a78954a42d75466ae03e6e4b Mon Sep 17 00:00:00 2001 From: Austin English Date: Sat, 27 Apr 2024 15:03:24 -0500 Subject: [PATCH 12/23] +w_package_broken_wow64: new function --- src/winetricks | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/winetricks b/src/winetricks index 6af8aa888..8a393a749 100755 --- a/src/winetricks +++ b/src/winetricks @@ -559,6 +559,20 @@ w_package_broken_win64() w_package_broken "${bug_link}" "${bad_version}" "${good_version}" } +# Warn user if package is broken on (new style) wow64 +w_package_broken_wow64() { + bug_link="$1" + bad_version="$2" # Optional, for upstream regressions + good_version="$3" # Optional, if it's been fixed upstream + + _w_get_broken_messages + + if [ "${_W_wow64_style}" = "new" ]; then + w_warn "This package (${W_PACKAGE}) does not work on a new-style WoW64 prefix. See ${bug_link}. You must either use a 32-bit or old style WoW64 WINEPREFIX. Use --force to try anyway." + _w_force_continue_check 32 + fi +} + # Some packages don't support win32, die with an appropriate message # Returns 64 (for tests/winetricks-test) w_package_unsupported_win32() From 06cb73fd3a22f24cfcf594ff332f8eedb6af3fe6 Mon Sep 17 00:00:00 2001 From: Austin English Date: Sat, 27 Apr 2024 15:04:35 -0500 Subject: [PATCH 13/23] icodecs: broken on wow64 --- src/winetricks | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/winetricks b/src/winetricks index 8a393a749..b3606025e 100755 --- a/src/winetricks +++ b/src/winetricks @@ -11049,6 +11049,8 @@ w_metadata icodecs dlls \ load_icodecs() { + w_package_broken_wow64 "https://bugs.winehq.org/show_bug.cgi?id=54670" + # Note: this codec is insecure, see # https://support.microsoft.com/kb/954157 # Original source, ftp://download.intel.com/support/createshare/camerapack/codinstl.exe, had same checksum From 16ab1eab22c3fa9f92f6a008dea8094d6eafa416 Mon Sep 17 00:00:00 2001 From: zpangwin Date: Sun, 4 Feb 2024 20:00:35 -0500 Subject: [PATCH 14/23] minor update to win64 warning messages to support toggling via exported env var in addition to current approach (per proposal in issue #1730 comments) --- src/winetricks | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/winetricks b/src/winetricks index b3606025e..f629c345e 100755 --- a/src/winetricks +++ b/src/winetricks @@ -5137,19 +5137,24 @@ winetricks_set_wineprefix() W_COMMONFILES_WIN="$(w_expand_env CommonProgramW6432)" W_COMMONFILES="$(w_pathconv -u "${W_COMMONFILES_WIN}")" - # 64-bit prefixes still have plenty of issues/a lot of verbs only install 32-bit libraries - # Allow the user to disable that (globally, or per prefix). - if test -f "${W_CACHE}/no_win64_warnings"; then - echo "${W_CACHE}/no_win64_warnings exists, not issuing 64-bit prefix warning" - _W_no_win64_warnings=1 - elif test -f "${WINEPREFIX}/no_win64_warnings"; then - echo "${WINEPREFIX}/no_win64_warnings exists, not issuing 64-bit prefix warning" - _W_no_win64_warnings=1 - elif test -f "${W_TMP_EARLY}/no_win64_warnings"; then - echo "${W_TMP_EARLY}/no_win64_warnings exists, not issuing 64-bit prefix warning" - _W_no_win64_warnings=1 - else - _W_no_win64_warnings=0 + # check if user has exported env variable or not + # if set, use value directly later when determining if win64 warnings should be displayed or not + # if empty, then fallback to checking for location-specific files and set accordingly + if test -z "${W_NO_WIN64_WARNINGS}"; then + # 64-bit prefixes still have plenty of issues/a lot of verbs only install 32-bit libraries + # Allow the user to disable that (globally, or per prefix). + if test -f "${W_CACHE}/no_win64_warnings"; then + echo "${W_CACHE}/no_win64_warnings exists, not issuing 64-bit prefix warning" + W_NO_WIN64_WARNINGS=1 + elif test -f "${WINEPREFIX}/no_win64_warnings"; then + echo "${WINEPREFIX}/no_win64_warnings exists, not issuing 64-bit prefix warning" + W_NO_WIN64_WARNINGS=1 + elif test -f "${W_TMP_EARLY}/no_win64_warnings"; then + echo "${W_TMP_EARLY}/no_win64_warnings exists, not issuing 64-bit prefix warning" + W_NO_WIN64_WARNINGS=1 + else + W_NO_WIN64_WARNINGS=0 + fi fi # In case of GUI, only warn once per prefix, per session (i.e., don't warn next time) @@ -5159,7 +5164,7 @@ winetricks_set_wineprefix() *) touch "${W_TMP_EARLY}/no_win64_warnings" ;; esac - if [ "${_W_no_win64_warnings}" = 0 ]; then + if [ "${W_NO_WIN64_WARNINGS}" = 0 ]; then case ${LANG} in bg*) w_warn "Използвате 64-битова папка. Повечето програми са за 32-битова архитектура. Ако възникнат проблеми, моля, използвайте 32-битова папка, преди да ги докладвате." ;; ru*) w_warn "Вы используете 64-битный WINEPREFIX. Важно: многие ветки устанавливают только 32-битные версии пакетов. Если у вас возникли проблемы, пожалуйста, проверьте еще раз на чистом 32-битном WINEPREFIX до отправки отчета об ошибке." ;; From 2361b71ae4034add7119efc32a6b60d6738d84e4 Mon Sep 17 00:00:00 2001 From: gardenapple Date: Wed, 3 Apr 2024 22:41:58 +0300 Subject: [PATCH 15/23] graphics: New verb, for enabling Wayland - Also usable for the same purposes as macdriver; deprecated macdriver - Has Ukrainian title and (new language) Russian title - Fixed settings with value =default being interpreted as DLLs --- src/winetricks | 81 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 55 insertions(+), 26 deletions(-) diff --git a/src/winetricks b/src/winetricks index f629c345e..8a821c059 100755 --- a/src/winetricks +++ b/src/winetricks @@ -3955,6 +3955,12 @@ winetricks_settings_menu() *) title="${title_bg}";; esac ;; + ru*) + case "${title_ru}" in + "") ;; + *) title="${title_ru}";; + esac + ;; uk*) case "${title_uk}" in "") ;; @@ -18261,6 +18267,50 @@ load_wglgears() #### # settings->desktop +#---------------------------------------------------------------- +w_metadata graphics=wayland settings \ + title_uk="Встановити графічний драйвер Wayland" \ + title_ru="Установить графический драйвер Wayland" \ + title="Set graphics driver to Wayland" +w_metadata graphics=x11 settings \ + title_uk="Встановити графічний драйвер X11" \ + title_ru="Установить графический драйвер X11" \ + title="Set graphics driver to X11" +w_metadata graphics=mac settings \ + title_uk="Встановити графічний драйвер Quartz (для macOS)" \ + title_ru="Установить графический драйвер Quartz (для macOS)" \ + title="Set graphics driver to Quartz (for macOS)" +w_metadata graphics=default settings \ + title_uk="Встановити графічний драйвер за замовчуванням" \ + title_ru="Установить графический драйвер по умолчанию" \ + title="Set graphics driver to default" + +load_graphics() { + case "$1" in + default ) + arg='-' + ;; + wayland ) + arg='"wayland,x11"' + ;; + mac ) + arg='"mac,x11"' + ;; + * ) + arg="\"$1\"" + ;; + esac + echo "Setting graphics driver to ${arg}" + cat > "${W_TMP}"/set-graphics.reg <<_EOF_ +REGEDIT4 + +[HKEY_CURRENT_USER\\Software\\Wine\\Drivers] +"Graphics"=${arg} + +_EOF_ + w_try_regedit "${W_TMP_WIN}"\\set-graphics.reg +} + #---------------------------------------------------------------- # DirectInput settings @@ -18367,31 +18417,6 @@ _EOF_ w_try_regedit "${W_TMP_WIN}"\\fontsmooth.reg } -#---------------------------------------------------------------- -# Mac Driver settings - -w_metadata macdriver=mac settings \ - title_bg="Включете драйвера на Mac - Quartz (по подразбиране)" \ - title_uk="Увімкнути рідний Mac Quartz драйвер (за замовчуванням)" \ - title="Enable the Mac native Quartz driver (default)" -w_metadata macdriver=x11 settings \ - title_bg="Изключете драйвера на Mac - Quartz и включете драйвера на X11" \ - title_uk="Вимкнути рідний Mac Quartz драйвер та використовувати замість нього X11" \ - title="Disable the Mac native Quartz driver, use X11 instead" - -load_macdriver() -{ - echo "Setting MacDriver to ${arg}" - cat > "${W_TMP}"/set-mac.reg <<_EOF_ -REGEDIT4 - -[HKEY_CURRENT_USER\\Software\\Wine\\Drivers] -"Graphics"="${arg}" - -_EOF_ - w_try_regedit "${W_TMP}"/set-mac.reg -} - #---------------------------------------------------------------- w_metadata mackeyremap=both settings \ @@ -19910,13 +19935,15 @@ execute_command() winecmd) winetricks_shell "${WINE}" "cmd.exe" ;; wine_misc_exe) winetricks_misc_exe ;; - # These have to come before *=disabled to avoid looking like DLLs + # These have to come before *=disabled and *=default to avoid looking like DLLs cfc=disable*) w_call cfc=disabled ;; fontsmooth=disable*) w_call fontsmooth=disable ;; + graphics=default) w_call graphics=default ;; mwo=disable*) w_call mwo=disable ;; # FIXME: relax matching so we can handle these spelling differences in verb instead of here rtlm=disable*) w_call rtlm=disabled ;; sound=disable*) w_call sound=disabled ;; ssm=disable*) w_call ssm=disabled ;; + videomemorysize=default) w_call videomemorysize=default ;; # Hacks for backwards compatibility # 2017/03/22: add deprecation notices @@ -20001,6 +20028,8 @@ execute_command() ie6_full) w_warn "Calling ie6_full is deprecated, please use ie6 instead" ; w_call ie6 ;; # FIXME: use wsh57 instead? jscript) w_warn "Calling jscript is deprecated, please use wsh57 instead" ; w_call wsh57 ;; + macdriver=mac) w_warn "Calling macdriver=mac is deprecated, please use graphics=mac instead" ; w_call graphics=mac ;; + macdriver=x11) w_warn "Calling macdriver=x11 is deprecated, please use graphics=x11 instead" ; w_call graphics=x11 ;; npm-repack) w_warn "Calling npm-repack is deprecated, please use npm=repack instead" ; w_call npm=repack ;; oss) w_warn "Calling oss is deprecated, please use sound=oss instead" ; w_call sound=oss ;; psdkwin7) w_warn "psdkwin7 has been removed, use psdkwin71 instead"; w_call psdkwin71 ;; From bc2ff55a63ccbf62be8bb163d57e12b7955a2842 Mon Sep 17 00:00:00 2001 From: Austin English Date: Sat, 27 Apr 2024 17:46:24 -0500 Subject: [PATCH 16/23] physx: broken in wine-9.5 Closes: #2210 --- src/winetricks | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/winetricks b/src/winetricks index 8a821c059..3f3af32f7 100755 --- a/src/winetricks +++ b/src/winetricks @@ -12301,6 +12301,8 @@ w_metadata physx dlls \ load_physx() { + w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=56606" 9.5 + w_get_sha256sum "${W_PROGRAMS_X86_UNIX}/NVIDIA Corporation/PhysX/Engine/86C5F4F22ECD/APEX_Particles_x64.dll" if [ "${_W_gotsha256sum}"x = "b3991e0165a9802b60e2f7d14c1be5f879071999ae74a38263cec9bf043a9eaa"x ] ; then w_warn "${W_PACKAGE} is already installed - not updating" From 391fe74da88d1593ba68f534df59f22ddc5c569a Mon Sep 17 00:00:00 2001 From: Georgi <68707872+RacerBG@users.noreply.github.com> Date: Mon, 29 Apr 2024 19:14:19 +0300 Subject: [PATCH 17/23] updated bulgarian translation --- src/winetricks | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/winetricks b/src/winetricks index 3f3af32f7..ed336b601 100755 --- a/src/winetricks +++ b/src/winetricks @@ -18271,18 +18271,22 @@ load_wglgears() # settings->desktop #---------------------------------------------------------------- w_metadata graphics=wayland settings \ + title_bg="Задайте графичния драйвер Wayland" \ title_uk="Встановити графічний драйвер Wayland" \ title_ru="Установить графический драйвер Wayland" \ title="Set graphics driver to Wayland" w_metadata graphics=x11 settings \ + title_bg="Задайте графичния драйвер X11" \ title_uk="Встановити графічний драйвер X11" \ title_ru="Установить графический драйвер X11" \ title="Set graphics driver to X11" w_metadata graphics=mac settings \ + title_bg="Задайте графичния драйвер Quartz (за macOS)" \ title_uk="Встановити графічний драйвер Quartz (для macOS)" \ title_ru="Установить графический драйвер Quartz (для macOS)" \ title="Set graphics driver to Quartz (for macOS)" w_metadata graphics=default settings \ + title_bg="Задайте графичния драйвер по подразбиране" \ title_uk="Встановити графічний драйвер за замовчуванням" \ title_ru="Установить графический драйвер по умолчанию" \ title="Set graphics driver to default" From 2f4fc268c49746d8d16e21aa5e84db679eab540b Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Thu, 4 Apr 2024 05:11:55 +0200 Subject: [PATCH 18/23] procexp: new verb --- files/verbs/apps.txt | 1 + src/winetricks | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/files/verbs/apps.txt b/files/verbs/apps.txt index 9b99fd448..68ce09d0c 100644 --- a/files/verbs/apps.txt +++ b/files/verbs/apps.txt @@ -40,6 +40,7 @@ ollydbg200 OllyDbg (ollydbg.de, 2010) [downloadable] ollydbg201 OllyDbg (ollydbg.de, 2013) [downloadable] openwatcom Open Watcom C/C++ compiler (can compile win16 code!) (Watcom, 2010) [downloadable] origin EA Origin (EA, 2011) [downloadable] +procexp Process Explorer (Microsoft, 2023) [downloadable] protectionid Protection ID (CDKiLLER & TippeX, 2016) psdk2003 MS Platform SDK 2003 (Microsoft, 2003) [downloadable] psdkwin71 MS Windows 7.1 SDK (Microsoft, 2010) [downloadable] diff --git a/src/winetricks b/src/winetricks index ed336b601..6779c7374 100755 --- a/src/winetricks +++ b/src/winetricks @@ -16941,6 +16941,24 @@ _EOF_ #---------------------------------------------------------------- +w_metadata procexp apps \ + title="Process Explorer" \ + publisher="Steve P. Miller" \ + year="2006" \ + media="download" \ + +load_procexp() +{ + w_download https://download.sysinternals.com/files/ProcessExplorer.zip c50bddaaacb26c5654f845962f9ee34db6ce26b62f94a03bb59f3b5a6eea1922 + w_try_unzip "${W_TMP}" "${W_CACHE}"/procexp/ProcessExplorer.zip + if [ "${W_ARCH}" = "win64" ] ; then + w_try cp "${W_TMP}"/procexp64.exe "${W_WINDIR_UNIX}" + fi + w_try cp "${W_TMP}"/procexp.exe "${W_WINDIR_UNIX}" +} + +#---------------------------------------------------------------- + w_metadata protectionid apps \ title="Protection ID" \ publisher="CDKiLLER & TippeX" \ From be81938a10af4e55cdf2ada1167dd24157aa0e36 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Mon, 29 Apr 2024 09:05:38 +0200 Subject: [PATCH 19/23] dbgview: new verb --- files/verbs/apps.txt | 1 + src/winetricks | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/files/verbs/apps.txt b/files/verbs/apps.txt index 68ce09d0c..f202c444b 100644 --- a/files/verbs/apps.txt +++ b/files/verbs/apps.txt @@ -8,6 +8,7 @@ cmake CMake 2.8 (Kitware, 2013) [downloadable] colorprofile Standard RGB color profile (Microsoft, 2005) [downloadable] controlpad MS ActiveX Control Pad (Microsoft, 1997) [downloadable] controlspy Control Spy 6 (Microsoft, 2005) [downloadable] +dbgview Debug monitor (Mark Russinovich, 2019) [downloadable] depends Dependency Walker (Steve P. Miller, 2006) [downloadable] dotnet20sdk MS .NET 2.0 SDK (Microsoft, 2006) [downloadable] dxsdk_aug2006 MS DirectX SDK, August 2006 (developers only) (Microsoft, 2006) [downloadable] diff --git a/src/winetricks b/src/winetricks index 6779c7374..395390af0 100755 --- a/src/winetricks +++ b/src/winetricks @@ -7131,6 +7131,25 @@ load_dsdmo() #---------------------------------------------------------------- +w_metadata dbgview apps \ + title="Debug monitor" \ + publisher="Mark Russinovich" \ + year="2019" \ + media="download" \ + +load_dbgview() +{ + w_download https://download.sysinternals.com/files/DebugView.zip 05cfa3dde3d98eb333d0582556f4f520e6207fe8d335bd1e910d90692798f913 + w_try_unzip "${W_TMP}" "${W_CACHE}"/dbgview/DebugView.zip + if [ "${W_ARCH}" = "win64" ]; then + w_try cp "${W_TMP}"/dbgview64.exe "${W_WINDIR_UNIX}" + fi + w_try cp "${W_TMP}"/Dbgview.exe "${W_WINDIR_UNIX}" + w_try cp "${W_TMP}"/Dbgview.chm "${W_WINDIR_UNIX}" +} + +#---------------------------------------------------------------- + w_metadata depends apps \ title="Dependency Walker" \ publisher="Steve P. Miller" \ From c41fed43d8723fa027cf8116b823b55183f3801c Mon Sep 17 00:00:00 2001 From: Jens Reyer Date: Fri, 23 Feb 2024 02:42:10 +0100 Subject: [PATCH 20/23] winetricks_set_wineprefix: provide basics to determine Wine's bindir --- src/winetricks | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/winetricks b/src/winetricks index 395390af0..b0b550839 100755 --- a/src/winetricks +++ b/src/winetricks @@ -5083,6 +5083,19 @@ winetricks_set_wineprefix() # Check the bitness of wineserver + wine binary, used later to determine if we're on a WOW setup (no wine64) # https://github.com/Winetricks/winetricks/issues/2030 WINESERVER_BIN="$(which "${WINESERVER}")" + + # wineboot often is a link pointing to wineapploader in Wine's bindir. If we don't find binaries we may look for them there later + if [ -n "${READLINK_F}" ]; then + true + elif [ "$(uname -s)" = "Darwin" ]; then + # readlink exists on MacOS, but does not support "-f" on MacOS < 12.3 + # Use perl instead + READLINK_F="perl -MCwd=abs_path -le 'print abs_path readlink(shift);'" + else + READLINK_F="readlink -f" + fi + WINEBOOT_BIN="$(dirname "${WINESERVER_BIN}")/$(basename "${WINESERVER_BIN}"|sed 's,wineserver,wineboot,')" + _W_wineserver_binary_arch="$(winetricks_get_file_arch "${WINESERVER_BIN}")" WINE_BIN="$(which "${WINE}")" _W_wine_binary_arch="$(winetricks_get_file_arch "${WINE_BIN}")" From 0dc7677a84112132bb5250c7632d39bcf7b4ca63 Mon Sep 17 00:00:00 2001 From: Jens Reyer Date: Fri, 23 Feb 2024 03:26:10 +0100 Subject: [PATCH 21/23] winetricks_set_wineprefix: workaround if wine64 is only in Wine's bindir --- src/winetricks | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/winetricks b/src/winetricks index b0b550839..5208e13f3 100755 --- a/src/winetricks +++ b/src/winetricks @@ -5122,10 +5122,18 @@ winetricks_set_wineprefix() elif command -v "${WINE}64" >/dev/null 2>&1; then WINE64="${WINE}64" else - # Handle case where wine binaries (or binary wrappers) have a suffix - WINE64="$(dirname "${WINE}")/" - [ "${WINE64}" = "./" ] && WINE64="" - WINE64="${WINE64}$(basename "${WINE}" | sed 's/^wine/wine64/')" + if [ -x "${WINEBOOT_BIN}" ]; then + WINE_BINDIR="$(dirname "$(${READLINK_F} "${WINEBOOT_BIN}" 2>/dev/null)" 2>/dev/null)" + if [ -x "${WINE_BINDIR}/wine64" ]; then + # Workaround case where wine is in path, but wine64 is only in Wine's bindir + WINE64="${WINE_BINDIR}/wine64" + fi + else + # Handle case where wine binaries (or binary wrappers) have a suffix + WINE64="$(dirname "${WINE}")/" + [ "${WINE64}" = "./" ] && WINE64="" + WINE64="${WINE64}$(basename "${WINE}" | sed 's/^wine/wine64/')" + fi fi WINE_ARCH="${WINE64}" WINE_MULTI="${WINE}" From 6f91bcec85eb4286a74d378b1473804b5d8e6447 Mon Sep 17 00:00:00 2001 From: Jens Reyer Date: Fri, 23 Feb 2024 03:20:49 +0100 Subject: [PATCH 22/23] winetricks_get_file_arch: try workaround for scripts if arch is unknown --- src/winetricks | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/src/winetricks b/src/winetricks index 5208e13f3..f7e6a20ab 100755 --- a/src/winetricks +++ b/src/winetricks @@ -1078,7 +1078,7 @@ w_expand_env() winetricks_early_wine_arch cmd.exe /c echo "%$1%" } -# Determine what architecture a binary file is built for +# Determine what architecture a binary file is built for, silently continue in case of failure. winetricks_get_file_arch() { _W_file="$1" @@ -1089,7 +1089,7 @@ winetricks_get_file_arch() "arm64") _W_file_arch="arm64" ;; "i386") _W_file_arch="i386" ;; "x86_64") _W_file_arch="x86_64" ;; - *) w_die "Unknown file arch: ${_W_lipo_output}" ;; + *) _W_file_arch="" ;; esac else # Assume ELF binaries for everything else @@ -1099,7 +1099,7 @@ winetricks_get_file_arch() "03"|"06") _W_file_arch="i386" ;; "b7") _W_file_arch="aarch64" ;; "28") _W_file_arch="aarch32" ;; - *) w_die "Unknown file arch: ${_W_ob_output}";; + *) _W_file_arch="" ;; esac fi @@ -5097,8 +5097,39 @@ winetricks_set_wineprefix() WINEBOOT_BIN="$(dirname "${WINESERVER_BIN}")/$(basename "${WINESERVER_BIN}"|sed 's,wineserver,wineboot,')" _W_wineserver_binary_arch="$(winetricks_get_file_arch "${WINESERVER_BIN}")" + if [ -z "${_W_wineserver_binary_arch}" ]; then + # wineserver might be a script calling a binary in Wine's bindir. + if [ -z "${WINE_BINDIR}" ] && [ -x "${WINEBOOT_BIN}" ]; then + WINE_BINDIR="$(dirname "$(${READLINK_F} "${WINEBOOT_BIN}" 2>/dev/null)" 2>/dev/null)" + fi + # wineserver in Wine's bindir might be a script calling wineserver64 preferably over wineserver32 (Debian). + # Try these before testing wineserver itself + if [ -x "${WINE_BINDIR}/wineserver64" ]; then + _W_wineserver_binary_arch="$(winetricks_get_file_arch "${WINE_BINDIR}/wineserver64")" + elif [ -x "${WINE_BINDIR}/wineserver32" ]; then + _W_wineserver_binary_arch="$(winetricks_get_file_arch "${WINE_BINDIR}/wineserver32")" + elif [ -x "${WINE_BINDIR}/wineserver" ]; then + _W_wineserver_binary_arch="$(winetricks_get_file_arch "${WINE_BINDIR}/wineserver")" + fi + fi + if [ -z "${_W_wineserver_binary_arch}" ]; then + w_warn "Unknown file arch of ${WINESERVER_BIN}." + fi + WINE_BIN="$(which "${WINE}")" _W_wine_binary_arch="$(winetricks_get_file_arch "${WINE_BIN}")" + if [ -z "${_W_wine_binary_arch}" ]; then + # wine might be a script calling a binary in Wine's bindir. + if [ -z "${WINE_BINDIR}" ] && [ -x "${WINEBOOT_BIN}" ]; then + WINE_BINDIR="$(dirname "$(${READLINK_F} "${WINEBOOT_BIN}" 2>/dev/null)" 2>/dev/null)" + fi + if [ -x "${WINE_BINDIR}/wine" ]; then + _W_wine_binary_arch="$(winetricks_get_file_arch "${WINE_BINDIR}/wine")" + fi + fi + if [ -z "${_W_wine_binary_arch}" ]; then + w_warn "Unknown file arch of ${WINE_BIN}." + fi # determine wow64 type (new/old) # FIXME: check what upstream is calling them From 14156c0080484423594f3a3b4a0baa52e6b8d171 Mon Sep 17 00:00:00 2001 From: Jens Reyer Date: Wed, 28 Feb 2024 20:47:06 +0100 Subject: [PATCH 23/23] winetricks_set_wineprefix: warn once if wow64 unknown --- src/winetricks | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/winetricks b/src/winetricks index f7e6a20ab..c30256fbc 100755 --- a/src/winetricks +++ b/src/winetricks @@ -5133,7 +5133,9 @@ winetricks_set_wineprefix() # determine wow64 type (new/old) # FIXME: check what upstream is calling them - if [ "${_W_wineserver_binary_arch}" = "${_W_wine_binary_arch}" ]; then + if [ -z "${_W_wineserver_binary_arch}" ] || [ -z "${_W_wine_binary_arch}" ]; then + _W_wow64_style="unknown" + elif [ "${_W_wineserver_binary_arch}" = "${_W_wine_binary_arch}" ]; then _W_wow64_style="new" else _W_wow64_style="classic" @@ -5232,6 +5234,8 @@ winetricks_set_wineprefix() if [ "${_W_wow64_style}" = "new" ]; then w_warn "You apppear to be using Wine's new wow64 mode. Note that this is EXPERIMENTAL and not yet fully supported. If reporting an issue, be sure to mention this." + elif [ "${_W_wow64_style}" = "unknown" ]; then + w_warn "WoW64 type could not be detected." fi fi