Skip to content

Commit 0e55457

Browse files
author
Robot
committed
Generate sources (bc092ec)
1 parent 4c4745b commit 0e55457

33 files changed

+1368
-1050
lines changed

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Documentation
1717
Introduction
1818
------------
1919

20-
**Note to existing users**: *CrSFML* has been recently rewritten from scratch. *CrSFML* releases since 2.4 have an entirely different installation procedure, and multiple important API changes.
20+
**Note to existing users**: *CrSFML* has been recently rewritten from scratch. *CrSFML* releases since 2.4 have an entirely different installation procedure, and multiple important API changes. See the [release notes][releases] for information.
2121

2222
*CrSFML* is a library that allows SFML to be used with the Crystal programming language. [SFML][] is a library written in C++, so *CrSFML* also needs to ship C bindings to SFML, called *VoidCSFML*.
2323

@@ -55,7 +55,7 @@ Note that using [Shards][] is not enough to install *CrSFML*.
5555

5656
This section defines two sets of step-by-step instructions to install *CrSFML* but these are not the only ways to do it; they can even be mixed (see [VoidCSFML installation instructions](voidcsfml/README.md#installation) for an alternative look)
5757

58-
- [Approach 1](#approach-1): Generate latest *CrSFML* and *VoidCSFML* source code "from scratch"; build and use them from a local directory
58+
- [Approach 1](#approach-1): Generate latest *CrSFML* and *VoidCSFML* source code; build and use them from a local directory
5959
- Advantages:
6060
- The bindings can be fine-tuned to your system.
6161
- Supports multiple recent [SFML versions](#install-sfml).
@@ -65,7 +65,7 @@ This section defines two sets of step-by-step instructions to install *CrSFML* b
6565
- Can't install *CrSFML* directly though [shards][].
6666
- [Approach 2](#approach-2): Use pre-compiled sources; build *VoidCSFML* and install it globally; install a release of *CrSFML* through [shards][]
6767
- Advantages:
68-
- Easier installation.
68+
- Convenient installation.
6969
- Disadvantages:
7070
- Tied to a particular version of SFML (only SFML 2.4 right now).
7171
- Although sizes of SFML objects seem to always be of equal or smaller sizes than on Linux 64-bit with latest GCC (where the sources are generated), this is not completely guaranteed. So, in case of a mismatch, data may be written outside of the memory region allocated for an object.
@@ -97,7 +97,7 @@ brew update
9797
brew install sfml
9898
```
9999

100-
It can also be installed by copying binaries, as described in [official instructions][sfml-install], or by building from source in the same way as on [Linux](#linux).
100+
It can also be installed by copying binaries, as described in [official instructions][sfml-install], or by building from source in the same way as [on Linux](#linux).
101101

102102

103103
### Approach 1
@@ -119,7 +119,7 @@ cd crsfml
119119
cmake . && make
120120
```
121121

122-
**Optional:** [out-of-source builds][] are also supported, but note that even the sources go to the build directory, so you need perform all the following steps inside the build directory and not the root *crsfml* directory.
122+
**Optional:** [out-of-source builds][] are also supported, but note that even the sources go to the build directory, so you would need perform all the following steps inside the build directory and not the root *crsfml* directory.
123123

124124
If ran successfully, this generates all the source files for *VoidCSFML* and *CrSFML*, and also compiles *VoidCSFML*.
125125

@@ -130,8 +130,8 @@ If SFML can't be found, make sure it is installed and consult the [CMake options
130130
The *voidcsfml/lib* folder contains the dynamic libraries that are needed to run any *CrSFML* program. So you need to configure the full path to them whenever you work with *CrSFML* so the linker can find them. To apply these for the current shell session, run:
131131

132132
```bash
133-
export LIBRARY_PATH=/full/path/to/crsfml/voidcsfml/lib
134-
export LD_LIBRARY_PATH="$LIBRARY_PATH"
133+
export LIBRARY_PATH=/full/path/to/crsfml/voidcsfml/lib # Used during linking
134+
export LD_LIBRARY_PATH="$LIBRARY_PATH" # Used when running a binary
135135

136136
# Try running an example:
137137
cd examples
@@ -152,6 +152,8 @@ echo 'require "crsfml"' >> my_project.cr
152152
crystal my_project.cr
153153
```
154154

155+
Now you're ready for the [tutorials][]!
156+
155157
### Approach 2
156158

157159
Prerequisites: [CMake][], [Crystal][], a C++ compiler
@@ -183,6 +185,7 @@ Create a shard.yml file in your project's folder (or add to it) with the followi
183185

184186
```yaml
185187
name: awesome-game
188+
version: 0.1.0
186189

187190
dependencies:
188191
crsfml:
@@ -202,6 +205,8 @@ echo 'require "crsfml"' >> awesome_game.cr
202205
crystal awesome_game.cr
203206
```
204207

208+
Now you're ready for the [tutorials][]!
209+
205210

206211
Credits
207212
-------

examples/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,17 @@ Examples
3535
- Custom transformable drawable
3636
- `Clock`
3737

38-
### [typing](typing.cr)
39-
40-
- Keyboard events, `TextEntered`
41-
- Unicode string
42-
4338
### [diagnostics](diagnostics.cr)
4439

4540
- Listing controllers, screen modes, audio devices
4641
- Mouse state and events
42+
- Keyboard state and events, `TextEntered`
43+
- Unicode
4744
- Controller state and events
4845
- Drawing with shapes
4946
- Simple GUI (just buttons)
47+
- Switching between views
48+
- Window coordinates vs view coordinates
5049

5150
### [sound_capture](sound_capture.cr)
5251

0 commit comments

Comments
 (0)