Setting up your environment

KnightOS is hackable on most systems. The first step to building your own programs is to install the KnightOS SDK, or “Software Development Kit”. You need some extra software installed on your PC to compile programs.

Note: You should already be familiar with your favorite text editor, and with working on the command line. We aren't getting into that here.

SDK installation

For Unix-like systems, including Linux, macOS, BSD, and so on, the installation procedure is very straightforward. Installation instructions are available here. Instructions for Windows are also provided.

This will download and run the KnightOS SDK installer. The script will warn you if you are missing dependencies - you need to have the following things installed:

$ sudo apt install mono-complete cmake git asciidoc gcc python3-pip libsdl1.2-dev libmagickwand-dev libreadline-dev libboost-dev flex bison

will install all the dependencies on a debian based system (you may need to symlink pip-3.2 to pip3).

Note: You should be able to use clang/llvm instead of gcc. This is probably what most macOS users will want to do.

You’ll also need the development headers for readline.

Testing the Installation

Run knightos --help when you’re all done to make sure the installation went smoothly. Next, pick a directory to keep your code in and we’ll move on to the next chapter.

Next » « Back