This post is about running 32+64 bit Wine on Kaos or any other 64-bit only Linux distribution.
Not very space and memory efficient but relatively simple way is to install another minimal 32+64 bit Linux distribution and Wine in chroot environment.

Debian Linux has suitable tool, called debootstrap https://packages.debian.org/buster/debootstrap. I simply downloaded it and untared to / of my system (maybe someone could package it for Kaos).

Then steps are relatively simple. First select place in your system where you want Debian to go:
# CHROOT=/opt/debian
Run debootstrap. This will install minimal 64-bit Debian buster (current stable distribution) system to selected directory. Use nearest Debian mirror.
# sudo debootstrap --arch=amd64 --variant=minbase buster $CHROOT http://ftp.debian.org/debian

Now you need to mount some Kaos filesystems to be available for chrooted applications:
# sudo mount -t proc proc $CHROOT/proc
# sudo mount -t devpts devpts $CHROOT/dev/pts
(and add entries to /etc/fstab).

Now edit file $CHROOT/etc/apt/sources.list and add these 3 lines:

deb http://ftp.debian.org/debian buster main
#deb https://dl.winehq.org/wine-builds/debian/ buster main
#deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_10 ./

Now switch to chrooted Debian:
# sudo chroot $CHROOT
Run these in Debian. First enable i386 (32 bit) support:
# dpkg --add-architecture i386
Update packages and install some tools:
# apt-get update
# apt-get install dialog
# apt-get install locales
# dpkg-reconfigure locales
# apt-get install vim
# apt-get install wget
# apt-get install gnupg
# wget -nc https://dl.winehq.org/wine-builds/winehq.key
# apt-key add winehq.key
# wget -nc https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_10/Release.key
# apt-key add Release.key

Now open /etc/apt/sources.list in editor (for example vi which we installed earlier) and uncomment last two lines. Then refresh package list:
# apt-get update
And finally install Wine:
# apt install --install-recommends winehq-stable (Wine 6.0) or
# apt install --install-recommends winehq-devel (Wine 6.2)
Add some user to chrooted Debian:
# useradd user
# exit for Debian root account and go back as simple user:
# sudo env -u HOME chroot --userspec=user $CHROOT
And try to run winemine. Wine should start, install additional packages and load Minesweeper game 🙂
Now # exit chrooted Debian and try to start Minesweeper from Kaos command line:
# sudo env -u HOME chroot --userspec=user $CHROOT winemine
Minesweeper should start again. To install Windows apps, copy installers to $CHROOT/home/user, go to chrooted Debian as user and run wine installer.exe.

TODO:

  1. Figure out how to run chrooted Wine without sudo.
  2. Figure out why chrooted Wine can't find OpenGL.
  3. Figure out how to add Windows apps to KDE application menu.
Merged 1 post from Tip : Run wine 32bit apps using flatpak.

victorien

Great. Does flatpacked wine can install and run 64 bit Windows apps? The only Windows application I really need is 64 bit.

BTW I've got Wine and Steam working in chroot with full 3D acceleration, I can run 32 and 64 bit Windows apps, 32 and 64 bit Linux apps. I'll update my first post - some additional steps were necessary.

Installer used in application I need is 32 bit (at least I think so) and fails to run on 64 bit Wine.