-
Notifications
You must be signed in to change notification settings - Fork 2
Building and running the engine for Windows (using Msys2)
For this example, we'll be using the Msys2 building platform to build and run our engine.
There are other ways of going about this but this is the one that I managed to get working. In the future, I will try to make a Visual Studio solution approach.
Make sure that msys2
is installed. If you are unfamiliar with it, there are three types of msys2
terminals when you search for it via the Start button.
- Msys2 Msys
- Msys2 MinGW 32bit
- Msys2 MinGW 64bit
Use the first one Msys2 Msys
, for this whole setup process.
Install the needed packages:
- make - Used for executing Make files
- gcc - For compiling
- mingw-x86_64-glfw - Mingw version of GLFW. For graphics, input and window handling.
$ pacman -S make gcc mingw64/mingw-w64-x86_64-glfw
Download the chicken-scheme v5.2.0 source code found here. Chicken-scheme is used to allow scripting for the engine.
Place this anywhere and extract it using the following code inside the terminal:
$ tar -xf chicken-5.2.0.tar.gz
$ cd chicken-5.2.0/
Then start make with:
$ make PLATFORM=cygwin install
This will compile chicken and install it to C:\msys64\usr\local\bin\csi.exe
.
Chicken requires additional code dependencies for scripting. Install them with:
# chicken-install -v bind
Clone the repository and enter the directory:
$ git clone git@github.com:accidentalrebel/rebel-game-engine.git
$ cd rebel-game-engine/
Build the engine as a library:
$ make build PLATFORM=windows
Run the engine (Runs whatever code is in scripts/game.scm
):
$ make PLATFORM=windows
Congratulations, you are now ready to start working!
Note: To avoid having to specify
PLATFORM
every time you make a build, you can change the variablePLATFORM=
inside theMakefile
.