Skip to content

MikeshCZ/raylib-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buy Me A Coffee

Raylib Template

Enjoy your development journey with Raylib! 🎮

A versatile template for Raylib projects using C++ and CMake, optimized for MacOS and Windows with full integration for Visual Studio Code.

This template automatically checks for the presence of Raylib and Raygui libraries during build. If missing, they will be automatically downloaded into the build folder to ensure a smooth setup.


Installation

For MacOS:

  1. Install prerequisites:

    • Xcode: Download from the App Store.
    • Visual Studio Code: Download from here.
  2. Open the folder in VS Code:

    • Use the command: code .

Recommended: Homebrew Installation (macOS)

Homebrew is the recommended package manager for managing libraries on macOS.

Install Homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install Raylib:

brew install raylib cmake

For Windows:

  1. Install MSYS2:

    • Download from here.
  2. Set up MSYS2 for C++ development:

    • Open the UCRT64 terminal environment and run the following command:

      pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-make mingw-w64-ucrt-x86_64-ninja mingw-w64-ucrt-x86_64-gdb mingw-w64-ucrt-x86_64-lldb
  3. Update the Windows System Environment PATH:

    • Add the following paths:

      C:\msys64\ucrt64\bin; c:\msys64\usr\bin
      
  4. Install Visual Studio Code:

    • Download from here.
  5. Open the folder in VS Code:

    • Use the command: code .

Using the Template

Once the environment is set up:

  1. Open the folder in Visual Studio Code.
  2. Press F5 to start debugging the application.
  3. Select Build and Launch from the menu.
  4. The template will generate a /build folder with an executable named after the main folder.

If you like this repository you can buy me a coffee. Thank You!

About

A versatile template for Raylib projects using C++ and CMake, optimized for MacOS and Windows with full integration for Visual Studio Code.

Topics

Resources

License

Stars

Watchers

Forks

Contributors