Skip to content

Commit 3ac76b8

Browse files
fix warning on linux builds and update docs
1 parent 3e011b3 commit 3ac76b8

32 files changed

+28523
-22688
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jobs:
189189
cd raylib-c
190190
mkdir build
191191
cd build
192-
cmake -DBUILD_EXAMPLES=off -DINCLUDE_EVERYTHING=on -DSUPPORT_FILEFORMAT_JPG=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
192+
cmake -DBUILD_EXAMPLES=off -DINCLUDE_EVERYTHING=on -DSUPPORT_FILEFORMAT_JPG=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release -DOpenGL_GL_PREFERENCE=GLVND ..
193193
make -j2
194194
sudo make install
195195
- name: Copy extras

docs/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 76ca504c87a97062e6f8d0973741212b
3+
config: 999398ae0ca6fd9fb3a4ff0f644e1a93
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/BUILDING.html

Lines changed: 29 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
<!DOCTYPE html>
22
<html class="writer-html5" lang="en" >
33
<head>
4-
<meta charset="utf-8" />
4+
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
5+
56
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>Building from source &mdash; Raylib Python documentation</title><link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
7-
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
7+
<title>Building from source &mdash; Raylib Python documentation</title>
8+
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
9+
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
810
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
911
<!--[if lt IE 9]>
1012
<script src="_static/js/html5shiv.min.js"></script>
1113
<![endif]-->
12-
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
14+
15+
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
1316
<script src="_static/jquery.js"></script>
1417
<script src="_static/underscore.js"></script>
1518
<script src="_static/doctools.js"></script>
1619
<script src="_static/js/theme.js"></script>
1720
<link rel="index" title="Index" href="genindex.html" />
1821
<link rel="search" title="Search" href="search.html" />
22+
<link rel="next" title="Raspberry Pi" href="RPI.html" />
1923
<link rel="prev" title="Dynamic Bindings" href="dynamic.html" />
2024
</head>
2125

@@ -34,9 +38,9 @@
3438
</form>
3539
</div>
3640
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
37-
<p class="caption"><span class="caption-text">Contents:</span></p>
41+
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
3842
<ul class="current">
39-
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.0.0</a></li>
43+
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.2</a></li>
4044
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
4145
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
4246
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
@@ -56,11 +60,11 @@
5660
<li class="toctree-l3"><a class="reference internal" href="#windows-manual-build">Windows manual build</a></li>
5761
<li class="toctree-l3"><a class="reference internal" href="#linux-manual-build">Linux manual build</a></li>
5862
<li class="toctree-l3"><a class="reference internal" href="#macos-manual-build">Macos manual build</a></li>
59-
<li class="toctree-l3"><a class="reference internal" href="#raspberry-pi">Raspberry Pi</a></li>
6063
</ul>
6164
</li>
6265
</ul>
6366
</li>
67+
<li class="toctree-l1"><a class="reference internal" href="RPI.html">Raspberry Pi</a></li>
6468
</ul>
6569

6670
</div>
@@ -87,14 +91,15 @@
8791
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
8892
<div itemprop="articleBody">
8993

90-
<div class="section" id="building-from-source">
94+
<section id="building-from-source">
9195
<h1>Building from source<a class="headerlink" href="#building-from-source" title="Permalink to this headline"></a></h1>
92-
<div class="section" id="have-pip-build-from-source">
96+
<section id="have-pip-build-from-source">
9397
<h2>Have Pip build from source<a class="headerlink" href="#have-pip-build-from-source" title="Permalink to this headline"></a></h2>
9498
<p>This is useful if the binaries don’t work on your system, or you want to use a newer version of Raylib.</p>
9599
<p>First make sure Raylib is installed. On Linux/Mac it must include the pkg-config files. Best way to ensure this
96100
is to compile and install Raylib using CMake: <a class="reference external" href="https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake">https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake</a></p>
97-
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">raylib</span><span class="o">-</span><span class="mf">4.0</span><span class="o">.</span><span class="mi">0</span>
101+
<p>Requirements for build: cmake, pkg-config.</p>
102+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">raylib</span><span class="o">-</span><span class="mf">4.2.0</span>
98103
<span class="n">mkdir</span> <span class="n">build</span>
99104
<span class="n">cd</span> <span class="n">build</span>
100105
<span class="n">cmake</span> <span class="o">-</span><span class="n">DWITH_PIC</span><span class="o">=</span><span class="n">on</span> <span class="o">-</span><span class="n">DCMAKE_BUILD_TYPE</span><span class="o">=</span><span class="n">Release</span> <span class="o">..</span>
@@ -106,8 +111,8 @@ <h2>Have Pip build from source<a class="headerlink" href="#have-pip-build-from-s
106111
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip3</span> <span class="n">install</span> <span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">binary</span> <span class="n">raylib</span> <span class="o">--</span><span class="n">upgrade</span> <span class="o">--</span><span class="n">force</span><span class="o">-</span><span class="n">reinstall</span> <span class="n">raylib</span>
107112
</pre></div>
108113
</div>
109-
</div>
110-
<div class="section" id="or-build-from-source-manually">
114+
</section>
115+
<section id="or-build-from-source-manually">
111116
<h2>Or, Build from source manually<a class="headerlink" href="#or-build-from-source-manually" title="Permalink to this headline"></a></h2>
112117
<p>Useful if the Pip build doesn’t work and you want to debug it, or you want to contribute to the
113118
project.</p>
@@ -118,7 +123,7 @@ <h2>Or, Build from source manually<a class="headerlink" href="#or-build-from-sou
118123
</div>
119124
<p>Manual instructions follow, but may be outdated, so see also how we actually build the wheels
120125
at <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/blob/master/.github/workflows/build.yml">https://github.com/electronstudio/raylib-python-cffi/blob/master/.github/workflows/build.yml</a></p>
121-
<div class="section" id="windows-manual-build">
126+
<section id="windows-manual-build">
122127
<h3>Windows manual build<a class="headerlink" href="#windows-manual-build" title="Permalink to this headline"></a></h3>
123128
<p>Clone this repo including submodules so you get correct version of
124129
Raylib.</p>
@@ -154,13 +159,13 @@ <h3>Windows manual build<a class="headerlink" href="#windows-manual-build" title
154159
Would be useful if some Windows user could figure out how to auto detect this.</p>
155160
</div>
156161
<p>Then install it:</p>
157-
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip3</span> <span class="n">install</span> <span class="n">dist</span>\<span class="n">raylib</span><span class="o">-</span><span class="mf">3.7</span><span class="o">.</span><span class="mi">0</span><span class="o">-</span><span class="n">cp37</span><span class="o">-</span><span class="n">cp37m</span><span class="o">-</span><span class="n">win_amd64</span><span class="o">.</span><span class="n">whl</span>
162+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip3</span> <span class="n">install</span> <span class="n">dist</span>\<span class="n">raylib</span><span class="o">-</span><span class="mf">3.7.0</span><span class="o">-</span><span class="n">cp37</span><span class="o">-</span><span class="n">cp37m</span><span class="o">-</span><span class="n">win_amd64</span><span class="o">.</span><span class="n">whl</span>
158163
</pre></div>
159164
</div>
160165
<p>(Note: your wheel’s filename will probably be different than the one
161166
here.)</p>
162-
</div>
163-
<div class="section" id="linux-manual-build">
167+
</section>
168+
<section id="linux-manual-build">
164169
<h3>Linux manual build<a class="headerlink" href="#linux-manual-build" title="Permalink to this headline"></a></h3>
165170
<p>Clone this repo including submodules so you get correct version of
166171
Raylib.</p>
@@ -173,7 +178,7 @@ <h3>Linux manual build<a class="headerlink" href="#linux-manual-build" title="Pe
173178
<p>You can instead use a different version of Raylib you installed from elsewhere, and it should still
174179
work!</p>
175180
</div>
176-
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span> <span class="n">install</span> <span class="n">cmake</span> <span class="n">libasound2</span><span class="o">-</span><span class="n">dev</span> <span class="n">mesa</span><span class="o">-</span><span class="n">common</span><span class="o">-</span><span class="n">dev</span> <span class="n">libx11</span><span class="o">-</span><span class="n">dev</span> <span class="n">libxrandr</span><span class="o">-</span><span class="n">dev</span> <span class="n">libxi</span><span class="o">-</span><span class="n">dev</span> <span class="n">xorg</span><span class="o">-</span><span class="n">dev</span> <span class="n">libgl1</span><span class="o">-</span><span class="n">mesa</span><span class="o">-</span><span class="n">dev</span> <span class="n">libglu1</span><span class="o">-</span><span class="n">mesa</span><span class="o">-</span><span class="n">dev</span>
181+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span> <span class="n">install</span> <span class="n">cmake</span> <span class="n">libasound2</span><span class="o">-</span><span class="n">dev</span> <span class="n">mesa</span><span class="o">-</span><span class="n">common</span><span class="o">-</span><span class="n">dev</span> <span class="n">libx11</span><span class="o">-</span><span class="n">dev</span> <span class="n">libxrandr</span><span class="o">-</span><span class="n">dev</span> <span class="n">libxi</span><span class="o">-</span><span class="n">dev</span> <span class="n">xorg</span><span class="o">-</span><span class="n">dev</span> <span class="n">libgl1</span><span class="o">-</span><span class="n">mesa</span><span class="o">-</span><span class="n">dev</span> <span class="n">libglu1</span><span class="o">-</span><span class="n">mesa</span><span class="o">-</span><span class="n">dev</span> <span class="n">pkg</span><span class="o">-</span><span class="n">config</span> <span class="n">cmake</span>
177182
<span class="n">cd</span> <span class="n">raylib</span><span class="o">-</span><span class="n">python</span><span class="o">-</span><span class="n">cffi</span><span class="o">/</span><span class="n">raylib</span><span class="o">-</span><span class="n">c</span>
178183
<span class="n">mkdir</span> <span class="n">build</span>
179184
<span class="n">cd</span> <span class="n">build</span>
@@ -195,7 +200,7 @@ <h3>Linux manual build<a class="headerlink" href="#linux-manual-build" title="Pe
195200
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">../..</span>
196201
</pre></div>
197202
</div>
198-
<p>Build</p>
203+
<p>Build the Python library:</p>
199204
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip3</span> <span class="n">install</span> <span class="n">cffi</span>
200205
<span class="n">rm</span> <span class="o">-</span><span class="n">rf</span> <span class="n">build</span> <span class="n">raylib</span><span class="o">/</span><span class="n">_raylib_cffi</span><span class="o">.*</span>
201206
<span class="n">python3</span> <span class="n">raylib</span><span class="o">/</span><span class="n">build</span><span class="o">.</span><span class="n">py</span>
@@ -233,8 +238,8 @@ <h3>Linux manual build<a class="headerlink" href="#linux-manual-build" title="Pe
233238
<p>Separate the instructions for preparing the dynamic module
234239
from the instructions for building the static module!</p>
235240
</div>
236-
</div>
237-
<div class="section" id="macos-manual-build">
241+
</section>
242+
<section id="macos-manual-build">
238243
<h3>Macos manual build<a class="headerlink" href="#macos-manual-build" title="Permalink to this headline"></a></h3>
239244
<p>These instructions have been tested on Macos 10.14.</p>
240245
<p>Clone this repo including submodules so you get correct version of
@@ -260,44 +265,16 @@ <h3>Macos manual build<a class="headerlink" href="#macos-manual-build" title="Pe
260265
<span class="n">python3</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">install</span>
261266
</pre></div>
262267
</div>
263-
</div>
264-
<div class="section" id="raspberry-pi">
265-
<h3>Raspberry Pi<a class="headerlink" href="#raspberry-pi" title="Permalink to this headline"></a></h3>
266-
<p>Latest info: <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/issues/55#issuecomment-1012629701">https://github.com/electronstudio/raylib-python-cffi/issues/55#issuecomment-1012629701</a></p>
267-
<p>Old possibly out of date info that was written for RPi3 and Raylib 3 follows.</p>
268-
<p>The integrated GPU hardware in a Raspberry Pi (“VideoCore”) is rather
269-
idiosyncratic, resulting in a complex set of software options. Probably
270-
the most interesting two options for Raylib applications are:</p>
271-
<ol class="arabic simple">
272-
<li><p>Use the Broadcom proprietary Open GL ES 2.0 drivers, installed by
273-
Raspbian into <code class="docutils literal notranslate"><span class="pre">/opt/vc</span></code>. These are 32-bit only, and currently X11
274-
doesn’t use these for its acceleration, so this is most suitable for
275-
driving the entire HDMI output from one application with minimal
276-
overhead (no X11).</p></li>
277-
<li><p>Use the more recent open-source <code class="docutils literal notranslate"><span class="pre">vc4-fkms-v3d</span></code> kernel driver. This
278-
can run in either 32-bit or 64-bit, and X11 can use these, so using
279-
X11 is probably the more common choice here.</p></li>
280-
</ol>
281-
<p>With option 2, the regular linux install instructions above should
282-
probably work as-is.</p>
283-
<p>For option 1, then also follow the above instructions, but with these
284-
modifications:</p>
285-
<ul class="simple">
286-
<li><p>With <code class="docutils literal notranslate"><span class="pre">cmake</span></code>, use
287-
<code class="docutils literal notranslate"><span class="pre">cmake</span> <span class="pre">-DWITH_PIC=on</span> <span class="pre">-DSTATIC=on</span> <span class="pre">-DSHARED=on</span> <span class="pre">-DPLATFORM='Raspberry</span> <span class="pre">Pi'</span> <span class="pre">..</span></code></p></li>
288-
</ul>
289-
<p>(See
290-
<a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/issues/31#issuecomment-862078330">here</a>
291-
for a Raspberry Pi wheel)</p>
292-
</div>
293-
</div>
294-
</div>
268+
</section>
269+
</section>
270+
</section>
295271

296272

297273
</div>
298274
</div>
299275
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
300276
<a href="dynamic.html" class="btn btn-neutral float-left" title="Dynamic Bindings" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
277+
<a href="RPI.html" class="btn btn-neutral float-right" title="Raspberry Pi" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
301278
</div>
302279

303280
<hr/>

0 commit comments

Comments
 (0)