Skip to content

getting started

Travis Vroman edited this page Jan 13, 2022 · 4 revisions

Getting Started with Kohi

Introduction

This page provides guidance on getting a workstation setup to work with Kohi.

Required Workstation Setup

You will need to have Clang and the Vulkan SDK installed:

I also use VS Code in the series: https://code.visualstudio.com/download

Note for Linux:

In order to get environment variables to exist, you'll need to run source /path/to/vulkan/1.x.xxx.x/setup-env/sh. For example, if following the video series and the Vulkan SDK is placed in the user directory, you'd run source /vulkan/1.2.162.1/setup-env.sh, changing out the version number, of course, for the one you have installed.

However, running this only makes those changes to the currently open terminal. To make these variables persist across sessions, you will need to consult the documentation for the distribution you are using. As an example, for Ubuntu you would need to add the following lines to your ~/.profile file:

if [ -d "$HOME/vulkan/1.2.162.1" ] ; then
    source $HOME/vulkan/1.2.162.1/setup-env.sh
fi

Again, change the version for the version you have installed.

Cloning the Repository

To download the code, run the following in command prompt or terminal:

git clone https://github.com/travisvroman/kohi

Building the Codebase

If using VS Code, open the kohi folder in VS Code and press ctrl+shift+b to build.

Otherwise, open a command prompt or terminal, browse to the kohi root directory and run:

  • Windows: build-all.bat then post-build.bat
  • Linux: ./build-all.sh then ./post-build.sh
  • Mac: ./build-all-macos.sh then ./post-build-mac.sh.

The executables and libraries will be placed in bin, and intermediate files will be placed in obj.

See the setup videos in the series for Windows or Linux for details.

Cleaning (for a full rebuild)

There are also clean scripts available: clean-all.bat (Windows), clean-all.sh (Linux) and clean-all-mac.sh (Mac). These wipe out associated files in the bin and obj folders, triggering a full compile on the next build.

Running Kohi

If using VS Code, press F5 to run the program. Otherwise, browse to the bin folder and run the appropriate executable file.

See Also

Home Page