Skip to content
Adrien Destugues edited this page May 25, 2014 · 1 revision

Introduction

We used to build Reloaded with MSYS, which is an UNIX-like environment for Windows. This generates sub-optimal executables that need some UNIX compatiblity wrapper DLLs to run, and are not very easy to package and distribute.

Instead, we can use Microsoft's Visual C++ compiler to build it, making something closer to a native executable.

Requirements

  • CMake 2.8 or newer

C++ compiler

  • Visual C++ Express 2010 or newer. Older versions lack the stdint.h header from the C99 standard.
  • The Windows Platform SDK (this is built-in for Visual C++ Express 2013 Desktop, but a separate download for 2010).

This page describes the build process using the command line and nmake. CMake also supports generating Visual Studio solutions, which should work just as well.

pthreads-win32

http://sourceware.org/pthreads-win32/

  • Put pthreadVC2.lib in a directory pointed by the LIB environment variable.
  • Put pthreadVC2.dll in a directory pointed by the PATH environment variable.
  • Put pthread.h, sched.h and semaphore.h in a dir pointed by the INCLUDE environment variable.

Dependencies

Unfortunately, Reloaded needs some libraries which aren't distributed as ready-to-use DLLs. You will have to compile those before building the emulator itself.

wxWidgets

  • You need a Debug version of wxWidgets to build Reloaded in Debug mode. Otherwise, the Release version should be enough.
  • You need the shared library (dll) version, which is not enabled by default. Edit config.vc and set SHARED=1.
  • If you want to build wxFormBuilder, you need a Release, non-unicode, monolithic build. Otherwise you will have to fix wxFormBuilder build files.

Follow these instructions to build wxWidgets: http://wiki.wxwidgets.org/Compiling_Using_MSVC_On_The_Commandline

PortAudio

The following commands are meant to run from a Visual Studio prompt. You can start one from the VC++ IDE or open a regular prompt and run

"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"

The commands used are:

mkdir cmake
cd cmake
cmake .. -G"NMake Makefiles"
nmake

Copy the h, dll and lib files to places where the compiler can find them, as for pthreads-win32.

wxFormBuilder

This is needed only if you want to change the UI windows of Reloaded, not when just compiling it. Since this is quite annoying to build, and require some patches, we have uploaded binaries to our download page. If you want to rebuild it anyway:

  • Get the 3.x/trunk from their SVN
  • Use premake to generate a solution for Visual Studio
  • Set WXWIN to point to your wxWidgets installation (C:\wxWidgets-2.8.12) so hte projects can find it
  • Apply our patches from the download page before building.

Building reloaded

You're not done yet!

StSoundLibrary

Use the version from our git repository. It was modified to more accurately emulate the CPC sound chip and mixer, rather than the Atari ST ones.

StSoundLibrary comes with a Visual Studio project which should build without much problems. Install the dll, lib, and headers as usual.

Reloaded

The following commands should do the right thing:

mkdir build
cd build
cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
nmake