Building & Running on Windows

These instructions cover building 32blit on Windows (without WSL or a full Visual Studio install).

Prerequisites

You'll need to install:

Now open “Developer Command Prompt for VS 2019” and install the 32blit tools:

py -m pip install 32blit

(Keep this open for building later)

This may result in a waning similar to:

WARNING: The script 32blit.exe is installed in 'C:\Users\[Name]\AppData\Local\Programs\Python\Python39\Scripts' which is not on PATH.

You will either need to add that to your PATH, or run the tools as py -m ttblit ... instead of 32blit ....

Building & Running on 32Blit

If you want to run code on 32Blit, you should now refer to Building & Running On 32Blit. You will need to add -G"NMake Makefiles" to your cmake commands and use nmake instead of make. For example:

mkdir build.stm32
cd build.stm32
cmake -G"NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=../32blit.toolchain ..
nmake

Building & Running Locally

Set up the 32Blit Makefile from the root of the repository with the following commands:

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

Now to make any example, type:

nmake example-name

For example:

nmake raycaster

This will produce examples/raycaster/raycaster.exe which you should run with:

.\examples\raycaster\raycaster

Build Everything

Alternatively you can build everything by just typing:

nmake

When the build completes you should be able to run any example.