How To Build Wine¶
This will build different versions of Wine, including the custom winex11.drv.so replacement that Boxedwine needs.
Freetype 2.8.1 broke the Wine build. So for Wine versions 2.18 or later, Freetype 2.8.1 or later must be used. This is why I use Debian 10 for Wine 3.0 and later and Debian 9 for Wine 2.0 or earlier.
- Install Debian 9 or 10 (32-bit). This can be in a Virtual Machine, like VMWare or on a real machine.
- Make sure your user has sudo access. On Debian 10 you can do that by:
- Hit Alt-Ctrl-F1 and login as root
- Where username is the name of the user you created when installing Debian 10: "usermod -aG sudo username"
- Hit Alt-F7 to go back to the graphical environment if you want. You will need to log out and back into your Window environment for the group change to take effect.
- Install dependencies: at the command prompt, type:
- sudo apt-get install build-essential
- sudo apt-get install git
- sudo apt-get build-dep wine
- Install OSS header so that wineoss.drv.so will build
- Download OSS source
- Unzip the file, for example, "tar -xvf oss-v4.2-build2019-src-gpl.tar.bz2"
- Make directory: "sudo mkdir -p /usr/lib/oss/include/sys"
- copy include/soundcard.h to /usr/lib/oss/include/sys/soundcard.h: "sudo cp include/soundcard.h /usr/lib/oss/include/sys/"
- In your home directory, checkout Boxedwine with this command "git clone https://git.code.sf.net/p/boxedwine/source boxedwine-source"
- Change directory to "cd ~/boxedwine-source/tools/buildWine"
- Run script with Bash "bash buildAll.sh"
- The script will ask for sudo access to install Wine into /opt. It will then zip it up. This is why its best to this in a VM instead on a real machine.
- When it is all done, you should have some zipped up wine files in the ~/boxedwine-source/tools/buildWine directory.
- These zips only contain Wine, not the full file system. But the Wine zip files do contain a depends.txt file that tells Boxedwine to also load debian10.zip. If you would prefer to only have 1 file system zip file, the Wine zip and Debian 10 zip files can be merged together.
- To prevent Wine creating the .wine directory when launching Boxedwine, I will run something like Winecfg with the new file system, then copy the premade /home/username/.wine folder in the Wine file system.
- If you get any build errors, like __acrt_iob_func undefined, try deleting the wine-git directory and build again.