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
*librespot* is an open source client library for Spotify. It enables *librespot* is an open source client library for Spotify. It enables
applications to use Spotify's service, without using the official but applications to use Spotify's service, without using the official but
closed-source libspotify. Additionally, it provides extra features which are closed-source libspotify. Additionally, it will provide extra features
not available in the official library. which are not available in the official library.
## Status ## Status
*librespot* is currently under development and is not fully functional yet. You *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 Building *librespot* requires rust nightly. It will not work on rust stable or
beta. beta.
You will also need the protobuf compiler, and the It also requires a C and C++ toolchain, with libprotoc and portaudio.
[rust-protobuf](https://github.com/stepancheg/rust-protobuf) plugin.
`protoc-gen-rust` must be in your `$PATH`.
Also required is an installation of [portaudio](http://portaudio.com/), which On debian / ubuntu, the following command will install these dependencies :
can be installed via `brew install portaudio` for an OS X machine. ```shell
sudo apt-get install build-essential portaudio19-dev libprotoc-dev
```
On debian / ubuntu the following dependencies need to be installed: On OS X, using homebrew :
`libavahi-compat-libdnssd-dev`, `portaudio19-dev`, `libprotoc-dev`, `libprotobuf-dev` ```shell
brew install portaudio protobuf
```
Once you've cloned this repository you can build *librespot* using `cargo`. Once you've cloned this repository you can build *librespot* using `cargo`.
```shell ```shell
@ -31,13 +33,22 @@ cargo build
A sample program implementing a headless Spotify Connect receiver is provided. A sample program implementing a headless Spotify Connect receiver is provided.
Once you've built *librespot*, run it using : Once you've built *librespot*, run it using :
```shell ```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 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 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 [device password](http://www.spotify.com/account/set-device-password/) and