Skip to content

win_build

Manlio Morini edited this page May 17, 2024 · 41 revisions

Walkthrough: compiling Vita under Windows

Prerequisites

There're many possibilities:

MinGW and CMake

This is the way we build and test the framework.

  1. Download the full distribution (including git) of MinGW . Install MinGW in a non-system folder (e.g. C:\MinGW\).
  2. Download and install CMake (when asked select the checkbox to add CMake to the system path).
  3. Clone Vita:
    git clone https://github.com/morinim/vita.git
  4. Run CMake:
    cd c:\vita
    mkdir build
    cd build
    cmake -G "MinGW Makefiles" ..\src
    The default generator for Windows is set to NMake. The "MinGW Makefiles" generator produces makefiles that use cmd.exe as shell and don't require a Unix shell.
  5. Make what you need (e.g. make forex) or make all (just make).

Notes

  • The MinGW distribution available at nuwens.net is the suggested one because it's easy to install and always up to date. It's not mandatory: any recent distribution should be enough.
  • If you're experiencing long delays after the make command, try make -r (avoids implicit rules).

Windows Subsystem for Linux

Requires Windows 10. Thanks to Paolo Ucchino for advising and experimenting this environment

  1. Install the Windows Subsystem for Linux. Choose the Ubuntu distribution and install only the command-line.
  2. Update your WSL environment to make sure it's pointing to the latest catalog of software:
     sudo apt update
     sudo apt upgrade
  3. Install the developer tools:
    sudo apt install build-essential g++
    sudo apt install cmake
  4. Clone Vita:
    git clone https://github.com/morinim/vita.git
  5. Run CMake:
    cd c:\vita
    mkdir build
    cd build
    cmake -G "MinGW Makefiles" ..\src
  6. Make all (cmake --build build/) or just a valid target (cmake --build build/ --target help).

Visual Studio 2019 (or newer) and CMake

Visual Studio doesn't require special tricks. See the general instructions for setting up the build.