Skip to content

Commit

Permalink
Revert "Switch our _NOLIB32 option that used to simply disable 32-bit…
Browse files Browse the repository at this point in the history
… support altogether (making worthless builds) to using Wine 8.0+ WoW64 (running 32-bit apps through 64-bit). This is still WIP, so disable by default."

This reverts commit 3c980ab.
  • Loading branch information
marzent committed Jun 25, 2023
1 parent c8e1bbb commit 0546d3e
Show file tree
Hide file tree
Showing 10 changed files with 109 additions and 180 deletions.
3 changes: 0 additions & 3 deletions proton-tkg/proton-tkg-profiles/advanced-customization.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ _pefixup="objcopy"
# Set to true to forcefully disable using ccache (else it'll be used if detected).
_NOCCACHE="false"

# Set to true to disable usage of 32-bit unix libs and use Wine 8.0+ experimental WoW64 for 32-bit apps. Default is "false" as it's still under development.
_NOLIB32="false"

# Optionally set additional make dependencies for makepkg builds. Multiple elements should be separated by a space.
# Only affects makepkg
_user_makedeps=""
Expand Down
3 changes: 0 additions & 3 deletions proton-tkg/proton-tkg-profiles/sample-external-config.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,6 @@ _pefixup="objcopy"
# Set to true to forcefully disable using ccache (else it'll be used if detected).
_NOCCACHE="false"

# Set to true to disable usage of 32-bit unix libs and use Wine 8.0+ experimental WoW64 for 32-bit apps. Default is "false" as it's still under development.
_NOLIB32="false"

# Optionally set additional make dependencies for makepkg builds. Multiple elements should be separated by a space.
# Only affects makepkg
_user_makedeps=""
Expand Down
196 changes: 82 additions & 114 deletions proton-tkg/proton-tkg.sh

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions proton-tkg/proton_template/default_pfx.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def setup_dll_symlinks(default_pfx_dir, dist_dir):
elif bitness == 64:
libdir = os.path.join(dist_dir, 'lib64/wine')
newlibdir = os.path.join(dist_dir, 'lib64/wine/x86_64-windows')
wow64libdir = os.path.join(dist_dir, 'lib/wine/x86_64-windows')
else:
continue
if os.path.exists(os.path.join(libdir, file_)):
Expand All @@ -73,8 +72,6 @@ def setup_dll_symlinks(default_pfx_dir, dist_dir):
target = os.path.join(libdir, 'fakedlls', file_)
elif os.path.exists(os.path.join(newlibdir, file_)):
target = os.path.join(newlibdir, file_)
elif os.path.exists(os.path.join(wow64libdir, file_)):
target = os.path.join(wow64libdir, file_)
else:
continue
os.unlink(filename)
Expand Down
5 changes: 1 addition & 4 deletions wine-tkg-git/non-makepkg-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,7 @@ build_wine_tkg() {
local _prefix="${_nomakepkg_prefix_path}/${_nomakepkg_pkgname}"
fi

if [ "$_NOLIB32" = "true" ]; then
local _lib32name="lib"
local _lib64name="lib"
elif [ -e /lib ] && [ -e /lib64 ] && [ -d /usr/lib ] && [ -d /usr/lib32 ] && [ "$_EXTERNAL_INSTALL" != "proton" ]; then
if [ -e /lib ] && [ -e /lib64 ] && [ -d /usr/lib ] && [ -d /usr/lib32 ] && [ "$_EXTERNAL_INSTALL" != "proton" ]; then
local _lib32name="lib32"
local _lib64name="lib"
else
Expand Down
2 changes: 1 addition & 1 deletion wine-tkg-git/wine-tkg-profiles/advanced-customization.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ _generate_patchsets="false"
# Set to "true" to log compiler warnings and errors to a debug.log file
_log_errors_to_file="false"

# Set to true to disable usage of 32-bit unix libs and use Wine 8.0+ experimental WoW64 for 32-bit apps. Default is "false" as it's still under development.
# Set to true to disable 32-bit wine. Doing so will disable WoW64 and break ALL 32-bit apps. Default is "false".
_NOLIB32="true"

# Set to true to disable 64-bit wine. Doing so will only build 32-bit wine and no SUPPORT for 64-bit apps. Default is "false".
Expand Down
2 changes: 1 addition & 1 deletion wine-tkg-git/wine-tkg-profiles/sample-external-config.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ _generate_patchsets="false"
# Set to "true" to log compiler warnings and errors to a debug.log file
_log_errors_to_file="false"

# Set to true to disable usage of 32-bit unix libs and use Wine 8.0+ experimental WoW64 for 32-bit apps. Default is "false" as it's still under development.
# Set to true to disable 32-bit wine. Doing so will disable WoW64 and break ALL 32-bit apps. Default is "false".
_NOLIB32="false"

# Set to true to disable 64-bit wine. Doing so will only build 32-bit wine and no SUPPORT for 64-bit apps. Default is "false".
Expand Down
12 changes: 2 additions & 10 deletions wine-tkg-git/wine-tkg-scripts/build-64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,12 @@ _configure_64() {
msg2 'Configuring Wine-64...'
cd "${srcdir}"/"${pkgname}"-64-build
if [ "$_NUKR" != "debug" ] || [[ "$_DEBUGANSW3" =~ [yY] ]]; then
chmod +x ../"${_winesrcdir}"/configure
if [ "$_NOLIB32" != "true" ]; then
../"${_winesrcdir}"/configure \
chmod +x ../"${_winesrcdir}"/configure
../"${_winesrcdir}"/configure \
--prefix="$_prefix" \
--enable-win64 \
"${_configure_args64[@]}" \
"${_configure_args[@]}"
else
../"${_winesrcdir}"/configure \
--prefix="$_prefix" \
--enable-archs=i386,x86_64 \
"${_configure_args64[@]}" \
"${_configure_args[@]}"
fi
fi
if [ "$_pkg_strip" != "true" ]; then
msg2 "Disable strip"
Expand Down
56 changes: 20 additions & 36 deletions wine-tkg-git/wine-tkg-scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ _build_serial() {
local _LAST_BUILD_CONFIG="$_where"/last_build_config.log
. "$_where"/wine-tkg-scripts/build-64.sh
. "$_where"/wine-tkg-scripts/build-32.sh
if [ "$_NOLIB64" != "true" ]; then
# build wine 64-bit
# (according to the wine wiki, this 64-bit/32-bit building order is mandatory)
_exports_64
_configure_64
_build_64
if [ "$_NOLIB64" != "true" ]; then
# build wine 64-bit
# (according to the wine wiki, this 64-bit/32-bit building order is mandatory)
_exports_64
_configure_64
_build_64
fi
if [ "$_NOLIB32" != "true" ]; then
# build wine 32-bit
if [ "$_NOLIB32" != "true" ]; then
# build wine 32-bit
# nomakepkg
if [ "$_nomakepkg_midbuild_prompt" = "true" ]; then
msg2 '64-bit side has been built, 32-bit will follow.'
Expand All @@ -139,7 +139,7 @@ _build_serial() {
# /nomakepkg
_exports_32
_configure_32
_build_32
_build_32
if [ "$_nomakepkg_dep_resolution_distro" = "debuntu" ] && [ "$_NOLIB64" != "true" ]; then # Install 64-bit deps back after 32-bit wine is built
_debuntu_64
fi
Expand Down Expand Up @@ -181,20 +181,12 @@ _package_nomakepkg() {
else
local _prefix="${_nomakepkg_prefix_path}/${_nomakepkg_pkgname}"
fi

if [ "$_NOLIB32" = "true" ]; then
local _lib32name="lib"
local _lib64name="lib"
elif [ -e /lib ] && [ -e /lib64 ] && [ -d /usr/lib ] && [ -d /usr/lib32 ] && [ "$_EXTERNAL_INSTALL" != "proton" ]; then
local _lib32name="lib32"
local _lib64name="lib"
else
local _lib32name="lib"
local _lib64name="lib64"
fi
local _lib32name="lib32"
local _lib64name="lib"

# External install
if [ "$_EXTERNAL_INSTALL" = "true" ]; then
_lib32name="lib" && _lib64name="lib64"
if [ "$_EXTERNAL_NOVER" = "true" ]; then
_prefix="$_DEFAULT_EXTERNAL_PATH/$pkgname"
else
Expand Down Expand Up @@ -244,18 +236,14 @@ _package_nomakepkg() {
if [ "$_pkg_strip" = "true" ]; then
msg2 "Fixing x86_64 PE files..."
find "$_prefix"/"$_lib64name"/ -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.py' -or -iname '*.pyc' -or -iname '*.pl' ')' -printf '--strip-unneeded\0%p\0%p\0' | xargs -0 -r -P1 -n3 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code
if [ "$_NOLIB32" != "true" ]; then
msg2 "Fixing i386 PE files..."
find "$_prefix"/"$_lib32name"/ -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.py' -or -iname '*.pyc' -or -iname '*.pl' ')' -printf '--strip-unneeded\0%p\0%p\0' | xargs -0 -r -P1 -n3 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code
fi
msg2 "Fixing i386 PE files..."
find "$_prefix"/"$_lib32name"/ -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.py' -or -iname '*.pyc' -or -iname '*.pl' ')' -printf '--strip-unneeded\0%p\0%p\0' | xargs -0 -r -P1 -n3 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code
find "$_prefix"/bin/ -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.py' -or -iname '*.pyc' -or -iname '*.pl' ')' -printf '--strip-unneeded\0%p\0%p\0' | xargs -0 -r -P1 -n3 sh -c 'objcopy --file-alignment=4096 "$@" > /dev/null 2>&1; exit 0' cmd
else
msg2 "Fixing x86_64 PE files..."
find "$_prefix"/"$_lib64name"/ -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.py' -or -iname '*.pyc' -or -iname '*.pl' ')' -printf '%p\0%p\0' | xargs -0 -r -P1 -n2 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code
if [ "$_NOLIB32" != "true" ]; then
msg2 "Fixing i386 PE files..."
find "$_prefix"/"$_lib32name"/ -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.py' -or -iname '*.pyc' -or -iname '*.pl' ')' -printf '%p\0%p\0' | xargs -0 -r -P1 -n2 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code
fi
msg2 "Fixing i386 PE files..."
find "$_prefix"/"$_lib32name"/ -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.py' -or -iname '*.pyc' -or -iname '*.pl' ')' -printf '%p\0%p\0' | xargs -0 -r -P1 -n2 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code
find "$_prefix"/bin/ -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.py' -or -iname '*.pyc' -or -iname '*.pl' ')' -printf '%p\0%p\0' | xargs -0 -r -P1 -n2 sh -c 'objcopy --file-alignment=4096 "$@" > /dev/null 2>&1; exit 0' cmd
fi
elif [ "$_pkg_strip" = "true" ]; then
Expand Down Expand Up @@ -410,18 +398,14 @@ _package_makepkg() {
if [ "$_pkg_strip" = "true" ]; then
msg2 "Fixing x86_64 PE files..."
find "${pkgdir}$_prefix"/"$_lib64name"/ -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.py' -or -iname '*.pyc' -or -iname '*.pl' -or -iname '*.conf' ')' -printf '--strip-unneeded\0%p\0%p\0' | xargs -0 -r -P1 -n3 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code
if [ "$_NOLIB32" != "true" ]; then
msg2 "Fixing i386 PE files..."
find "${pkgdir}$_prefix"/"$_lib32name"/ -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.py' -or -iname '*.pyc' -or -iname '*.pl' -or -iname '*.conf' ')' -printf '--strip-unneeded\0%p\0%p\0' | xargs -0 -r -P1 -n3 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code
fi
msg2 "Fixing i386 PE files..."
find "${pkgdir}$_prefix"/"$_lib32name"/ -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.py' -or -iname '*.pyc' -or -iname '*.pl' -or -iname '*.conf' ')' -printf '--strip-unneeded\0%p\0%p\0' | xargs -0 -r -P1 -n3 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code
find "${pkgdir}$_prefix"/bin/ -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.py' -or -iname '*.pyc' -or -iname '*.pl' ')' -printf '--strip-unneeded\0%p\0%p\0' | xargs -0 -r -P1 -n3 sh -c 'objcopy --file-alignment=4096 "$@" > /dev/null 2>&1; exit 0' cmd
else
msg2 "Fixing x86_64 PE files..."
find "${pkgdir}$_prefix"/"$_lib64name"/ -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.py' -or -iname '*.pyc' -or -iname '*.pl' -or -iname '*.conf' ')' -printf '%p\0%p\0' | xargs -0 -r -P1 -n2 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code
if [ "$_NOLIB32" != "true" ]; then
msg2 "Fixing i386 PE files..."
find "${pkgdir}$_prefix"/"$_lib32name"/ -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.py' -or -iname '*.pyc' -or -iname '*.pl' -or -iname '*.conf' ')' -printf '%p\0%p\0' | xargs -0 -r -P1 -n2 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code
fi
msg2 "Fixing i386 PE files..."
find "${pkgdir}$_prefix"/"$_lib32name"/ -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.py' -or -iname '*.pyc' -or -iname '*.pl' -or -iname '*.conf' ')' -printf '%p\0%p\0' | xargs -0 -r -P1 -n2 objcopy --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code
find "${pkgdir}$_prefix"/bin/ -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.py' -or -iname '*.pyc' -or -iname '*.pl' ')' -printf '%p\0%p\0' | xargs -0 -r -P1 -n2 sh -c 'objcopy --file-alignment=4096 "$@" > /dev/null 2>&1; exit 0' cmd
fi
elif [ "$_pkg_strip" = "true" ]; then
Expand Down
7 changes: 2 additions & 5 deletions wine-tkg-git/wine-tkg-scripts/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ _exit_cleanup() {
fi
echo "_reuse_built_gst='${_reuse_built_gst}'" >> "$_proton_tkg_path"/proton_tkg_token
echo "_unfrog='${_unfrog}'" >> "$_proton_tkg_path"/proton_tkg_token
echo "_NOLIB32='${_NOLIB32}'" >> "$_proton_tkg_path"/proton_tkg_token
fi

rm -f "$_where"/BIG_UGLY_FROGMINER && msg2 'Removed BIG_UGLY_FROGMINER - Ribbit' # state tracker end
Expand Down Expand Up @@ -279,10 +278,8 @@ msg2 ''
_EXTERNAL_INSTALL="proton"
_EXTERNAL_NOVER="false"
_nomakepkg_nover="true"
if [[ "$_LOCAL_PRESET" = valve* ]]; then
_NOLIB32="false"
_NOLIB64="false"
fi
_NOLIB32="false"
_NOLIB64="false"
_esync_version=""
_use_faudio="true"
_highcorecount_fix="true"
Expand Down

0 comments on commit 0546d3e

Please sign in to comment.