Skip to content

Commit 2dba9ac

Browse files
committed
Disable 'bundled' and 'static-link', add README.md
It turns out that the "static-link" feature flag for the `sdl2-sys` crate doesn't link `SDL2_Image` nor `SDL2_TTF`) into it, and the "bundled" feature flag only fetches the main `libsdl2` library at build time and not `SDL2_Image`. Plus, it seems that "bundled" and "static-link" are also broken in other ways, at the time of writing: Rust-SDL2/rust-sdl2#778 Rust-SDL2/rust-sdl2#851 Rust-SDL2/rust-sdl2#858 Rust-SDL2/rust-sdl2#1017 Rust-SDL2/rust-sdl2#1029 Rust-SDL2/rust-sdl2#1034 For the sake of reliability, this commit disables both Cargo feature flags described for the `sdl2` dependency (thereby requiring the user to install external dependencies) and introduces a detailed setup guide in the `README.md` for Windows, macOS, and Linux.
1 parent 4bf946e commit 2dba9ac

File tree

3 files changed

+65
-193
lines changed

3 files changed

+65
-193
lines changed

Cargo.lock

Lines changed: 1 addition & 192 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2018"
77
[dependencies]
88
anyhow = "1.0"
99
fnv = "1.0"
10-
sdl2 = { version = "0.34.3", features = ["bundled", "image", "static-link"] }
10+
sdl2 = { version = "0.34.3", features = ["image"] }
1111
serde = { version = "1.0", features = ["derive"] }
1212
serde_json = "1.0"
1313
uuid = { version = "0.8.2", features = ["serde"] }

README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Disney Streaming Services (DSS) Main Menu
2+
3+
## Getting started
4+
5+
### Prerequisites
6+
7+
To build this project on Windows, macOS, or Linux, you will need a recent stable
8+
version of the [Rust toolchain](https://www.rust-lang.org/) (this project was
9+
tested with 1.49.0).
10+
11+
If [`rustup`](https://rustup.rs/) is available on your system, the included
12+
[`rust-toolchain`](./rust-toolchain) file at the root directory of this
13+
repository should automatically fetch and install Rust 1.49 for you, if it's not
14+
already present on your system, as soon as you run any `cargo` command in your
15+
shell.
16+
17+
The following external dependencies will also be required on your system:
18+
19+
* [SDL2](https://www.libsdl.org/)
20+
* `SDL_Image`
21+
22+
#### Windows (MSVC with vcpkg)
23+
24+
```bat
25+
vcpkg.exe install sdl2:x64-windows sdl2-image:x64-windows
26+
```
27+
28+
#### macOS
29+
30+
```bash
31+
brew install sdl2 sdl2_image
32+
```
33+
34+
#### Linux
35+
36+
```bash
37+
# Ubuntu/Debian
38+
sudo apt install -y libsdl2 libsdl2-image
39+
40+
# Arch Linux
41+
sudo pacman -Sy sdl2 sdl2_image
42+
```
43+
44+
### Compiling
45+
46+
To compile the application in release mode and start it, simply run this command
47+
in your terminal:
48+
49+
```bash
50+
cargo run --release
51+
```
52+
53+
To execute the included unit test suite, run:
54+
55+
```bash
56+
cargo test
57+
```
58+
59+
To generate HTML documentation for the public crate API, run:
60+
61+
```bash
62+
cargo doc --open
63+
```

0 commit comments

Comments
 (0)