Raine Logo
Raine Logo Mirror


Downloads


Games


Docs


Forum


Zzap! Raine

Windows

Things have become very easy lately. Start by installing msys2 from there : MSYS2.
Once installed you'll get a few different shells that you can run from your msys2 group, the 2 relevant here are mingw32 and mingw64 to build respectively raine in 32 and 64 bits.
Well the basic commands to know for any architecture are :
pacman -Ss name : search a package named name. For example if you search muparser which is needed by raine, you'll find at least these 2 files :
mingw-w64-i686-muparser-2.3.2-2
mingw-w64-x86_64-muparser-2.3.2-2
The prefix is mingw-w64-i686 for 32 bits, mingw-w64-x86_64 for 64 bits.
Then the name of the package (muparser), and finally the version number.
Once you have found the package you want, just use pacman -S name to install it, you can use the mouse to copy and paste the name you want from the search, double click to select a name, then right click to paste it.

For raine, you'll need these packages :
SDL2, SDL2_image, SDL2_ttf, curl (mingw-w64-i686-curl or mingw-w64-x86_64-curl), and muparser. Search for each one using pacman -Ss, then install the version you want (either 32 or 64 bits, or both). If compiling the 32 bits version, you'll also need nasm. Of course you also need some basic gcc installation, at least make if it wasn't already installed, and git. If you want to compile 32 and 64 bits versions, you can install just 1 version of git (there is no prefix anyway).
You can also choose to disable curl entierly, in this case edit the makefile and comment the line USE_CURL = 1. You can also avoid muparser by disabling the console, but you will loose all the cheats with it, so it's not a good idea. There was some problem with incompatibilities between muparser-2.3.3 and 2.3.2, make sure you install the same version in both 32 and 64 bits.
Then to get raine sources, go to a directory where you want to be, or just the default home directory, then :
git clone https://github.com/zelurker/raine.git
It will create a raine directory with everything needed inside.
cd raine
make
And if you installed everything correctly after a few minutes you'll get your brand new binary in the current directory. You can edit the makefile to choose quite a few options too, the main one being if you want a debug or an optimized build, by default it's optimized, uncomment the RAINE_DEBUG line if you want a debug build, faster to build, and more convenient to run from the debugger gdb. By the way gdb seems to still have some problems in windows, you won't be able to use all the features apparently. Here again there are at lest 2 versions to try, 32 or 64 bits, the 64 bits can load the 32 bits binaries too. gdb runs better in linux, but it's still useful to get some infos sometimes.
To run your brand new binary : ./raine (for 64 bits) or ./raine32 (for 32 bits).
Notice that the currently released binaries are cross compiled from linux, so they don't use the same dlls as the ones you'll find in msys2.
If you ever want to update the sources with the latest version from git later, just :
cd raine
git pull
Notice : you don't need to touch the target setting in the makefile if compiling from mingw32/mingw64. There are 2 main shells, one for mingw32, the other for mingw64, use the one you want, the makefile will detect it and build the corresponding raine, 32 or 64 bits. The target setting is for cross compiling from linux !

Cross compiling raine

Sometimes it might be usefull to cross compile raine from a linux installation, especially for the dos version since it becomes quite hard to compile in windows, and you can run it in dosemu.
You can also cross compile for mingw32, it's easier to install the cross compiler there since most distributions ship one (for debian it's the mingw32* packages), the main problem comes from the big number of libraries you'll have to compile in the mingw32 environement, there it's often easier to boot in windows if you still have a windows boot.

Arch linux not only has some cross compilers, it also has some pre-compiled packages for windows, which makes cross compiling for windows very easy.
mingw-w64-gcc installs at the same time /usr/bin/i686-w64-mingw32-gcc and /usr/bin/x86_64-w64-mingw32-gcc with their respective directories in /usr/i686-w64-mingw32/ and /usr/x86_64-w64-mingw32
After that the packages you install are on the same model, they install at the same time in the 32 bits and the 64 bits directory. You'll probably need the aur repository, and chaotic-aur is a good idea too.
Also yay is a good alternative to pacman to automatically install packages from aur for example.
Just search for the sdl2 packages :
yay mingw-w64-sdl2
Which should give you something like that :
6 aur/mingw-w64-sdl2_mixer 2.0.4-3 (+1 0.00)
    A simple multi-channel audio mixer (mingw-w64)
5 aur/mingw-w64-sdl2_net 2.0.1-1 (+2 0.00)
    A small sample cross-platform networking library (Version 2) (mingw-w64)
4 aur/mingw-w64-sdl2_gfx 1.0.4-1 (+3 0.00) (Orphelin)
    SDL graphics drawing primitives and other support functions (Version 2)mingw-w64)
3 aur/mingw-w64-sdl2_ttf 2.0.15-1 (+4 0.00)
    A library that allows you to use TrueType fonts in your SDL applications (Version 2) (mingw-w64)
2 aur/mingw-w64-sdl2_image 2.0.5-1 (+4 0.00) (Installé)
    SDL2 image libraries (mingw-w64)
1 aur/mingw-w64-sdl2 2.0.16-1 (+24 0.01) (Installé : 2.0.18-1)
    A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (Version 2) (mingw-w64)
Here I had some troubles with SDL2_ttf, and I ended up installing this one manually from sources, but all the others worked. Also to update a package to a more recent version, just edit the PKGBUILD file and change the version inside. Once it has failed on bad sha256 for the source package, just run sha256 on the source package, and update the PKGBUILD again with the new sha256 info.

You can edit the raine's makefile to directly compile for one of these targets, search for target= and read the comments. Uncomment the target you want, there is 1 for windows 32 bits, 64 bits, and djgpp. Then run make, and you'll get your binary if everything is installed correctly.

For djgpp, you can also install this package from arch : https://aur.archlinux.org/packages/djgpp-gcc/.

Git