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 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 %define oname winetricks
Name: wine-etersoft-winetricks Name: wine-etersoft-winetricks
Version: 20240223 Version: 20250102
Release: eter6 Release: eter1
Summary: Work around common problems in Wine Summary: Work around common problems in Wine
...@@ -11,17 +11,16 @@ Url: https://github.com/Winetricks/winetricks ...@@ -11,17 +11,16 @@ Url: https://github.com/Winetricks/winetricks
Packager: Vitaly Lipatov <lav@altlinux.ru> Packager: Vitaly Lipatov <lav@altlinux.ru>
#Source-url: %url/archive/%version/%name-%version.tar.gz # Source-url: %url/archive/%version/%name-%version.tar.gz
# Source-url: https://github.com/Winetricks/winetricks/commit/f87bf9e6a7c67a06487a1ef710c0d9c548ae6f01 #Source-url: https://github.com/Winetricks/winetricks/commit/f87bf9e6a7c67a06487a1ef710c0d9c548ae6f01
Source: %name-%version.tar Source: %name-%version.tar
Patch2: 0001-winetricks-try-use-xvt-as-terminal.patch Patch2: 0001-winetricks-try-use-xvt-as-terminal.patch
Patch10: 0001-Remove-unuseful-binary-arch-detection.patch Patch10: 0001-Rename-w_try_regsvr-to-w_try_regsvr32.patch
Patch11: 0002-add-w_expand_env32-and-w_expand_env64-and-using-them.patch Patch11: 0002-Remove-unuseful-binary-arch-detection.patch
Patch12: 0003-Rename-w_try_regsvr-to-w_try_regsvr32.patch Patch12: 0004-winetricks-added-cades-installation-eterbug-17080.patch
Patch13: 0004-winetricks-added-cades-installation-eterbug-17080.patch Patch13: 0005-workaround-for-guest-user.patch
Patch14: 0005-workaround-for-guest-user.patch
BuildArch: noarch BuildArch: noarch
...@@ -36,6 +35,7 @@ Requires: cabextract gzip unzip wget which ...@@ -36,6 +35,7 @@ Requires: cabextract gzip unzip wget which
# skip optional deps # skip optional deps
%filter_from_requires /^kde5-kdialog/d %filter_from_requires /^kde5-kdialog/d
%filter_from_requires /^kdialog/d
%filter_from_requires /^zenity/d %filter_from_requires /^zenity/d
#Requires: hicolor-icon-theme #Requires: hicolor-icon-theme
...@@ -60,7 +60,6 @@ or tweak various Wine settings individually. ...@@ -60,7 +60,6 @@ or tweak various Wine settings individually.
%patch11 -p1 %patch11 -p1
%patch12 -p1 %patch12 -p1
%patch13 -p1 %patch13 -p1
%patch14 -p1
# fix req. Disable autoreq at all? # fix req. Disable autoreq at all?
%__subst 's|fusermount|a= fusermount|' src/winetricks %__subst 's|fusermount|a= fusermount|' src/winetricks
...@@ -75,8 +74,6 @@ subst 's|winetricks_latest_version_check$||' src/winetricks ...@@ -75,8 +74,6 @@ subst 's|winetricks_latest_version_check$||' src/winetricks
%install %install
%makeinstall_std %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 # hack for empty output to console
subst 's|Terminal=false|Terminal=true|' %buildroot%_desktopdir/%oname.desktop subst 's|Terminal=false|Terminal=true|' %buildroot%_desktopdir/%oname.desktop
...@@ -90,11 +87,14 @@ desktop-file-validate %buildroot%_desktopdir/%oname.desktop ...@@ -90,11 +87,14 @@ desktop-file-validate %buildroot%_desktopdir/%oname.desktop
%_man1dir/%oname.1* %_man1dir/%oname.1*
%_iconsdir/hicolor/scalable/apps/%oname.svg %_iconsdir/hicolor/scalable/apps/%oname.svg
%_desktopdir/%oname.desktop %_desktopdir/%oname.desktop
%_datadir/metainfo/%oname.appdata.xml %_datadir/metainfo/io.github.winetricks.Winetricks.metainfo.xml
%_datadir/bash-completion/completions/winetricks %_datadir/bash-completion/completions/winetricks
#exclude %_datadir/appdata/%name.appdata.xml
%changelog %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 * Tue Oct 08 2024 Vitaly Lipatov <lav@altlinux.ru> 20240223-eter6
- redo opensymbol download, remove w_try_ar function (eterbug #17726) - redo opensymbol download, remove w_try_ar function (eterbug #17726)
- patches: redo opensymbol download, remove w_try_ar (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