-
-
Notifications
You must be signed in to change notification settings - Fork 565
Bundling Windows applications
- Create a version of WINE that runs from within an AppImage
- In order to support running 32-bit Windows executables on 64-bit Linux systems, make it possible to bundle any and all 32-bit dependencies, down to ld-linux.so.2 inside the AppImage so that it needs no 32-bit libraries to be installed on the target system
- Make it possible to use a read-only
$WINEPREFIX
that is stored inside the AppImage
For 64-bit WINE on 64-bit Linux this is relatively straightforward, but it will only be able to run 64-bit Windows executables, which are not always available, especially for legacy software that is often the reason for using WINE. Hence we will focus on 2.
It appears that in order to run 32-bit Windows
applications, 32-bit Windows must be used, which in turn requires
32-bit ld-linux.so.2
and glibc
. But most 64-bit systems these days
don't have the 32-bit compatibility libraries installed anymore.
With other programs it is usually possible to manually load the 32-bit
ELF file with a private, bundled version of ld-linux.so.2
like so:
wget -c http://security.ubuntu.com/ubuntu/pool/main/g/glibc/libc6-i386_2.24-9ubuntu2.2_amd64.deb
dpkg -x ./libc6*.deb .
HERE="$(dirname "$(readlink -f "${0}")")"
WINEPREFIX="$HERE/wineprefix/" \
"$HERE/lib32/ld-linux.so.2" --library-path "$HERE/lib32"
"$HERE/wine-stable/bin/wine" \
"$WINEPREFIX/drive_c/Program Files/App/App.exe" "$@"
However, with WINE, this does not work. My guess is that WINE launches
other WINE instances through other mechanisms in the background, which
in turn don't get loaded using the specified
"$HERE/lib32/ld-linux.so.2"
and --library-path "$HERE/lib32"
.
WINE developer Alexandre Julliard answered on wine-devel:
It's not possible in standard Wine, but you could probably hack
wine_exec_wine_binary()
inlibs/wine/config.c
to add your special magic.
🚧 This needs to be done. We would highly welcome contributions.
To be written