Skip to content

Building for Windows

vuolen edited this page May 6, 2018 · 2 revisions

Prerequisites

Building on Windows is a bit more complicated than on Linux. You will need common sense and know how to use the Windows command prompt.

MinGW

You will need to install MinGW. You can find straightforward instructions here. In the mingw-get GUI you should install the packages found in the Basic Setup category.

cmake

Install cmake from here. Download the installer and run it. Be sure to select the option to add cmake to your PATH.

After installing MinGW and cmake you can test your installations. Open up your command prompt and type in the following commands: mingw32-make -v
cmake --version

Both commands should return some version information.

Dependencies

GLFW

  • Download the latest 32 bit Windows release from here
  • Unzip the file and copy lib-mingw/libglfw.a to the libs folder in your BetterSpades source

OpenAL

  • Download the latest binary release from here
  • Unzip the file and copy libs/Win32/OpenAL32.lib to the libs folder in your BetterSpades source

enet

  • Download the latest binary release from here
  • Unzip the file and copy enet.lib to the libs folder in your BetterSpades source

libdeflate

  • Download the latest i686 binary release from here
  • Unzip the file and copy libdeflate.lib to the libs folder in your BetterSpades source
  • Copy libdeflate.h to the src folder in your BetterSpades source

dr_wav

  • Download the source as a zip file from here
  • Unzip the file and copy dr_wav.h to the src folder in your BetterSpades source
  • Rename the file from dr_wav.h to dr_wav.c
  • Open the file and change line 9 from // #define DR_WAV_IMPLEMENTATION to just #define DR_WAV_IMPLEMENTATION

LodePNG

  • Download the source as a zip file from here
  • Create a new folder lodepng in the src folder of your BetterSpades source
  • Unzip the file and copy lodepng.h and lodepng.cpp to the lodepng folder you just created
  • Rename the lodepng.cpp you just copied to lodepng.c

inih

  • Download the source as a zip file from here
  • Unzip the file and copy ini.c and ini.h to the src folder in your BetterSpades source

parson

  • Download the source as a zip file from here
  • Unzip the file and copy parson.c and parson.h to the src folder in your BetterSpades source

http

  • Download the source as a zip file from here
  • Unzip the file and copy http.h to the src folder in your BetterSpades source

resources

Because state of copyright of 0.75 assets is unknown, you will need to get them here. Unzip the file and extract all contents to the resources folder in your BetterSpades source manually.

Building

  • Open the command prompt and navigate to the build folder in your BetterSpades source
  • Execute the following commands
    cmake -G "MinGW Makefiles" ..
    mingw32-make

If everything went well, the client should be in the build/bin/ subfolder.

When starting client.exe, you will be greeted by a server list. Select a server on it to start playing! You can also start the client the same way as you did with the voxlap version by opening cmd and putting an aos:// link in as the first argument:

client.exe -aos://16777343:32887 // Connects to a local server
Clone this wiki locally