ソースを参照

Merge branch 'master' of https://github.com/raysan5/raylib

pull/2076/head
Ray 3年前
コミット
5761bf7e19
5個のファイルの変更124行の追加40行の削除
  1. +19
    -16
      projects/CodeBlocks/README.md
  2. バイナリ
      projects/CodeBlocks/compiler_settings.png
  3. +1
    -5
      projects/CodeBlocks/core_basic_window.c
  4. +103
    -18
      projects/CodeBlocks/core_basic_window.cbp
  5. +1
    -1
      projects/README.md

+ 19
- 16
projects/CodeBlocks/README.md ファイルの表示

@ -1,16 +1,19 @@
# raylib for Code::Blocks
**by D3nX**
<br/>
Hey! Here it is a project template to use with `Code::Blocks` =)
<br/><br/>
First, you need to download the [raylib installer](https://www.raylib.com) and run it. It will install raylib with the compiler.
<br/><br/>
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:
<br>
![Compiler Settings](compiler_settings.png)
<br/>
Finally, you can run the program and enjoy raylib running on `Code::Blocks`!
<br /><br />
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

バイナリ
projects/CodeBlocks/compiler_settings.png ファイルの表示

変更前 変更後
幅: 787  |  高さ: 583  |  サイズ: 70 KiB 幅: 756  |  高さ: 740  |  サイズ: 52 KiB

+ 1
- 5
projects/CodeBlocks/core_basic_window.c ファイルの表示

@ -1,12 +1,8 @@
/*******************************************************************************************-lraylib -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm
*
/*******************************************************************************************
* raylib [core] example - Basic window * raylib [core] example - Basic window
* *
* Welcome to raylib! * 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 * You can find all basic examples on C:\raylib\raylib\examples folder or
* raylib official webpage: www.raylib.com * raylib official webpage: www.raylib.com
* *

+ 103
- 18
projects/CodeBlocks/core_basic_window.cbp ファイルの表示

@ -2,51 +2,136 @@
<CodeBlocks_project_file> <CodeBlocks_project_file>
<FileVersion major="1" minor="6" /> <FileVersion major="1" minor="6" />
<Project> <Project>
<Option title="core_basic_window" />
<Option title="raylib-game-template" />
<Option execution_dir="." />
<Option pch_mode="2" /> <Option pch_mode="2" />
<Option compiler="gcc" /> <Option compiler="gcc" />
<Build> <Build>
<Target title="Debug">
<Option output="bin/Debug/core_basic_window" prefix_auto="1" extension_auto="1" />
<Target title="Debug (Mac)">
<Option platforms="Mac;" />
<Option output="bin/Debug/raylib-game-template" prefix_auto="1" extension_auto="1" />
<Option working_dir="." />
<Option object_output="obj/Debug/" /> <Option object_output="obj/Debug/" />
<Option type="1" /> <Option type="1" />
<Option compiler="gcc" /> <Option compiler="gcc" />
<Compiler> <Compiler>
<Add option="-g" /> <Add option="-g" />
<Add directory="../../src" />
</Compiler> </Compiler>
<Linker> <Linker>
<Add option="-lraylib -lopengl32 -lgdi32 -lwinmm" />
<Add library="../../src/libraylib.a" />
<Add library="raylib" />
<Add option="-framework OpenGL" />
<Add option="-framework Cocoa" />
<Add option="-framework IOKit" />
<Add option="-framework CoreAudio" />
<Add option="-framework CoreVideo" />
</Linker> </Linker>
</Target> </Target>
<Target title="Release">
<Option output="bin/Release/core_basic_window" prefix_auto="1" extension_auto="1" />
<Target title="Release (Mac)">
<Option platforms="Mac;" />
<Option output="bin/Release/raylib-game-template" prefix_auto="1" extension_auto="1" />
<Option working_dir="." />
<Option object_output="obj/Release/" /> <Option object_output="obj/Release/" />
<Option type="1" /> <Option type="1" />
<Option compiler="gcc" /> <Option compiler="gcc" />
<Compiler> <Compiler>
<Add option="-O2" /> <Add option="-O2" />
<Add directory="../../src" />
</Compiler> </Compiler>
<Linker> <Linker>
<Add option="-s" /> <Add option="-s" />
<Add option="-lraylib -lopengl32 -lgdi32 -lwinmm" />
<Add library="../../src/libraylib.a" />
<Add library="raylib" />
<Add option="-framework OpenGL" />
<Add option="-framework Cocoa" />
<Add option="-framework IOKit" />
<Add option="-framework CoreAudio" />
<Add option="-framework CoreVideo" />
</Linker>
</Target>
<Target title="Debug (Linux)">
<Option platforms="Unix;" />
<Option output="bin/Debug/raylib-game-template" prefix_auto="1" extension_auto="1" />
<Option working_dir="." />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
<Linker>
<Add library="raylib" />
<Add library="GL" />
<Add library="m" />
<Add library="pthread" />
<Add library="dl" />
<Add library="rt" />
<Add library="X11" />
</Linker>
</Target>
<Target title="Release (Linux)">
<Option platforms="Unix;" />
<Option output="bin/Release/raylib-game-template" prefix_auto="1" extension_auto="1" />
<Option working_dir="." />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
<Add library="raylib" />
<Add library="GL" />
<Add library="m" />
<Add library="pthread" />
<Add library="dl" />
<Add library="rt" />
<Add library="X11" />
</Linker>
</Target>
<Target title="Debug (Windows)">
<Option platforms="Windows;" />
<Option output="bin/Debug/raylib-game-template" prefix_auto="1" extension_auto="1" />
<Option working_dir="." />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
<Linker>
<Add library="raylib" />
<Add library="opengl32" />
<Add library="gdi32" />
<Add library="winmm" />
<Add option="-static" />
<Add library="pthread" />
</Linker>
</Target>
<Target title="Release (Windows)">
<Option platforms="Windows;" />
<Option output="bin/Release/raylib-game-template" prefix_auto="1" extension_auto="1" />
<Option working_dir="." />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
<Add library="raylib" />
<Add library="opengl32" />
<Add library="gdi32" />
<Add library="winmm" />
<Add option="-static" />
<Add library="pthread" />
</Linker> </Linker>
</Target> </Target>
</Build> </Build>
<Compiler> <Compiler>
<Add option="-Wall -std=c99" />
<Add option="-Wall" />
</Compiler> </Compiler>
<Unit filename="core_basic_window.c"> <Unit filename="core_basic_window.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
</Unit> </Unit>
<Extensions>
<code_completion />
<envvars />
<debugger />
<lib_finder disable_auto="1" />
</Extensions>
</Project> </Project>
</CodeBlocks_project_file> </CodeBlocks_project_file>

+ 1
- 1
projects/README.md ファイルの表示

@ -7,7 +7,7 @@ IDE | Platform(s) | Source | Example(s)
[4coder](http://4coder.net/) | Windows | ❌ | ✔️ [4coder](http://4coder.net/) | Windows | ❌ | ✔️
[Builder](https://wiki.gnome.org/Apps/Builder) | Linux | ❌ | ✔️ [Builder](https://wiki.gnome.org/Apps/Builder) | Linux | ❌ | ✔️
[CMake](https://cmake.org/) | Windows, Linux, macOS | ✔️ | ✔️ [CMake](https://cmake.org/) | Windows, Linux, macOS | ✔️ | ✔️
[CodeBlocks](http://www.codeblocks.org/) | Windows, Linux | ❌ | ✔️
[CodeBlocks](http://www.codeblocks.org/) | Windows, Linux, macOS | ❌ | ✔️
[Geany](https://www.geany.org/) | Windows, Linux | ✔️ | ✔️ [Geany](https://www.geany.org/) | Windows, Linux | ✔️ | ✔️
[Notepad++](https://notepad-plus-plus.org/) | Windows | ✔️ | ✔️ [Notepad++](https://notepad-plus-plus.org/) | Windows | ✔️ | ✔️
[SublimeText](https://www.sublimetext.com/) | Windows, Linux, macOS | ✔️ | ✔️ [SublimeText](https://www.sublimetext.com/) | Windows, Linux, macOS | ✔️ | ✔️

読み込み中…
キャンセル
保存