Update to the explanations of building raylib for different OS versions of Raspbian; including example compilation scripts. Some minor typo corrections.

master
Coo Chew Games vor 10 Monaten
Ursprung
Commit
424d8f1076
1 geänderte Dateien mit 33 neuen und 5 gelöschten Zeilen
  1. +33
    -5
      Working-on-Raspberry-Pi.md

+ 33
- 5
Working-on-Raspberry-Pi.md

@ -60,24 +60,52 @@ sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev libxrandr-dev lib
**2. To compile in native mode (no X11)**
On Rapsberry Pi 0-4 using RPI OS Bullseye or newer:
On Raspberry Pi models 0 to 4 using the Raspbian OS:
##### Buster:
```
make PLATFORM=PLATFORM_DRM
make PLATFORM=PLATFORM_RPI
```
NOTE: To compile raylib in native mode on Raspberry Pi 4, you need the specific DRM libraries:
##### Bullseye or newer:
To compile raylib in native mode on Bullseye or newer, you will need the install the DRM libraries:
```
sudo apt-get install libdrm-dev libegl1-mesa-dev libgles2-mesa-dev libgbm-dev
```
raylib also works on [DietPi](https://dietpi.com/) distribution, following libraries are required:
To build raylib:
```
make PLATFORM=PLATFORM_DRM
```
##### DietPi
raylib also works on the [DietPi](https://dietpi.com/) distribution, though the following libraries are required prior to building raylib:
```
sudo apt-get install libraspberrypi-dev raspberrypi-kernel-headers
sudo apt-get install build-essential
```
#### Example compilation scripts for building a raylib application
The following are example compilation commands that can be used to build a raylib application assuming the raylib repository has been cloned to a parent directory to the application code.
```
./raylib/src
./app
```
The example assumes the application is built from `x.c` in the `app` directory. The emphasis is which libraries to utilise when building on the earlier and later versions of Raspbian OS. The examples provided are derived from code written on a Pi 0.
##### Buster
```
cc -o x x.c -I../raylib/src -I/opt/vc/include -L../raylib/src -L/opt/vc/lib -lraylib -lm -lpthread -lbrcmGLESv2 -lbrcmEGL -lvcos -lvchiq_arm -lbcm_host
```
##### Bullseye
```
cc -o x x.c -I../raylib/src -I/opt/vc/include -L../raylib/src -L/opt/vc/lib -lraylib -lm -lpthread -lGLESv2 -lEGL -lvcos -lvchiq_arm -lgbm -ldrm
```
**3. To compile on OPENBOX**
**WARNIGN:** The program compiled as `PLATFORM_DRM` under _openbox_ fails (More testing is required).
**WARNING:** The program compiled as `PLATFORM_DRM` under _openbox_ fails (More testing is required).
_It is untested._

Laden…
Abbrechen
Speichern