From ab4b0508a275e64b0181c155edb015c55461c8a6 Mon Sep 17 00:00:00 2001 From: Ray Date: Thu, 22 Nov 2018 11:55:27 +0100 Subject: [PATCH] Added Geany project template for Windows --- projects/Geany/HELPME | 0 projects/Geany/core_basic_window.c | 52 +++++++++++++++++++++++ projects/Geany/raylib_compile_execute.bat | 20 +++++++++ projects/Geany/raylib_project.geany | 41 ++++++++++++++++++ 4 files changed, 113 insertions(+) delete mode 100644 projects/Geany/HELPME create mode 100644 projects/Geany/core_basic_window.c create mode 100644 projects/Geany/raylib_compile_execute.bat create mode 100644 projects/Geany/raylib_project.geany diff --git a/projects/Geany/HELPME b/projects/Geany/HELPME deleted file mode 100644 index e69de29bb..000000000 diff --git a/projects/Geany/core_basic_window.c b/projects/Geany/core_basic_window.c new file mode 100644 index 000000000..96d0f1398 --- /dev/null +++ b/projects/Geany/core_basic_window.c @@ -0,0 +1,52 @@ +/******************************************************************************************* +* +* raylib [core] example - Basic window +* +* This example has been created using raylib 1.0 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2013-2019 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib.h" + +int main() +{ + // Initialization + //-------------------------------------------------------------------------------------- + int screenWidth = 800; + int screenHeight = 450; + + InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window"); + + SetTargetFPS(60); + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!WindowShouldClose()) // Detect window close button or ESC key + { + // Update + //---------------------------------------------------------------------------------- + // TODO: Update your variables here + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + + ClearBackground(RAYWHITE); + + DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY); + + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + // De-Initialization + //-------------------------------------------------------------------------------------- + CloseWindow(); // Close window and OpenGL context + //-------------------------------------------------------------------------------------- + + return 0; +} diff --git a/projects/Geany/raylib_compile_execute.bat b/projects/Geany/raylib_compile_execute.bat new file mode 100644 index 000000000..a62a1aca3 --- /dev/null +++ b/projects/Geany/raylib_compile_execute.bat @@ -0,0 +1,20 @@ +::@echo off +:: > Setup required Environment +:: ------------------------------------- +set RAYLIB_DIR=C:\raylib +set PATH=%PATH%;%RAYLIB_DIR%\mingw32\bin +set FILE_NAME=%1 +set NAME_PART=%FILE_NAME:~0,-2% +cd %~dp0 +:: . +:: > Cleaning latest build +:: --------------------------- +cmd /c if exist %NAME_PART%.exe del /F %NAME_PART%.exe +:: . +:: > Compiling program +:: -------------------------- +gcc -o %NAME_PART%.exe %FILE_NAME% %RAYLIB_DIR%\raylib.rc.data -s -O2 -I../../src -Iexternal -lraylib -lopengl32 -lgdi32 -std=c99 -Wall -mwindows +:: . +:: . > Executing program +:: ------------------------- +cmd /c if exist %NAME_PART%.exe %NAME_PART%.exe \ No newline at end of file diff --git a/projects/Geany/raylib_project.geany b/projects/Geany/raylib_project.geany new file mode 100644 index 000000000..307719e83 --- /dev/null +++ b/projects/Geany/raylib_project.geany @@ -0,0 +1,41 @@ +[editor] +line_wrapping=false +line_break_column=72 +auto_continue_multiline=true + +[file_prefs] +final_new_line=true +ensure_convert_new_lines=false +strip_trailing_spaces=false +replace_tabs=true + +[indentation] +indent_width=4 +indent_type=0 +indent_hard_tab_width=8 +detect_indent=false +detect_indent_width=false +indent_mode=2 + +[project] +name=raylib_project +base_path=./ +description=raylib project template +file_patterns= + +[long line marker] +long_line_behaviour=1 +long_line_column=72 + +[files] +current_page=0 +FILE_NAME_0=0;C;0;EUTF-8;1;1;0;C%3A%5CGitHub%5Craylib%5Cprojects%5CGeany%5Ccore_basic_window.c;0;4 + +[build-menu] +filetypes=C; +EX_00_LB=_Execute +EX_00_CM="./%e" +EX_00_WD= +CFT_00_LB=_Compile +CFT_00_CM=raylib_compile_execute.bat %f +CFT_00_WD=