Skip to content

Commit 9fdcfd2

Browse files
committed
Windows build recipe (MinGW)
1 parent 3d828c5 commit 9fdcfd2

11 files changed

Lines changed: 12692 additions & 1 deletion

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
main
22
nob
3-
nob.old
3+
nob.old
4+
main.exe
5+
nob.exe
6+
nob.exe.old

nob.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ Cmd cmd = {0};
77
int main(int argc, char **argv)
88
{
99
NOB_GO_REBUILD_URSELF(argc, argv);
10+
#ifdef _WIN32
11+
cmd_append(&cmd, "cc");
12+
cmd_append(&cmd, "-Wall");
13+
cmd_append(&cmd, "-Wextra");
14+
cmd_append(&cmd, "-ggdb");
15+
cmd_append(&cmd, "-I./raylib-5.5_win64_mingw-w64/include/");
16+
cmd_append(&cmd, "-o", "main.exe", "main.c");
17+
cmd_append(&cmd, "-L./raylib-5.5_win64_mingw-w64/lib/");
18+
cmd_append(&cmd, "-l:libraylib.a");
19+
cmd_append(&cmd, "-lgdi32", "-lwinmm");
20+
#else
1021
cmd_append(&cmd, "cc");
1122
cmd_append(&cmd, "-Wall");
1223
cmd_append(&cmd, "-Wextra");
@@ -16,6 +27,7 @@ int main(int argc, char **argv)
1627
cmd_append(&cmd, "-L./raylib-5.5_linux_amd64/lib/");
1728
cmd_append(&cmd, "-l:libraylib.a");
1829
cmd_append(&cmd, "-lm");
30+
#endif
1931
if (!cmd_run(&cmd)) return 1;
2032
return 0;
2133
}

raylib-5.5_win64_mingw-w64/CHANGELOG

Lines changed: 2599 additions & 0 deletions
Large diffs are not rendered by default.

raylib-5.5_win64_mingw-w64/LICENSE

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
2+
3+
This software is provided "as-is", without any express or implied warranty. In no event
4+
will the authors be held liable for any damages arising from the use of this software.
5+
6+
Permission is granted to anyone to use this software for any purpose, including commercial
7+
applications, and to alter it and redistribute it freely, subject to the following restrictions:
8+
9+
1. The origin of this software must not be misrepresented; you must not claim that you
10+
wrote the original software. If you use this software in a product, an acknowledgment
11+
in the product documentation would be appreciated but is not required.
12+
13+
2. Altered source versions must be plainly marked as such, and must not be misrepresented
14+
as being the original software.
15+
16+
3. This notice may not be removed or altered from any source distribution.
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
<img align="left" style="width:260px" src="https://github.com/raysan5/raylib/blob/master/logo/raylib_logo_animation.gif" width="288px">
2+
3+
**raylib is a simple and easy-to-use library to enjoy videogames programming.**
4+
5+
raylib is highly inspired by Borland BGI graphics lib and by XNA framework and it's especially well suited for prototyping, tooling, graphical applications, embedded systems and education.
6+
7+
*NOTE for ADVENTURERS: raylib is a programming library to enjoy videogames programming; no fancy interface, no visual helpers, no debug button... just coding in the most pure spartan-programmers way.*
8+
9+
Ready to learn? Jump to [code examples!](https://www.raylib.com/examples.html)
10+
11+
---
12+
13+
<br>
14+
15+
[![GitHub Releases Downloads](https://img.shields.io/github/downloads/raysan5/raylib/total)](https://github.com/raysan5/raylib/releases)
16+
[![GitHub Stars](https://img.shields.io/github/stars/raysan5/raylib?style=flat&label=stars)](https://github.com/raysan5/raylib/stargazers)
17+
[![GitHub commits since tagged version](https://img.shields.io/github/commits-since/raysan5/raylib/5.0)](https://github.com/raysan5/raylib/commits/master)
18+
[![GitHub Sponsors](https://img.shields.io/github/sponsors/raysan5?label=sponsors)](https://github.com/sponsors/raysan5)
19+
[![Packaging Status](https://repology.org/badge/tiny-repos/raylib.svg)](https://repology.org/project/raylib/versions)
20+
[![License](https://img.shields.io/badge/license-zlib%2Flibpng-blue.svg)](LICENSE)
21+
22+
[![Discord Members](https://img.shields.io/discord/426912293134270465.svg?label=Discord&logo=discord)](https://discord.gg/raylib)
23+
[![Reddit Static Badge](https://img.shields.io/badge/-r%2Fraylib-red?style=flat&logo=reddit&label=reddit)](https://www.reddit.com/r/raylib/)
24+
[![Youtube Subscribers](https://img.shields.io/youtube/channel/subscribers/UC8WIBkhYb5sBNqXO1mZ7WSQ?style=flat&label=Youtube&logo=youtube)](https://www.youtube.com/c/raylib)
25+
[![Twitch Status](https://img.shields.io/twitch/status/raysan5?style=flat&label=Twitch&logo=twitch)](https://www.twitch.tv/raysan5)
26+
27+
[![Windows](https://github.com/raysan5/raylib/workflows/Windows/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3AWindows)
28+
[![Linux](https://github.com/raysan5/raylib/workflows/Linux/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3ALinux)
29+
[![macOS](https://github.com/raysan5/raylib/workflows/macOS/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3AmacOS)
30+
[![WebAssembly](https://github.com/raysan5/raylib/workflows/WebAssembly/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3AWebAssembly)
31+
32+
[![CMakeBuilds](https://github.com/raysan5/raylib/workflows/CMakeBuilds/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3ACMakeBuilds)
33+
[![Windows Examples](https://github.com/raysan5/raylib/actions/workflows/windows_examples.yml/badge.svg)](https://github.com/raysan5/raylib/actions/workflows/windows_examples.yml)
34+
[![Linux Examples](https://github.com/raysan5/raylib/actions/workflows/linux_examples.yml/badge.svg)](https://github.com/raysan5/raylib/actions/workflows/linux_examples.yml)
35+
36+
features
37+
--------
38+
- **NO external dependencies**, all required libraries are [bundled into raylib](https://github.com/raysan5/raylib/tree/master/src/external)
39+
- Multiple platforms supported: **Windows, Linux, MacOS, RPI, Android, HTML5... and more!**
40+
- Written in plain C code (C99) using PascalCase/camelCase notation
41+
- Hardware accelerated with OpenGL (**1.1, 2.1, 3.3, 4.3, ES 2.0, ES 3.0**)
42+
- **Unique OpenGL abstraction layer** (usable as standalone module): [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h)
43+
- Multiple **Fonts** formats supported (TTF, OTF, FNT, BDF, sprite fonts)
44+
- Multiple texture formats supported, including **compressed formats** (DXT, ETC, ASTC)
45+
- **Full 3D support**, including 3D Shapes, Models, Billboards, Heightmaps and more!
46+
- Flexible Materials system, supporting classic maps and **PBR maps**
47+
- **Animated 3D models** supported (skeletal bones animation) (IQM, M3D, glTF)
48+
- Shaders support, including model shaders and **postprocessing** shaders
49+
- **Powerful math module** for Vector, Matrix and Quaternion operations: [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h)
50+
- Audio loading and playing with streaming support (WAV, QOA, OGG, MP3, FLAC, XM, MOD)
51+
- **VR stereo rendering** support with configurable HMD device parameters
52+
- Huge examples collection with [+140 code examples](https://github.com/raysan5/raylib/tree/master/examples)!
53+
- Bindings to [+70 programming languages](https://github.com/raysan5/raylib/blob/master/BINDINGS.md)!
54+
- **Free and open source**
55+
56+
basic example
57+
--------------
58+
This is a basic raylib example, it creates a window and draws the text `"Congrats! You created your first window!"` in the middle of the screen. Check this example [running live on web here](https://www.raylib.com/examples/core/loader.html?name=core_basic_window).
59+
```c
60+
#include "raylib.h"
61+
62+
int main(void)
63+
{
64+
InitWindow(800, 450, "raylib [core] example - basic window");
65+
66+
while (!WindowShouldClose())
67+
{
68+
BeginDrawing();
69+
ClearBackground(RAYWHITE);
70+
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
71+
EndDrawing();
72+
}
73+
74+
CloseWindow();
75+
76+
return 0;
77+
}
78+
```
79+
80+
build and installation
81+
----------------------
82+
83+
raylib binary releases for Windows, Linux, macOS, Android and HTML5 are available at the [Github Releases page](https://github.com/raysan5/raylib/releases).
84+
85+
raylib is also available via multiple package managers on multiple OS distributions.
86+
87+
#### Installing and building raylib on multiple platforms
88+
89+
[raylib Wiki](https://github.com/raysan5/raylib/wiki#development-platforms) contains detailed instructions on building and usage on multiple platforms.
90+
91+
- [Working on Windows](https://github.com/raysan5/raylib/wiki/Working-on-Windows)
92+
- [Working on macOS](https://github.com/raysan5/raylib/wiki/Working-on-macOS)
93+
- [Working on GNU Linux](https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux)
94+
- [Working on Chrome OS](https://github.com/raysan5/raylib/wiki/Working-on-Chrome-OS)
95+
- [Working on FreeBSD](https://github.com/raysan5/raylib/wiki/Working-on-FreeBSD)
96+
- [Working on Raspberry Pi](https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi)
97+
- [Working for Android](https://github.com/raysan5/raylib/wiki/Working-for-Android)
98+
- [Working for Web (HTML5)](https://github.com/raysan5/raylib/wiki/Working-for-Web-(HTML5))
99+
- [Working anywhere with CMake](https://github.com/raysan5/raylib/wiki/Working-with-CMake)
100+
101+
*Note that the Wiki is open for edit, if you find some issues while building raylib for your target platform, feel free to edit the Wiki or open an issue related to it.*
102+
103+
#### Setup raylib with multiple IDEs
104+
105+
raylib has been developed on Windows platform using [Notepad++](https://notepad-plus-plus.org/) and [MinGW GCC](https://www.mingw-w64.org/) compiler but it can be used with other IDEs on multiple platforms.
106+
107+
[Projects directory](https://github.com/raysan5/raylib/tree/master/projects) contains several ready-to-use **project templates** to build raylib and code examples with multiple IDEs.
108+
109+
*Note that there are lots of IDEs supported, some of the provided templates could require some review, so please, if you find some issue with a template or you think they could be improved, feel free to send a PR or open a related issue.*
110+
111+
learning and docs
112+
------------------
113+
114+
raylib is designed to be learned using [the examples](https://github.com/raysan5/raylib/tree/master/examples) as the main reference. There is no standard API documentation but there is a [**cheatsheet**](https://www.raylib.com/cheatsheet/cheatsheet.html) containing all the functions available on the library a short description of each one of them, input parameters and result value names should be intuitive enough to understand how each function works.
115+
116+
Some additional documentation about raylib design can be found in [raylib GitHub Wiki](https://github.com/raysan5/raylib/wiki). Here are the relevant links:
117+
118+
- [raylib cheatsheet](https://www.raylib.com/cheatsheet/cheatsheet.html)
119+
- [raylib architecture](https://github.com/raysan5/raylib/wiki/raylib-architecture)
120+
- [raylib library design](https://github.com/raysan5/raylib/wiki)
121+
- [raylib examples collection](https://github.com/raysan5/raylib/tree/master/examples)
122+
- [raylib games collection](https://github.com/raysan5/raylib-games)
123+
124+
125+
contact and networks
126+
---------------------
127+
128+
raylib is present in several networks and raylib community is growing everyday. If you are using raylib and enjoying it, feel free to join us in any of these networks. The most active network is our [Discord server](https://discord.gg/raylib)! :)
129+
130+
- Webpage: [https://www.raylib.com](https://www.raylib.com)
131+
- Discord: [https://discord.gg/raylib](https://discord.gg/raylib)
132+
- Twitter: [https://www.twitter.com/raysan5](https://www.twitter.com/raysan5)
133+
- Twitch: [https://www.twitch.tv/raysan5](https://www.twitch.tv/raysan5)
134+
- Reddit: [https://www.reddit.com/r/raylib](https://www.reddit.com/r/raylib)
135+
- Patreon: [https://www.patreon.com/raylib](https://www.patreon.com/raylib)
136+
- YouTube: [https://www.youtube.com/channel/raylib](https://www.youtube.com/c/raylib)
137+
138+
contributors
139+
------------
140+
141+
<a href="https://github.com/raysan5/raylib/graphs/contributors">
142+
<img src="https://contrib.rocks/image?repo=raysan5/raylib&max=500&columns=20&anon=1" />
143+
</a>
144+
145+
license
146+
-------
147+
148+
raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check [LICENSE](LICENSE) for further details.
149+
150+
raylib uses internally some libraries for window/graphics/inputs management and also to support different file formats loading, all those libraries are embedded with and are available in [src/external](https://github.com/raysan5/raylib/tree/master/src/external) directory. Check [raylib dependencies LICENSES](https://github.com/raysan5/raylib/wiki/raylib-dependencies) on [raylib Wiki](https://github.com/raysan5/raylib/wiki) for details.

0 commit comments

Comments
 (0)