Update README.
[guile-sdl2.git] / README
CommitLineData
9ce20c40
DT
1-*- mode: org -*-
2
7365c6c1 3Guile-SDL2 provides Guile Scheme bindings for the SDL2 C shared
9ce20c40
DT
4library. The bindings are written in pure Scheme by using Guile's
5foreign function interface.
6
510a084a
DT
7In addition to the SDL2 core library, bindings are also provided for
8SDL2_image, SDL2_mixer, and SDL2_ttf.
9
9ce20c40
DT
10* Requirements
11
7365c6c1 12 Guile-SDL2 currently depends on the following packages:
9ce20c40
DT
13
14 - GNU Guile >= 2.0.9
15 - SDL2 >= 2.0.0
7365c6c1
DT
16 - SDL2_image >= 2.0.0
17 - SDL2_mixer >= 2.0.0
18 - SDL2_ttf >= 2.0.0
9ce20c40
DT
19 - GNU Make
20 - GNU pkg-config
21
22 When building from a Git checkout, the following additional packages
23 are required:
24
25 - GNU Autoconf
26 - GNU Automake
27
28* Installing
29
30 Guile-sdl2 uses the standard GNU build system, so installation
31 requires the usual incantations:
32
510a084a
DT
33 #+BEGIN_SRC sh
34 ./configure
35 make
36 make install
37 #+END_SRC
38
39 To turn off non-core library bindings, the following configure flags
40 may be used:
41
42 #+BEGIN_SRC sh
43 ./configure --with-libsdl2-image=no \
44 --with-libsdl2-mixer=no \
45 --with-libsdl2-ttf=no
46 #+END_SRC
9ce20c40
DT
47
48 When building from a Git checkout, the following spell is necessary
510a084a 49 before running any of the above commands:
9ce20c40 50
510a084a
DT
51 #+BEGIN_SRC sh
52 ./bootstrap
53 #+END_SRC
9ce20c40
DT
54
55 GNU Guix users may install the current development snapshot
56 described in =guix.scm= with the following command:
57
510a084a
DT
58 #+BEGIN_SRC sh
59 guix package -f guix.scm
60 #+END_SRC
9ce20c40 61
7365c6c1
DT
62* Usage
63
510a084a 64 Guile-SDL2 provides modules in the =(sdl2 ...)= namespace, roughly
7365c6c1
DT
65 organized how the SDL2 C header files are organized. See the
66 =examples= directory for practical examples.
67
510a084a 68 Low-level bindings are available in the =(sdl2 bindings ...)=
7365c6c1
DT
69 namespace, but these are not recommended for normal usage.
70
71 Additionally, SDL2 extension library bindings are available in the
72 following modules:
73
510a084a
DT
74 - SDL2_image: =(sdl2 image)=
75 - SDL2_mixer: =(sdl2 mixer)=
76 - SDL2_ttf: =(sdl2 ttf)=
7365c6c1 77
9ce20c40
DT
78* Developing
79
80 To build the source code from a Git checkout, run the following:
81
510a084a
DT
82 #+BEGIN_SRC sh
83 ./bootstrap
84 ./configure
85 make
86 #+END_SRC
9ce20c40
DT
87
88 To start a Guile REPL with a pre-configured load path for using
89 guile-sdl2, use the =pre-inst-env= script:
90
510a084a
DT
91 #+BEGIN_SRC sh
92 ./pre-inst-env guile
93 #+END_SRC
9ce20c40
DT
94
95 GNU Guix users may create a development environment with all of the
96 necessary dependencies by running the following command:
97
510a084a
DT
98 #+BEGIN_SRC sh
99 guix environment -l guix.scm
100 #+END_SRC
101
102 In order to configure the proper library locations for Guix-based
103 builds, the configure script should be invoked like so:
104
105 #+BEGIN_SRC sh
106 ./configure --with-libsdl2-prefix=$(guix build sdl2) \
107 --with-libsdl2-image-prefix=$(guix build sdl2-image) \
108 --with-libsdl2-ttf-prefix=$(guix build sdl2-ttf) \
109 --with-libsdl2-mixer-prefix=$(guix build sdl2-mixer)
110 #+END_SRC
9ce20c40
DT
111
112* Contact
113
114 Bug reports and patches may be sent to <davet@gnu.org>.
115
116 The maintainer of this library hangs out in the #guile channel on
117 irc.freenode.net, so help and general discussion may also be found
118 there.