From 8e599908d9cca8f2f96f53790837f49abcea2745 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 19 Oct 2021 18:50:21 +0100 Subject: Re-write Code::Blocks template to work on Linux and Macos (#2073) * update code::blocks example to support linux * add macos support * update screenshot * update templates readme --- projects/CodeBlocks/README.md | 35 +++++---- projects/CodeBlocks/compiler_settings.png | Bin 71748 -> 53305 bytes projects/CodeBlocks/core_basic_window.c | 6 +- projects/CodeBlocks/core_basic_window.cbp | 121 +++++++++++++++++++++++++----- 4 files changed, 123 insertions(+), 39 deletions(-) mode change 100644 => 100755 projects/CodeBlocks/compiler_settings.png (limited to 'projects/CodeBlocks') diff --git a/projects/CodeBlocks/README.md b/projects/CodeBlocks/README.md index 0e4db919..fb072ba8 100644 --- a/projects/CodeBlocks/README.md +++ b/projects/CodeBlocks/README.md @@ -1,16 +1,19 @@ -# raylib for Code::Blocks -**by D3nX** -
-Hey! Here it is a project template to use with `Code::Blocks` =) -

-First, you need to download the [raylib installer](https://www.raylib.com) and run it. It will install raylib with the compiler. -

-Then, download the template, and open the project with `Code::Blocks`. - -Before running the template, make sure following set the raylib compiler for the IDE as show below: -
-![Compiler Settings](compiler_settings.png) -
-Finally, you can run the program and enjoy raylib running on `Code::Blocks`! -

-Hope it helped you =) +# Raylib template for Code::Blocks + +1. Install Raylib. On Windows you must install the **Windows Installer (with MinGW compiler)** package. On other +platforms you can install however you like following the instructions in the wiki. + * https://github.com/raysan5/raylib/releases/download/3.7.0/raylib_installer_v370.mingw.exe + * https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux + * https://github.com/raysan5/raylib/wiki/Working-on-macOS + +2. Install and run Code::Blocks. + +3. **Windows only**: Select `Settings` `Compiler` `Toolchain executables`. +Change `Compiler's instrallation directory` to `C:\raylib\MingGW`. Do *not* press auto-detect. There is a screenshot +below showing how it should look. Press `OK`. + +4. Select `File` `Open` and open the `core_basic_windows.cbp` file. + +![Compiler Settings](compiler_settings.png) + +For an example with resources, see https://github.com/electronstudio/raylib-game-template-codeblocks \ No newline at end of file diff --git a/projects/CodeBlocks/compiler_settings.png b/projects/CodeBlocks/compiler_settings.png old mode 100644 new mode 100755 index 67f9b7a1..f87574d9 Binary files a/projects/CodeBlocks/compiler_settings.png and b/projects/CodeBlocks/compiler_settings.png differ diff --git a/projects/CodeBlocks/core_basic_window.c b/projects/CodeBlocks/core_basic_window.c index 588f80c2..da5b2e01 100644 --- a/projects/CodeBlocks/core_basic_window.c +++ b/projects/CodeBlocks/core_basic_window.c @@ -1,12 +1,8 @@ -/*******************************************************************************************-lraylib -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -* +/******************************************************************************************* * raylib [core] example - Basic window * * Welcome to raylib! * -* To test examples, just press F6 and execute raylib_compile_execute script -* Note that compiled executable is placed in the same folder as .c file -* * You can find all basic examples on C:\raylib\raylib\examples folder or * raylib official webpage: www.raylib.com * diff --git a/projects/CodeBlocks/core_basic_window.cbp b/projects/CodeBlocks/core_basic_window.cbp index c4b22a9e..ab9fe58a 100644 --- a/projects/CodeBlocks/core_basic_window.cbp +++ b/projects/CodeBlocks/core_basic_window.cbp @@ -2,51 +2,136 @@ - -- cgit v1.2.3