rayLab

Experiment X210802: Installing raylib Inside Windows Projects

Synopsis

It’s useful to include the raylib code inside of a project that relies on raylib graphical functions. The raylib code is not manipulated inside the project. Raylib code is carried within the project for easy location and for stability. The code is then directly compiled along with the containing project’s code to make a complete program. It is all self-contained.

The inside-project setup of raylib is used in the orcmid/rayLab project. That setup is used for illustration.

The Objective

When a raylib release is installed in a project, the view in Windows File Explorer will resemble this one of the GitHub orcmid/rayLab project as cloned on a Windows 10 PC.

rayLab with raylib inside

The important features are

This is achieved in three steps.

  1. Arranging Git[Hub] for raylib Inside Windows Projects. For a Git-supported project such as rayLab, .gitattributes and .gitignore files are used to treat the raylib folder and the raylib-3.7.0.zip file properly once they are introduced. This step is required only when Git is used. If a project is later placed under Git, this step should be revisited.

  2. The source code .zip for a raylib release is downloaded.

  3. The raylib folder is created from the .zip content.

Further developments, including confirmation of the setup, are accomplished in additional steps. Additional lab notes will account for that.