update rpi instructions
This commit is contained in:
parent
e7f522c6e4
commit
594fe4d41a
5 changed files with 126 additions and 28 deletions
|
@ -3,6 +3,9 @@ Raspberry Pi
|
|||
|
||||
Please use Raspberry Pi OS Bullseye. Older OSes are not tested.
|
||||
|
||||
Binary wheel
|
||||
------------
|
||||
|
||||
We have published a binary wheel using Raylib in X11 mode. This *should* install and work on Bullseye
|
||||
with
|
||||
|
||||
|
@ -10,30 +13,59 @@ with
|
|||
|
||||
python3.9 -m pip install raylib==4.2.1.2
|
||||
|
||||
If it doesn't work, or we haven't published a binary wheel for the latest version,
|
||||
If it doesn't work, or you're not on Bullseye, or you want a newer version,
|
||||
or if you want to use Raylib in ``PLATFORM_DRM`` mode, you will need to compile your own raylib.
|
||||
For full instructins on this, see https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi . If you need help with this ask Raylib.
|
||||
For full instructions on this, see https://github.com/raysan5/raylib/wiki/Working-on-Raspberry-Pi . If you need help with this ask Raylib.
|
||||
|
||||
This 'worked for me':
|
||||
Compile Raylib from source DRM mode
|
||||
-----------------------------------
|
||||
|
||||
As far as I can tell, Raylib DRM is broken. It doesn't work on my Pi. However, if you want to compile it and
|
||||
give it a go, these are the commands:
|
||||
|
||||
::
|
||||
|
||||
git clone https://github.com/raysan5/raylib.git --branch 4.2.0 --single-branch
|
||||
git clone https://github.com/raysan5/raylib.git --branch 5.0 --single-branch
|
||||
cd raylib
|
||||
mkdir build
|
||||
rm rf build/*
|
||||
cd build
|
||||
cmake -DPLATFORM="DRM" -DINCLUDE_EVERYTHING=on -DSUPPORT_FILEFORMAT_JPG=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake -DPLATFORM="DRM" -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
sudo make install
|
||||
|
||||
Then have pip compile the wheel:
|
||||
Then have pip compile and install the wheel with some extra linker flags:
|
||||
|
||||
::
|
||||
|
||||
sudo apt update
|
||||
sudo apt install python3-pip
|
||||
pip3 install setuptools
|
||||
pip3 install --no-cache-dir --no-binary raylib --upgrade --force-reinstall raylib==4.2.1.2
|
||||
LDFLAGS="-lgbm -ldrm -lEGL" pip3 install --no-cache-dir --no-binary raylib --upgrade --force-reinstall raylib==5.0.0.0
|
||||
|
||||
Compile Raylib from source X11 mode
|
||||
-----------------------------------
|
||||
|
||||
::
|
||||
|
||||
git clone https://github.com/raysan5/raylib.git --branch 5.0 --single-branch
|
||||
cd raylib
|
||||
mkdir build
|
||||
rm -rf build/*
|
||||
cd build
|
||||
cmake -DPLATFORM="Desktop" -DOPENGL_VERSION=2.1 -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
sudo make install
|
||||
|
||||
Then have pip compile and install the wheel:
|
||||
|
||||
::
|
||||
|
||||
sudo apt update
|
||||
sudo apt install python3-pip
|
||||
pip3 install setuptools
|
||||
pip3 install --no-cache-dir --no-binary raylib --upgrade --force-reinstall raylib==5.0.0.0
|
||||
|
||||
(or newer version)
|
||||
|
||||
.. attention::
|
||||
|
||||
|
|
Reference in a new issue