Skip to content

Build on windows (MinGW)

Alexander Akulich edited this page Apr 9, 2023 · 6 revisions

Setup msys2

  1. Download https://repo.msys2.org/distrib/x86_64/msys2-x86_64-20230127.exe (link from https://www.msys2.org/wiki/MSYS2-installation/)
  2. Install it (Next->Next->Next...). After the install it'll open msys2 CLI.
  3. Do pacman -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-glm mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-enet mingw-w64-x86_64-freetype mingw-w64-x86_64-glew mingw-w64-x86_64-openal in the CLI.

Setup IDE

Qt Creator

We're gonna use Qt Creator for now.

  1. Download Qt Creator for you platform: https://download.qt.io/official_releases/qtcreator/9.0/9.0.2/
  2. Open the Preferences => Kits => Compilers. Manually add MinGW 64 C and C++ compilers. C compiler is C:\msys64\mingw64\bin\gcc.exe and C++ compiler is C:\msys64\mingw64\bin\g++.exe.

image

  1. Setup CMake in Preferences => Kits => CMake.

image

  1. Setup the debugger (optional)

image

Get the game sources

https://github.com/WiredForWar/machines/tree/kaffeine/dev-reverted-gfx

Git

ZIP

Get the game assets

https://lordovervolt.com/machines

Build the project

Build in Qt Creator

In Qt Creator: File => Open file or project => (browse to the cloned repository) => CMakeLists.txt.

Then check the MSYS2 kit and uncheck all the others (if any). Click "Configure Project".

image

After the initial configuration, open the Current Configuration tab and set:

  • BUILD_WITH_ALURE to OFF
  • DEV_BUILD also to OFF
  • CMAKE_INSTALL_PREFIX to the machines installation directory.

Enable install target in the Build Steps below (open Details to do it).

image

Set the executable working directory to the machines install directory.

image

Clone this wiki locally