Commit aedb36b3 authored by Vitaly Lipatov's avatar Vitaly Lipatov

20250102-eter1

- new version (20250102) with rpmgs script
parent d4e8a2d7
From a5fbd3bb1e8d45f1fb68ffe52c4e455aa093aa6c Mon Sep 17 00:00:00 2001
From: Vitaly Lipatov <lav@etersoft.ru>
Date: Tue, 20 Feb 2024 00:02:13 +0300
Subject: [PATCH 1/3] Remove unuseful binary arch detection
To: wine-devel <wine-devel@winehq.org>
---
src/winetricks | 53 +++++++++-----------------------------------------
1 file changed, 9 insertions(+), 44 deletions(-)
diff --git a/src/winetricks b/src/winetricks
index 4bdc9da..86a2570 100755
--- a/src/winetricks
+++ b/src/winetricks
@@ -1064,34 +1064,6 @@ w_expand_env()
winetricks_early_wine_arch cmd.exe /c echo "%$1%"
}
-# Determine what architecture a binary file is built for
-winetricks_get_file_arch()
-{
- _W_file="$1"
- # macOS uses Mach-O binaries, not ELF
- if [ "$(uname -s)" = "Darwin" ]; then
- _W_lipo_output="$(lipo -archs "${_W_file}")"
- case "${_W_lipo_output}" in
- "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}" ;;
- esac
- else
- # Assume ELF binaries for everything else
- _W_ob_output="$(od -An -t x1 -j 0x12 -N 1 "${_W_file}" | tr -d "[:space:]")"
- case "${_W_ob_output}" in
- "3e") _W_file_arch="x86_64" ;;
- "03"|"06") _W_file_arch="i386" ;;
- "b7") _W_file_arch="aarch64" ;;
- "28") _W_file_arch="aarch32" ;;
- *) w_die "Unknown file arch: ${_W_ob_output}";;
- esac
- fi
-
- echo "${_W_file_arch}"
-}
-
# Get the latest tagged release from github.com API
w_get_github_latest_release()
{
@@ -5060,20 +5032,6 @@ winetricks_set_wineprefix()
# Using the variable W_SYSTEM32_DLLS instead of SYSTEM32 because some stuff does go under system32 for both arch's
# e.g., spool/drivers/color
if test -d "${W_DRIVE_C}/windows/syswow64"; then
- # 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}")"
- _W_wineserver_binary_arch="$(winetricks_get_file_arch "${WINESERVER_BIN}")"
- WINE_BIN="$(which "${WINE}")"
- _W_wine_binary_arch="$(winetricks_get_file_arch "${WINE_BIN}")"
-
- # determine wow64 type (new/old)
- # FIXME: check what upstream is calling them
- if [ "${_W_wineserver_binary_arch}" = "${_W_wine_binary_arch}" ]; then
- _W_wow64_style="new"
- else
- _W_wow64_style="classic"
- fi
# Probably need fancier handling/checking, but for a basic start:
# Note 'wine' may be named 'wine-stable'/'wine-staging'/etc.):
@@ -5082,8 +5040,6 @@ winetricks_set_wineprefix()
# WINE_MULTI = generic wine, new name
if [ -n "${WINE64}" ]; then
true
- elif [ "${_W_wow64_style}" = "new" ]; then
- WINE64="${WINE}"
elif [ "${WINE%??}64" = "${WINE}" ]; then
WINE64="${WINE}"
elif command -v "${WINE}64" >/dev/null 2>&1; then
@@ -5093,7 +5049,16 @@ winetricks_set_wineprefix()
WINE64="$(dirname "${WINE}")/"
[ "${WINE64}" = "./" ] && WINE64=""
WINE64="${WINE64}$(basename "${WINE}" | sed 's/^wine/wine64/')"
+ test -x "${WINE64}" || WINE64="${WINE}"
+ fi
+
+ # if we can't detect wine64 command, it is the new wow64 mode
+ if echo "${WINE64}" | grep -q "wine64" ; then
+ _W_wow64_style="classic"
+ else
+ _W_wow64_style="new"
fi
+
WINE_ARCH="${WINE64}"
WINE_MULTI="${WINE}"
W_ARCH=win64
--
2.42.1
From 57ba01a469d91f1e9811eb138c2e10d1aec26b0f Mon Sep 17 00:00:00 2001
From 81bd2cf3ab12a24ec5ed9440e389c7a51caf1f6b Mon Sep 17 00:00:00 2001
From: Vitaly Lipatov <lav@etersoft.ru>
Date: Tue, 20 Feb 2024 16:16:19 +0300
Subject: [PATCH 3/3] Rename w_try_regsvr() to w_try_regsvr32()
Subject: [PATCH 1/2] Rename w_try_regsvr() to w_try_regsvr32()
To: wine-devel <wine-devel@winehq.org>
---
......@@ -9,10 +9,10 @@ To: wine-devel <wine-devel@winehq.org>
1 file changed, 51 insertions(+), 51 deletions(-)
diff --git a/src/winetricks b/src/winetricks
index 7db190d..6733ed0 100755
index 34d8670..0204c63 100755
--- a/src/winetricks
+++ b/src/winetricks
@@ -882,7 +882,7 @@ w_try_regedit64()
@@ -872,7 +872,7 @@ w_try_regedit64()
w_try "${WINE64}" ${cmdc} "C:\\windows\\regedit.exe" ${W_OPT_UNATTENDED:+/S} "$@"
}
......@@ -21,7 +21,7 @@ index 7db190d..6733ed0 100755
{
w_try "${WINE}" "${W_SYSTEM32_DLLS_WIN}\\regsvr32.exe" ${W_OPT_UNATTENDED:+/S} "$@"
}
@@ -5915,7 +5915,7 @@ load_amstream()
@@ -5333,7 +5333,7 @@ load_amstream()
w_override_dlls native,builtin amstream
......@@ -30,7 +30,7 @@ index 7db190d..6733ed0 100755
if [ "${W_ARCH}" = "win64" ]; then
helper_win7sp1_x64 amd64_microsoft-windows-directshow-other_31bf3856ad364e35_6.1.7601.17514_none_6b778d68f75a1a54/amstream.dll
@@ -6102,9 +6102,9 @@ load_comctl32ocx()
@@ -5545,9 +5545,9 @@ load_comctl32ocx()
{
helper_vb6sp6 "${W_SYSTEM32_DLLS}" comctl32.ocx mscomctl.ocx mscomct2.ocx
......@@ -43,7 +43,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -6121,7 +6121,7 @@ load_comdlg32ocx()
@@ -5564,7 +5564,7 @@ load_comdlg32ocx()
{
helper_vb6sp6 "${W_TMP}" ComDlg32.ocx
w_try mv "${W_TMP}/ComDlg32.ocx" "${W_SYSTEM32_DLLS}/comdlg32.ocx"
......@@ -52,7 +52,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -6851,7 +6851,7 @@ load_devenum()
@@ -6313,7 +6313,7 @@ load_devenum()
w_try_cabextract -d "${W_TMP}" -L -F 'dxnt.cab' "${W_CACHE}/directx9/${DIRECTX_NAME}"
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'devenum.dll' "${W_TMP}/dxnt.cab"
w_override_dlls native devenum
......@@ -61,7 +61,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -6871,7 +6871,7 @@ load_dinput()
@@ -6333,7 +6333,7 @@ load_dinput()
w_try_cabextract -d "${W_TMP}" -L -F 'dxnt.cab' "${W_CACHE}"/directx9/${DIRECTX_NAME}
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dinput.dll' "${W_TMP}/dxnt.cab"
w_override_dlls native dinput
......@@ -70,7 +70,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -6975,10 +6975,10 @@ load_directplay()
@@ -6437,10 +6437,10 @@ load_directplay()
w_override_dlls native dplaysvr.exe dplayx dpmodemx dpnet dpnhpast dpnhupnp dpnsvr.exe dpwsockx
......@@ -85,7 +85,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -7019,9 +7019,9 @@ load_dpvoice()
@@ -6481,9 +6481,9 @@ load_dpvoice()
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dpvacm.dll' "${x}"
done
w_override_dlls native dpvoice dpvvox dpvacm
......@@ -98,7 +98,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -7041,8 +7041,8 @@ load_dsdmo()
@@ -6503,8 +6503,8 @@ load_dsdmo()
w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dsdmo.dll' "${W_TMP}/dxnt.cab"
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dsdmoprp.dll' "${W_TMP}/dxnt.cab"
......@@ -109,7 +109,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -7104,7 +7104,7 @@ load_dxtrans()
@@ -6602,7 +6602,7 @@ load_dxtrans()
helper_winxpsp3 i386/dxtrans.dl_
w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/dxtrans.dl_
w_override_dlls native,builtin dxtrans
......@@ -118,7 +118,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -8645,7 +8645,7 @@ load_dmband()
@@ -7814,7 +7814,7 @@ load_dmband()
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dmband.dll' "${W_TMP}/dxnt.cab"
w_override_dlls native dmband
......@@ -127,7 +127,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -8666,7 +8666,7 @@ load_dmcompos()
@@ -7835,7 +7835,7 @@ load_dmcompos()
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dmcompos.dll' "${W_TMP}/dxnt.cab"
w_override_dlls native dmcompos
......@@ -136,7 +136,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -8687,7 +8687,7 @@ load_dmime()
@@ -7856,7 +7856,7 @@ load_dmime()
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dmime.dll' "${W_TMP}/dxnt.cab"
w_override_dlls native dmime
......@@ -145,7 +145,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -8708,7 +8708,7 @@ load_dmloader()
@@ -7877,7 +7877,7 @@ load_dmloader()
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dmloader.dll' "${W_TMP}/dxnt.cab"
w_override_dlls native dmloader
......@@ -154,7 +154,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -8729,7 +8729,7 @@ load_dmscript()
@@ -7898,7 +7898,7 @@ load_dmscript()
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dmscript.dll' "${W_TMP}/dxnt.cab"
w_override_dlls native dmscript
......@@ -163,7 +163,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -8750,7 +8750,7 @@ load_dmstyle()
@@ -7919,7 +7919,7 @@ load_dmstyle()
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dmstyle.dll' "${W_TMP}/dxnt.cab"
w_override_dlls native dmstyle
......@@ -172,7 +172,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -8771,7 +8771,7 @@ load_dmsynth()
@@ -7940,7 +7940,7 @@ load_dmsynth()
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dmsynth.dll' "${W_TMP}/dxnt.cab"
w_override_dlls native dmsynth
......@@ -181,7 +181,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -8792,7 +8792,7 @@ load_dmusic()
@@ -7961,7 +7961,7 @@ load_dmusic()
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dmusic.dll' "${W_TMP}/dxnt.cab"
w_override_dlls native dmusic
......@@ -190,7 +190,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -8813,7 +8813,7 @@ load_dswave()
@@ -7982,7 +7982,7 @@ load_dswave()
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dswave.dll' "${W_TMP}/dxnt.cab"
w_override_dlls native dswave
......@@ -199,7 +199,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -10191,7 +10191,7 @@ load_dxdiagn()
@@ -9468,7 +9468,7 @@ load_dxdiagn()
helper_win7sp1 x86_microsoft-windows-d..x-directxdiagnostic_31bf3856ad364e35_6.1.7601.17514_none_25cb021dbc0611db/dxdiagn.dll
w_try_cp_dll "${W_TMP}/x86_microsoft-windows-d..x-directxdiagnostic_31bf3856ad364e35_6.1.7601.17514_none_25cb021dbc0611db/dxdiagn.dll" "${W_SYSTEM32_DLLS}/dxdiagn.dll"
w_override_dlls native,builtin dxdiagn
......@@ -208,7 +208,7 @@ index 7db190d..6733ed0 100755
if [ "${W_ARCH}" = "win64" ]; then
helper_win7sp1_x64 amd64_microsoft-windows-d..x-directxdiagnostic_31bf3856ad364e35_6.1.7601.17514_none_81e99da174638311/dxdiagn.dll
@@ -10218,7 +10218,7 @@ load_dxdiagn_feb2010()
@@ -9495,7 +9495,7 @@ load_dxdiagn_feb2010()
w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dxdiagn.dll' "${W_TMP}/dxnt.cab"
w_override_dlls native dxdiagn
......@@ -217,7 +217,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -10926,7 +10926,7 @@ load_icodecs()
@@ -10205,7 +10205,7 @@ load_icodecs()
# https://support.britannica.com/other/touchthesky/win/issues/TSTUw_150.htm
# https://appdb.winehq.org/objectManager.php?sClass=version&iId=7091
w_override_dlls native,builtin ir50_32
......@@ -226,7 +226,7 @@ index 7db190d..6733ed0 100755
# Apparently some codecs are missing, see https://github.com/Winetricks/winetricks/issues/302
# Download at https://www.moviecodec.com/download-codec-packs/indeo-codecs-legacy-package-31/
@@ -11053,7 +11053,7 @@ load_itircl()
@@ -10332,7 +10332,7 @@ load_itircl()
w_try_cabextract -d "${W_TMP}" -F hhupd.exe "${W_CACHE}"/hhw/htmlhelp.exe
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -F itircl.dll "${W_TMP}"/hhupd.exe
w_override_dlls native itircl
......@@ -235,7 +235,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -11074,7 +11074,7 @@ load_itss()
@@ -10353,7 +10353,7 @@ load_itss()
w_try_cabextract -d "${W_TMP}" -F hhupd.exe "${W_CACHE}"/hhw/htmlhelp.exe
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -F itss.dll "${W_TMP}"/hhupd.exe
w_override_dlls native itss
......@@ -244,7 +244,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -11221,7 +11221,7 @@ load_l3codecx()
@@ -10500,7 +10500,7 @@ load_l3codecx()
w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'l3codecx.ax' "${W_TMP}/dxnt.cab"
......@@ -253,7 +253,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -11582,7 +11582,7 @@ load_msdxmocx()
@@ -10861,7 +10861,7 @@ load_msdxmocx()
w_download http://hell.pl/agnus/windows95/mpfull.exe a39b2b9735cedd513fcb78f8634695d35073e9d7e865e536a0da6db38c7225e4
w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_CACHE}/${W_PACKAGE}/${file1}"
......@@ -262,7 +262,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -11599,7 +11599,7 @@ load_msflxgrd()
@@ -10878,7 +10878,7 @@ load_msflxgrd()
{
helper_vb6sp6 "${W_TMP}" MSFlxGrd.ocx
w_try mv "${W_TMP}/MSFlxGrd.ocx" "${W_SYSTEM32_DLLS}/msflxgrd.ocx"
......@@ -271,7 +271,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -11616,7 +11616,7 @@ load_mshflxgd()
@@ -10895,7 +10895,7 @@ load_mshflxgd()
{
helper_vb6sp6 "${W_TMP}" MShflxgd.ocx
w_try mv "${W_TMP}/MShflxgd.ocx" "${W_SYSTEM32_DLLS}/mshflxgd.ocx"
......@@ -280,7 +280,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -11689,7 +11689,7 @@ load_msmask()
@@ -10968,7 +10968,7 @@ load_msmask()
{
helper_vb6sp6 "${W_TMP}" msmask32.ocx
w_try mv "${W_TMP}/msmask32.ocx" "${W_SYSTEM32_DLLS}/msmask32.ocx"
......@@ -289,7 +289,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -12178,7 +12178,7 @@ load_pngfilt()
@@ -11459,7 +11459,7 @@ load_pngfilt()
helper_winxpsp3 i386/pngfilt.dl_
w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/pngfilt.dl_
......@@ -298,7 +298,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -12198,7 +12198,7 @@ load_prntvpt()
@@ -11569,7 +11569,7 @@ load_prntvpt()
w_try_cp_dll "${W_TMP}/x86_microsoft-windows-p..g-printticket-win32_31bf3856ad364e35_6.1.7601.17514_none_1562129afd710f2c/prntvpt.dll" "${W_SYSTEM32_DLLS}/prntvpt.dll"
w_override_dlls native,builtin prntvpt
......@@ -307,7 +307,7 @@ index 7db190d..6733ed0 100755
if [ "${W_ARCH}" = "win64" ]; then
helper_win7sp1_x64 amd64_microsoft-windows-p..g-printticket-win32_31bf3856ad364e35_6.1.7601.17514_none_7180ae1eb5ce8062/prntvpt.dll
@@ -12293,7 +12293,7 @@ load_qasf()
@@ -11664,7 +11664,7 @@ load_qasf()
w_try_cp_dll "${W_TMP}/x86_microsoft-windows-directshow-asf_31bf3856ad364e35_6.1.7601.17514_none_1cc4e9c15ccc8ae8/qasf.dll" "${W_SYSTEM32_DLLS}/qasf.dll"
w_override_dlls native,builtin qasf
......@@ -316,7 +316,7 @@ index 7db190d..6733ed0 100755
if [ "${W_ARCH}" = "win64" ]; then
helper_win7sp1_x64 amd64_microsoft-windows-directshow-asf_31bf3856ad364e35_6.1.7601.17514_none_78e385451529fc1e/qasf.dll
@@ -12317,7 +12317,7 @@ load_qcap()
@@ -11688,7 +11688,7 @@ load_qcap()
helper_win7sp1 x86_microsoft-windows-directshow-capture_31bf3856ad364e35_6.1.7601.17514_none_bae08d1e7dcccf2a/qcap.dll
w_try_cp_dll "${W_TMP}/x86_microsoft-windows-directshow-capture_31bf3856ad364e35_6.1.7601.17514_none_bae08d1e7dcccf2a/qcap.dll" "${W_SYSTEM32_DLLS}/qcap.dll"
w_override_dlls native,builtin qcap
......@@ -325,7 +325,7 @@ index 7db190d..6733ed0 100755
if [ "${W_ARCH}" = "win64" ]; then
helper_win7sp1_x64 amd64_microsoft-windows-directshow-capture_31bf3856ad364e35_6.1.7601.17514_none_16ff28a2362a4060/qcap.dll
@@ -12341,7 +12341,7 @@ load_qdvd()
@@ -11712,7 +11712,7 @@ load_qdvd()
helper_win7sp1 x86_microsoft-windows-directshow-dvdsupport_31bf3856ad364e35_6.1.7601.17514_none_562994bd321aac67/qdvd.dll
w_try_cp_dll "${W_TMP}/x86_microsoft-windows-directshow-dvdsupport_31bf3856ad364e35_6.1.7601.17514_none_562994bd321aac67/qdvd.dll" "${W_SYSTEM32_DLLS}/qdvd.dll"
w_override_dlls native,builtin qdvd
......@@ -334,7 +334,7 @@ index 7db190d..6733ed0 100755
if [ "${W_ARCH}" = "win64" ]; then
helper_win7sp1_x64 amd64_microsoft-windows-directshow-dvdsupport_31bf3856ad364e35_6.1.7601.17514_none_b2483040ea781d9d/qdvd.dll
@@ -12365,7 +12365,7 @@ load_qedit()
@@ -11736,7 +11736,7 @@ load_qedit()
helper_win7sp1 x86_microsoft-windows-qedit_31bf3856ad364e35_6.1.7601.17514_none_5ca34698a5a970d2/qedit.dll
w_try_cp_dll "${W_TMP}/x86_microsoft-windows-qedit_31bf3856ad364e35_6.1.7601.17514_none_5ca34698a5a970d2/qedit.dll" "${W_SYSTEM32_DLLS}/qedit.dll"
w_override_dlls native,builtin qedit
......@@ -343,7 +343,7 @@ index 7db190d..6733ed0 100755
if [ "${W_ARCH}" = "win64" ]; then
helper_win7sp1_x64 amd64_microsoft-windows-qedit_31bf3856ad364e35_6.1.7601.17514_none_b8c1e21c5e06e208/qedit.dll
@@ -12389,7 +12389,7 @@ load_quartz()
@@ -11760,7 +11760,7 @@ load_quartz()
helper_win7sp1 x86_microsoft-windows-directshow-core_31bf3856ad364e35_6.1.7601.17514_none_a877a1cc4c284497/quartz.dll
w_try_cp_dll "${W_TMP}/x86_microsoft-windows-directshow-core_31bf3856ad364e35_6.1.7601.17514_none_a877a1cc4c284497/quartz.dll" "${W_SYSTEM32_DLLS}/quartz.dll"
w_override_dlls native,builtin quartz
......@@ -352,7 +352,7 @@ index 7db190d..6733ed0 100755
if [ "${W_ARCH}" = "win64" ]; then
helper_win7sp1_x64 amd64_microsoft-windows-directshow-core_31bf3856ad364e35_6.1.7601.17514_none_04963d500485b5cd/quartz.dll
@@ -12417,7 +12417,7 @@ load_quartz_feb2010()
@@ -11788,7 +11788,7 @@ load_quartz_feb2010()
w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F quartz.dll "${W_TMP}/dxnt.cab"
w_override_dlls native,builtin quartz
......@@ -361,7 +361,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -12570,7 +12570,7 @@ w_metadata richtx32 dlls \
@@ -11941,7 +11941,7 @@ w_metadata richtx32 dlls \
load_richtx32()
{
helper_vb6sp6 "${W_SYSTEM32_DLLS}" richtx32.ocx
......@@ -370,7 +370,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -12596,7 +12596,7 @@ load_sapi()
@@ -11967,7 +11967,7 @@ load_sapi()
helper_win7sp1 x86_microsoft-windows-speechcommon_31bf3856ad364e35_6.1.7601.17514_none_d809b28230ecfe46/sapi.dll
w_try_cp_dll "${W_TMP}/x86_microsoft-windows-speechcommon_31bf3856ad364e35_6.1.7601.17514_none_d809b28230ecfe46/sapi.dll" "${W_SYSTEM32_DLLS}/sapi.dll"
w_override_dlls native sapi
......@@ -379,7 +379,7 @@ index 7db190d..6733ed0 100755
if [ "${W_ARCH}" = "win64" ]; then
helper_win7sp1_x64 amd64_microsoft-windows-speechcommon_31bf3856ad364e35_6.1.7601.17514_none_34284e05e94a6f7c/sapi.dll
@@ -12750,7 +12750,7 @@ load_tabctl32()
@@ -12121,7 +12121,7 @@ load_tabctl32()
{
helper_vb6sp6 "${W_TMP}" TabCtl32.ocx
w_try mv "${W_TMP}/TabCtl32.ocx" "${W_SYSTEM32_DLLS}/tabctl32.ocx"
......@@ -388,7 +388,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -13981,7 +13981,7 @@ load_wsh57()
@@ -13390,7 +13390,7 @@ load_wsh57()
# Wine doesn't provide the other dll's (yet?)
w_override_dlls native,builtin jscript scrrun vbscript cscript.exe wscript.exe
......@@ -397,7 +397,7 @@ index 7db190d..6733ed0 100755
}
#----------------------------------------------------------------
@@ -14020,12 +14020,12 @@ load_xact()
@@ -13429,12 +13429,12 @@ load_xact()
# Register xactengine?_?.dll
for x in "${W_SYSTEM32_DLLS}"/xactengine* ; do
......@@ -413,5 +413,5 @@ index 7db190d..6733ed0 100755
}
--
2.42.1
2.42.4
From aaf289cc98d5c86c3b466d93228e1cbf46e3408e Mon Sep 17 00:00:00 2001
From: Vitaly Lipatov <lav@etersoft.ru>
Date: Thu, 6 Feb 2025 12:27:43 +0300
Subject: [PATCH 2/2] Remove unuseful binary arch detection
To: wine-devel <wine-devel@winehq.org>
---
src/winetricks | 81 ++------------------------------------------------
1 file changed, 2 insertions(+), 79 deletions(-)
diff --git a/src/winetricks b/src/winetricks
index 0204c63..1f5e1cc 100755
--- a/src/winetricks
+++ b/src/winetricks
@@ -1054,34 +1054,6 @@ w_expand_env()
winetricks_early_wine_arch cmd.exe /c "chcp 65001 > nul & echo %$1%"
}
-# Determine what architecture a binary file is built for, silently continue in case of failure.
-winetricks_get_file_arch()
-{
- _W_file="$1"
- # macOS uses Mach-O binaries, not ELF
- if [ "$(uname -s)" = "Darwin" ]; then
- _W_lipo_output="$(lipo -archs "${_W_file}")"
- case "${_W_lipo_output}" in
- "arm64") _W_file_arch="arm64" ;;
- "i386") _W_file_arch="i386" ;;
- "x86_64") _W_file_arch="x86_64" ;;
- *) _W_file_arch="" ;;
- esac
- else
- # Assume ELF binaries for everything else
- _W_ob_output="$(od -An -t x1 -j 0x12 -N 1 "${_W_file}" | tr -d "[:space:]")"
- case "${_W_ob_output}" in
- "3e") _W_file_arch="x86_64" ;;
- "03"|"06") _W_file_arch="i386" ;;
- "b7") _W_file_arch="aarch64" ;;
- "28") _W_file_arch="aarch32" ;;
- *) _W_file_arch="" ;;
- esac
- fi
-
- echo "${_W_file_arch}"
-}
-
# Get the latest tagged release from github.com API
w_get_github_latest_release()
{
@@ -4428,52 +4400,9 @@ winetricks_set_wineprefix()
fi
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
-
if [ -z "${WINE_BIN}" ]; then
WINE_BIN="$(command -v "${WINE}")"
fi
- _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
- 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"
- fi
# Probably need fancier handling/checking, but for a basic start:
# Note 'wine' may be named 'wine-stable'/'wine-staging'/etc.):
@@ -4482,8 +4411,6 @@ winetricks_set_wineprefix()
# WINE_MULTI = generic wine, new name
if [ -n "${WINE64}" ]; then
true
- elif [ "${_W_wow64_style}" = "new" ]; then
- WINE64="${WINE}"
elif [ "${WINE%??}64" = "${WINE}" ]; then
WINE64="${WINE}"
elif command -v "${WINE}64" >/dev/null 2>&1; then
@@ -4494,6 +4421,8 @@ winetricks_set_wineprefix()
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"
+ else
+ WINE64="${WINE_BINDIR}/wine"
fi
else
# Handle case where wine binaries (or binary wrappers) have a suffix
@@ -4566,15 +4495,9 @@ winetricks_set_wineprefix()
*) w_warn "You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug." ;;
esac
- if [ "${_W_wow64_style}" = "new" ]; then
- w_warn "You appear 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
else
- _W_wow64_style="none"
WINE64="false"
WINE_ARCH="${WINE}"
WINE_MULTI="${WINE}"
--
2.42.4
From 815a01132de8fbb2b66f68a29e0aa2f024b0541c Mon Sep 17 00:00:00 2001
From: Vitaly Lipatov <lav@etersoft.ru>
Date: Tue, 20 Feb 2024 12:12:31 +0300
Subject: [PATCH 2/3] add w_expand_env32 and w_expand_env64 and using them to
get correct paths
To: wine-devel <wine-devel@winehq.org>
---
src/winetricks | 38 ++++++++++++++++++++++++--------------
1 file changed, 24 insertions(+), 14 deletions(-)
diff --git a/src/winetricks b/src/winetricks
index 86a2570..7db190d 100755
--- a/src/winetricks
+++ b/src/winetricks
@@ -1064,6 +1064,16 @@ w_expand_env()
winetricks_early_wine_arch cmd.exe /c echo "%$1%"
}
+w_expand_env32()
+{
+ winetricks_early_wine "${W_SYSTEM32_DLLS_WIN}\\cmd.exe" /c echo "%$1%"
+}
+
+w_expand_env64()
+{
+ WINE=${WINE64} winetricks_early_wine "${W_SYSTEM64_DLLS_WIN64}\\cmd.exe" /c echo "%$1%"
+}
+
# Get the latest tagged release from github.com API
w_get_github_latest_release()
{
@@ -5063,9 +5073,6 @@ winetricks_set_wineprefix()
WINE_MULTI="${WINE}"
W_ARCH=win64
- W_PROGRAMS_WIN="$(w_expand_env ProgramFiles)"
- W_PROGRAMS_UNIX="$(w_pathconv -u "${W_PROGRAMS_WIN}")"
-
# Common variable for 32-bit dlls on win32/win64:
W_SYSTEM32_DLLS="${W_WINDIR_UNIX}/syswow64"
W_SYSTEM32_DLLS_WIN="C:\\windows\\syswow64"
@@ -5074,18 +5081,21 @@ winetricks_set_wineprefix()
W_SYSTEM64_DLLS_WIN32="C:\\windows\\sysnative" # path to access 64-bit dlls from 32-bit apps
W_SYSTEM64_DLLS_WIN64="C:\\windows\\system32" # path to access 64-bit dlls from 64-bit apps
+ W_PROGRAMS_WIN="$(w_expand_env64 ProgramFiles)"
+ W_PROGRAMS_UNIX="$(w_pathconv -u "${W_PROGRAMS_WIN}")"
+
# There's also ProgramW6432, which =%ProgramFiles%(but only available when running under a 64 bit OS)
# See https://ss64.com/nt/syntax-variables.html
- W_PROGRAMW6432_WIN="$(w_expand_env ProgramW6432)"
+ W_PROGRAMW6432_WIN="$(w_expand_env64 ProgramW6432)"
W_PROGRAMW6432_UNIX="$(w_pathconv -u "${W_PROGRAMW6432_WIN}")"
# 64-bit Windows has a second directory for program files
- W_PROGRAMS_X86_WIN="${W_PROGRAMS_WIN} (x86)"
- W_PROGRAMS_X86_UNIX="${W_PROGRAMS_UNIX} (x86)"
+ W_PROGRAMS_X86_WIN="$(w_expand_env32 ProgramFiles)"
+ W_PROGRAMS_X86_UNIX="$(w_pathconv -u "${W_PROGRAMS_X86_WIN}")"
- W_COMMONFILES_X86_WIN="$(w_expand_env CommonProgramFiles\(x86\))"
+ W_COMMONFILES_X86_WIN="$(w_expand_env64 CommonProgramFiles\(x86\))"
W_COMMONFILES_X86="$(w_pathconv -u "${W_COMMONFILES_X86_WIN}")"
- W_COMMONFILES_WIN="$(w_expand_env CommonProgramW6432)"
+ W_COMMONFILES_WIN="$(w_expand_env64 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
@@ -5130,9 +5140,6 @@ winetricks_set_wineprefix()
WINE_MULTI="${WINE}"
W_ARCH=win32
- W_PROGRAMS_WIN="$(w_expand_env ProgramFiles)"
- W_PROGRAMS_UNIX="$(w_pathconv -u "${W_PROGRAMS_WIN}")"
-
# Common variable for 32-bit dlls on win32/win64:
W_SYSTEM32_DLLS="${W_WINDIR_UNIX}/system32"
W_SYSTEM32_DLLS_WIN="C:\\windows\\system32"
@@ -5143,19 +5150,22 @@ winetricks_set_wineprefix()
W_SYSTEM64_DLLS_WIN32="C:\\does-not-exist-on-win32" # path to access 64-bit dlls from 32-bit apps
W_SYSTEM64_DLLS_WIN64="C:\\does-not-exist-on-win32" # path to access 64-bit dlls from 64-bit apps
+ W_PROGRAMS_WIN="$(w_expand_env32 ProgramFiles)"
+ W_PROGRAMS_UNIX="$(w_pathconv -u "${W_PROGRAMS_WIN}")"
+
W_PROGRAMS_X86_WIN="${W_PROGRAMS_WIN}"
W_PROGRAMS_X86_UNIX="${W_PROGRAMS_UNIX}"
- W_COMMONFILES_X86_WIN="$(w_expand_env CommonProgramFiles)"
+ W_COMMONFILES_X86_WIN="$(w_expand_env32 CommonProgramFiles)"
W_COMMONFILES_X86="$(w_pathconv -u "${W_COMMONFILES_X86_WIN}")"
- W_COMMONFILES_WIN="$(w_expand_env CommonProgramFiles)"
+ W_COMMONFILES_WIN="$(w_expand_env32 CommonProgramFiles)"
W_COMMONFILES="$(w_pathconv -u "${W_COMMONFILES_WIN}")"
fi
## Arch independent variables:
# Note: using AppData since it's arch independent
- W_APPDATA_WIN="$(w_expand_env AppData)"
+ W_APPDATA_WIN="$(w_expand_env32 AppData)"
W_APPDATA_UNIX="$(w_pathconv -u "${W_APPDATA_WIN}")"
case "${W_APPDATA_WIN}" in
--
2.42.1
%define oname winetricks
Name: wine-etersoft-winetricks
Version: 20240223
Release: eter6
Version: 20250102
Release: eter1
Summary: Work around common problems in Wine
......@@ -11,17 +11,16 @@ Url: https://github.com/Winetricks/winetricks
Packager: Vitaly Lipatov <lav@altlinux.ru>
#Source-url: %url/archive/%version/%name-%version.tar.gz
# Source-url: https://github.com/Winetricks/winetricks/commit/f87bf9e6a7c67a06487a1ef710c0d9c548ae6f01
# Source-url: %url/archive/%version/%name-%version.tar.gz
#Source-url: https://github.com/Winetricks/winetricks/commit/f87bf9e6a7c67a06487a1ef710c0d9c548ae6f01
Source: %name-%version.tar
Patch2: 0001-winetricks-try-use-xvt-as-terminal.patch
Patch10: 0001-Remove-unuseful-binary-arch-detection.patch
Patch11: 0002-add-w_expand_env32-and-w_expand_env64-and-using-them.patch
Patch12: 0003-Rename-w_try_regsvr-to-w_try_regsvr32.patch
Patch13: 0004-winetricks-added-cades-installation-eterbug-17080.patch
Patch14: 0005-workaround-for-guest-user.patch
Patch10: 0001-Rename-w_try_regsvr-to-w_try_regsvr32.patch
Patch11: 0002-Remove-unuseful-binary-arch-detection.patch
Patch12: 0004-winetricks-added-cades-installation-eterbug-17080.patch
Patch13: 0005-workaround-for-guest-user.patch
BuildArch: noarch
......@@ -36,6 +35,7 @@ Requires: cabextract gzip unzip wget which
# skip optional deps
%filter_from_requires /^kde5-kdialog/d
%filter_from_requires /^kdialog/d
%filter_from_requires /^zenity/d
#Requires: hicolor-icon-theme
......@@ -60,7 +60,6 @@ or tweak various Wine settings individually.
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
# fix req. Disable autoreq at all?
%__subst 's|fusermount|a= fusermount|' src/winetricks
......@@ -75,8 +74,6 @@ subst 's|winetricks_latest_version_check$||' src/winetricks
%install
%makeinstall_std
# some tarballs do not install appdata
install -m0644 -D -t %buildroot%_datadir/metainfo src/%oname.appdata.xml
# hack for empty output to console
subst 's|Terminal=false|Terminal=true|' %buildroot%_desktopdir/%oname.desktop
......@@ -90,11 +87,14 @@ desktop-file-validate %buildroot%_desktopdir/%oname.desktop
%_man1dir/%oname.1*
%_iconsdir/hicolor/scalable/apps/%oname.svg
%_desktopdir/%oname.desktop
%_datadir/metainfo/%oname.appdata.xml
%_datadir/metainfo/io.github.winetricks.Winetricks.metainfo.xml
%_datadir/bash-completion/completions/winetricks
#exclude %_datadir/appdata/%name.appdata.xml
%changelog
* Wed Feb 05 2025 Vitaly Lipatov <lav@altlinux.ru> 20250102-eter1
- new version (20250102) with rpmgs script
- disable 0002-add-w_expand_env32-and-w_expand_env64-and-using-them.patch
* Tue Oct 08 2024 Vitaly Lipatov <lav@altlinux.ru> 20240223-eter6
- redo opensymbol download, remove w_try_ar function (eterbug #17726)
- patches: redo opensymbol download, remove w_try_ar (eterbug #17726)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment