Skip to content

Commit

Permalink
docs: update README.md install section (vlang#915)
Browse files Browse the repository at this point in the history
  • Loading branch information
larpon committed Jan 15, 2025
1 parent 4f6ef9e commit d33ff4b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,16 @@ So, among many other things, you can:

# Install

If you want to use SDL2 `v2.0.8` you can simply do:
To use `vlang/sdl` you need SDL2 libraries installed and the corresponding
`vlang/sdl` *branch* checked out that *matches the SDL2 version installed* on the target system.

See [Dependencies](#Dependencies) section below for how to install SDL2
for different OSes and systems.

If you have SDL2 version `2.30.x` installed on your system you can simply do:
```bash
v install sdl
v ~/.vmodules/sdl/setup.vsh
```

If you want to use another version of SDL2 you will, currently, have to install
Expand All @@ -29,7 +36,7 @@ v ~/.vmodules/sdl/setup.vsh
Should `sdl2-config` be absent on your system you can try the following instead,
by providing the version manually:

An example of installing SDL2 `v2.0.12` via `git`:
An example of installing the `2.0.12` branch (that *matches* SDL2 version 2.0.12) via `git`:
```bash
git clone https://github.com/vlang/sdl.git ~/.vmodules/sdl
cd ~/.vmodules/sdl
Expand All @@ -45,9 +52,6 @@ Then follow the steps in the [Windows](#windows) section below.

You can see what `sdl` releases are available in the [GitHub repository](https://github.com/vlang/sdl/branches) via branches.

Also note that you'll need the SDL2 libraries available on your system
see the [Dependencies](#dependencies) section below for more details.

### Version notes

SDL2 `v2.0.8` is currently the lowest version of SDL2 supported.
Expand Down Expand Up @@ -130,7 +134,7 @@ brew reinstall --build-from-source --force sdl2 sdl2_gfx sdl2_image sdl2_mixer s
```

### Windows
It is necessary to install the sdl2 development libraries for Windows.
It is necessary to install the SDL2 development libraries for Windows.
To do this, change to the root directory of the sdl module, like
`cd %HOMEPATH%\.vmodules\sdl`
and run
Expand Down

0 comments on commit d33ff4b

Please sign in to comment.