See libfaketime on github for upstream project site general overview.
#!/usr/bin/env bash
set -Eeuo pipefail
LIBFAKETIME_SOURCE_PATH=$PWD/libfaketime
LIBFAKETIME_INSTALL32_PREFIX=$PWD/install-x86
LIBFAKETIME_INSTALL64_PREFIX=$PWD/install-x86_64
[[ -d $LIBFAKETIME_SOURCE_PATH ]] || git clone https://github.com/wolfcw/libfaketime.git
make -C $LIBFAKETIME_SOURCE_PATH PREFIX=$LIBFAKETIME_INSTALL64_PREFIX distclean install | tee build64.log
CFLAGS="-m32" LDFLAGS="-m32" make -C $LIBFAKETIME_SOURCE_PATH PREFIX=$LIBFAKETIME_INSTALL32_PREFIX distclean install | tee build32.log
# generate scripts for shell environment
echo "export LD_PRELOAD=$LIBFAKETIME_INSTALL32_PREFIX/lib/faketime/libfaketime.so.1" > libfaketime32.env
echo "export LD_PRELOAD=$LIBFAKETIME_INSTALL64_PREFIX/lib/faketime/libfaketime.so.1" > libfaketime64.env
64-bit application in 64-bit WINEPREFIX:
$ date
Sat Oct 19 19:11:58 CEST 2019
$ (source libfaketime64.env ; FAKETIME="-1y" wine64 "c:/windows/system32/cmd.exe" /c date /t)
Current Date is 10/19/2018
32-bit application in 64-bit WINEPREFIX:
$ date
Sat Oct 19 19:11:58 CEST 2019
$ (source libfaketime32.env ; FAKETIME="-1y" wine "c:/windows/syswow64/cmd.exe" /c date /t)
Current Date is 10/19/2018
NOTE: Since Wine 7.2, libfaketime doesn't work anymore for 32-bit processes due to missing 64-bit time_t support. See my comment
Links
Hi,
just to clear things up. You are referring to the new experimental WoW64 mode.
Wine has Wow64 implemented since like 15 years which required a multilib host with 32-bit and 64-bit dependencies.
With the new experimental WoW64 mode, the 32-bit native host (and build) dependencies are no longer needed.
The 32-bit executables run in a 64-bit process.
Since I always build Wine on my own (I can still build all Wine versions down to Wine 1.3.x on the same Fedora 41 machine), I have those experimental wow64 builds as well, along with the traditional Wow64 32/64-bit multilib.
The new WoW64 is the way and follows what Windows natively does.
Output from my "new" wow64 mode build, showing it works:
Not sure when they are provided as alternative/default to distros as well from WineHQ (https://gitlab.winehq.org/wine/wine/-/wikis/Download).
There are several third-party projects which provide own "custom" builds of various Wine flavours, including experimental WoW64 mode enabled ones. Example:
https://github.com/Kron4ek/Wine-Builds
Note, I don't use it/nor can comment on it, just listed as example.
Regards