mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Fix static app key with syntex
This commit is contained in:
parent
a36325a46a
commit
8c0a37357d
2 changed files with 7 additions and 6 deletions
|
@ -49,7 +49,7 @@ extern crate libpulse_sys;
|
||||||
|
|
||||||
extern crate librespot_protocol as protocol;
|
extern crate librespot_protocol as protocol;
|
||||||
|
|
||||||
// This doesn't play nice with syntex, so place it here
|
// include!/include_bytes! don't play nice with syntex, so place these here
|
||||||
pub mod version {
|
pub mod version {
|
||||||
include!(concat!(env!("OUT_DIR"), "/version.rs"));
|
include!(concat!(env!("OUT_DIR"), "/version.rs"));
|
||||||
|
|
||||||
|
@ -58,6 +58,11 @@ pub mod version {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "static-appkey")]
|
||||||
|
static APPKEY: Option<&'static [u8]> = Some(include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/spotify_appkey.key")));
|
||||||
|
#[cfg(not(feature = "static-appkey"))]
|
||||||
|
static APPKEY: Option<&'static [u8]> = None;
|
||||||
|
|
||||||
#[cfg(feature = "with-syntex")]
|
#[cfg(feature = "with-syntex")]
|
||||||
include!(concat!(env!("OUT_DIR"), "/lib.rs"));
|
include!(concat!(env!("OUT_DIR"), "/lib.rs"));
|
||||||
|
|
||||||
|
|
|
@ -12,11 +12,7 @@ use cache::{Cache, DefaultCache, NoCache};
|
||||||
use player::Player;
|
use player::Player;
|
||||||
use session::{Bitrate, Config, Session};
|
use session::{Bitrate, Config, Session};
|
||||||
use version;
|
use version;
|
||||||
|
use APPKEY;
|
||||||
#[cfg(feature = "static-appkey")]
|
|
||||||
static APPKEY: Option<&'static [u8]> = Some(include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/spotify_appkey.key")));
|
|
||||||
#[cfg(not(feature = "static-appkey"))]
|
|
||||||
static APPKEY: Option<&'static [u8]> = None;
|
|
||||||
|
|
||||||
pub fn find_backend(name: Option<&str>) -> &'static (Fn() -> Box<Sink> + Send + Sync) {
|
pub fn find_backend(name: Option<&str>) -> &'static (Fn() -> Box<Sink> + Send + Sync) {
|
||||||
match name {
|
match name {
|
||||||
|
|
Loading…
Reference in a new issue