Update the README to reflect the new build dependencies.

This commit is contained in:
Paul Lietar 2016-01-20 13:36:58 +00:00
parent cf2e9bb7c3
commit f3d56d0afe

View file

@ -1,8 +1,8 @@
# librespot
*librespot* is an open source client library for Spotify. It enables
applications to use Spotify's service, without using the official but
closed-source libspotify. Additionally, it provides extra features which are
not available in the official library.
closed-source libspotify. Additionally, it will provide extra features
which are not available in the official library.
## Status
*librespot* is currently under development and is not fully functional yet. You
@ -12,15 +12,17 @@ are however welcome to experiment with it.
Building *librespot* requires rust nightly. It will not work on rust stable or
beta.
You will also need the protobuf compiler, and the
[rust-protobuf](https://github.com/stepancheg/rust-protobuf) plugin.
`protoc-gen-rust` must be in your `$PATH`.
It also requires a C and C++ toolchain, with libprotoc and portaudio.
Also required is an installation of [portaudio](http://portaudio.com/), which
can be installed via `brew install portaudio` for an OS X machine.
On debian / ubuntu, the following command will install these dependencies :
```shell
sudo apt-get install build-essential portaudio19-dev libprotoc-dev
```
On debian / ubuntu the following dependencies need to be installed:
`libavahi-compat-libdnssd-dev`, `portaudio19-dev`, `libprotoc-dev`, `libprotobuf-dev`
On OS X, using homebrew :
```shell
brew install portaudio protobuf
```
Once you've cloned this repository you can build *librespot* using `cargo`.
```shell
@ -31,13 +33,22 @@ cargo build
A sample program implementing a headless Spotify Connect receiver is provided.
Once you've built *librespot*, run it using :
```shell
target/debug/librespot -a APPKEY -u USERNAME -c CACHEDIR -n DEVICENAME
target/debug/librespot --appkey APPKEY --username USERNAME --cache CACHEDIR --name DEVICENAME
```
where `APPKEY` is the path to a Spotify application key file, `USERNAME` is your
Spotify username, `CACHEDIR` is the path to directory where data will be cached,
and `DEVICENAME` is the name that will appear in the Spotify Connect menu.
## Troubleshooting
## Discovery mode
*librespot* can be run in discovery mode, in which case no password is required at startup.
dns-sd or avahi's compatibility layer is required for this. On debian/ubuntu this is the
`libavahi-compat-libdnssd-dev` package. It come preinstalled on OS X.
It must be enabled at build time :
```shell
cargo build --features discovery
```
When running *librespot* simply omit the `--username` argument.
## Facebook Accounts
If you connect using a facebook account, librespot will not show up among the
devices in the Spotify app. What you need to do is apply for a
[device password](http://www.spotify.com/account/set-device-password/) and