Compiling FS-UAE on Windows

These instructions are very much step-by-step, and almost anyone should be able to follow these steps. You still need to able to think a bit for yourself, for example, I won’t tell you to press Y if some of the commands asks you to confirm by pressing Y 🙂 -And I also assume you understand that you need to press Return after having typed (or even better, copied + pasted) a command.

Preparing the MSYS2 Build Environment

Download MSYS2 installer from http://sourceforge.net/projects/msys2/files/Base/x86_64/ (at the time of writing, the correct file was called msys2-x86_64-20141113.exe. If there’s a similar one but with a newer date, pick that one instead).

If you have a 32-bit Windows, you can use this MSYS2 version instead, but the rest of the document assumes you picked the x86_64 one. Note, this is completely unrelated to if FS-UAE should be compiled for 32-bit or 64-bit, so pick the x86_64 version if you have 64-bit Windows, even if you want to compile 32-bit FS-UAE.

After downloading msys2-x86_64-XXXXXXXX.exe, double-click to install it, and just go with the default options. The MSYS2 Shell should be started automatically when installation is completed (provided you didn’t change any options).

Run the following command in MSYS2 Shell to update the package database:

pacman -Sy

And then, to ensure the base runtime is updated:

pacman --needed -S bash pacman msys2-runtime

Now, it is important to close MSYS2 Shell. After you have done this, you can start a new MSYS2 Shell from the Windows start menu!.

Now, you can update all other installed packages:

pacman -Su

Now, we need to install some tools which are either required during the build process, or is useful to have:

pacman -S autoconf automake gettext git libtool make pkg-config zip unzip nano patch wget dos2unix

Finally, you can close MSYS2 Shell and move on to the next section 🙂

Installing Inno Setup

In order to create the installers, you need to download and install inno setup: http://www.jrsoftware.org/download.php/is-unicode.exe (direct link to executable installer). Important: Install to the default location, so the build scripts can find it. You can also use the other default values, and you don’t need to run the program at the end of the installation.

You can skip this step if you’re not going to build distributions of FS-UAE.

Building a Development Version (32-bit) from Git

First, start a new MinGW-w64 Win32 Shell (it’s important to start the Win32 one). Install the required development libraries with:

pacman -S mingw-w64-i686-gcc mingw-w64-i686-openal mingw-w64-i686-glew mingw-w64-i686-SDL2 mingw-w64-i686-python3 mingw-w64-i686-python3-pyqt5 mingw-w64-i686-python3-setuptools mingw-w64-i686-python2 mingw-w64-i686-python3-lhafile mingw-w64-i686-python3-cx_Freeze mingw-w64-i686-libmpeg2

Check out the source code for FS-UAE:

cd $HOME
git clone https://github.com/FrodeSolheim/fs-uae.git

You’ll now have a fs-uae directory. You can enter it, and compile FS-UAE with the following commands one by one (you’ll get a lot of text output after most of the commands):

cd $HOME/fs-uae
./bootstrap
./configure
make clean all

If the commands succeeded, you should now have a fs-uae.exe binary, and you can start it without installing it by running:

./fs-uae

Go back to the home directory and check out the source code for FS-UAE Launcher:

cd $HOME
git clone https://github.com/FrodeSolheim/fs-uae-launcher.git

That’s all there is to it, you should now be able to run FS-UAE Launcher like this:

./fs-uae-launcher

When you run fs-uae-launcher.exe like this, it will automatically find the compiled fs-uae.exe from the sibling directory.

Creating the Installer

The scripts for assembling the FS-UAE suite installer are not yet available in the source archives.

Building a 64-bit Version

The instructions for building a 64-bit (x86_64) version of FS-UAE is the same as for 32-bit (i686), except that instead of running MinGW-w64 Win32 Shell, you need to run MinGW-w64 Win64 Shell. You also need to install the 64-bit version of the required libraries:

pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-openal mingw-w64-x86_64-glew mingw-w64-x86_64-SDL2 mingw-w64-x86_64-python3 mingw-w64-x86_64-python3-pyqt5 mingw-w64-x86_64-python3-setuptools mingw-w64-x86_64-python2 mingw-w64-x86_64-python3-lhafile mingw-w64-x86_64-python3-cx_Freeze mingw-w64-x86_64-libmpeg2

One thought on “Compiling FS-UAE on Windows

  1. FS-UAE / FS-UAE Launcher dependencies which was missing in MSYS2 has been submitted and added to the official repositories, so the instructions have been somewhat simplified (no need to manually download the missing packages from fengestad.no :))

Leave a Reply

Your email address will not be published. Required fields are marked *