diff --git a/RPI.rst b/RPI.rst index 09f4dcf..56ff0a3 100644 --- a/RPI.rst +++ b/RPI.rst @@ -23,7 +23,7 @@ This should work for everyone. :: sudo apt update - sudo python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev libglfw3-dev + sudo apt install python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev libglfw3-dev git clone https://github.com/raysan5/raylib.git --branch 5.0 --single-branch cd raylib mkdir build @@ -38,34 +38,51 @@ Then have pip compile and install the wheel: :: - python -m pip install --break-system-packages setuptools - python -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3 + python3 -m pip install --break-system-packages setuptools + python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3 Option 3: Compile Raylib from source DRM mode --------------------------------------------- This seems to work on Raspberry Pi 4. Note you must not be running X11 when you run your programs. +If you have ever installed Raylib or raylib-python-cffi before, remove all traces of it: + +:: + + sudo apt remove raylib raylib-dev libraylib libraylib-dev + sudo rm /usr/local/lib/pkgconfig/raylib.pc + sudo rm -rf /usr/local/lib/libraylib.* /usr/lib/libraylib.* + +Remove all GLFW: + +:: + + sudo apt remove libglfw3-dev libglfw3 + sudo rm -rf /usr/local/include/GLFW + +Build a shared lib version of Raylib in DRM mode and install to /usr: + :: sudo apt update - sudo python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev libglfw3-dev + sudo apt install python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev 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" -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=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 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr .. make sudo make install - sudo cp -r ../src/external/glfw/include/GLFW /usr/local/include/ + -Then have pip compile and install the wheel with some extra linker flags: +Then have pip compile and install the wheel: :: - python -m pip install --break-system-packages setuptools - LDFLAGS="-lgbm -ldrm -lEGL" pip3 install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3 + python3 -m pip install --break-system-packages setuptools + python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3 diff --git a/docs/RPI.html b/docs/RPI.html index af48069..0c320b5 100644 --- a/docs/RPI.html +++ b/docs/RPI.html @@ -110,7 +110,7 @@ For full instructions on this, see
This should work for everyone.
sudo apt update
-sudo python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev libglfw3-dev
+sudo apt install python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev libglfw3-dev
git clone https://github.com/raysan5/raylib.git --branch 5.0 --single-branch
cd raylib
mkdir build
@@ -123,30 +123,41 @@ For full instructions on this, see python -m pip install --break-system-packages setuptools
-python -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3
+python3 -m pip install --break-system-packages setuptools
+python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3
Option 3: Compile Raylib from source DRM mode
This seems to work on Raspberry Pi 4. Note you must not be running X11 when you run your programs.
+If you have ever installed Raylib or raylib-python-cffi before, remove all traces of it:
+sudo apt remove raylib raylib-dev libraylib libraylib-dev
+sudo rm /usr/local/lib/pkgconfig/raylib.pc
+sudo rm -rf /usr/local/lib/libraylib.* /usr/lib/libraylib.*
+
+
+Remove all GLFW:
+sudo apt remove libglfw3-dev libglfw3
+sudo rm -rf /usr/local/include/GLFW
+
+
+Build a shared lib version of Raylib in DRM mode and install to /usr:
sudo apt update
-sudo python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev libglfw3-dev
+sudo apt install python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev
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" -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=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 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
make
sudo make install
-sudo cp -r ../src/external/glfw/include/GLFW /usr/local/include/
-Then have pip compile and install the wheel with some extra linker flags:
-python -m pip install --break-system-packages setuptools
-LDFLAGS="-lgbm -ldrm -lEGL" pip3 install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3
+Then have pip compile and install the wheel:
+python3 -m pip install --break-system-packages setuptools
+python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3
diff --git a/docs/_sources/RPI.rst.txt b/docs/_sources/RPI.rst.txt
index 09f4dcf..56ff0a3 100644
--- a/docs/_sources/RPI.rst.txt
+++ b/docs/_sources/RPI.rst.txt
@@ -23,7 +23,7 @@ This should work for everyone.
::
sudo apt update
- sudo python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev libglfw3-dev
+ sudo apt install python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev libglfw3-dev
git clone https://github.com/raysan5/raylib.git --branch 5.0 --single-branch
cd raylib
mkdir build
@@ -38,34 +38,51 @@ Then have pip compile and install the wheel:
::
- python -m pip install --break-system-packages setuptools
- python -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3
+ python3 -m pip install --break-system-packages setuptools
+ python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3
Option 3: Compile Raylib from source DRM mode
---------------------------------------------
This seems to work on Raspberry Pi 4. Note you must not be running X11 when you run your programs.
+If you have ever installed Raylib or raylib-python-cffi before, remove all traces of it:
+
+::
+
+ sudo apt remove raylib raylib-dev libraylib libraylib-dev
+ sudo rm /usr/local/lib/pkgconfig/raylib.pc
+ sudo rm -rf /usr/local/lib/libraylib.* /usr/lib/libraylib.*
+
+Remove all GLFW:
+
+::
+
+ sudo apt remove libglfw3-dev libglfw3
+ sudo rm -rf /usr/local/include/GLFW
+
+Build a shared lib version of Raylib in DRM mode and install to /usr:
+
::
sudo apt update
- sudo python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev libglfw3-dev
+ sudo apt install python3-pip cmake libegl1-mesa-dev libgbm-dev libgles2-mesa-dev libdrm-dev
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" -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=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 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
make
sudo make install
- sudo cp -r ../src/external/glfw/include/GLFW /usr/local/include/
+
-Then have pip compile and install the wheel with some extra linker flags:
+Then have pip compile and install the wheel:
::
- python -m pip install --break-system-packages setuptools
- LDFLAGS="-lgbm -ldrm -lEGL" pip3 install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3
+ python3 -m pip install --break-system-packages setuptools
+ python3 -m pip install --no-cache-dir --no-binary raylib --upgrade --force-reinstall --break-system-packages raylib==5.0.0.3