Build with latest libs
This commit is contained in:
parent
ef2eb24328
commit
6639d4a577
102
Cargo.toml
102
Cargo.toml
@ -1,68 +1,74 @@
|
|||||||
[package]
|
[package]
|
||||||
|
authors = ["Julian Ospald <hasufell@posteo.de>"]
|
||||||
name = "pnmixer-rs"
|
name = "pnmixer-rs"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Julian Ospald <hasufell@posteo.de>"]
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
name = "pnmixerlib"
|
|
||||||
path = "src/lib.rs"
|
|
||||||
doc = true
|
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
|
doc = false
|
||||||
name = "pnmixer-rs"
|
name = "pnmixer-rs"
|
||||||
path = "src/bin.rs"
|
path = "src/bin.rs"
|
||||||
doc = false
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
alsa = "^0.1.8"
|
alsa = "^0.1.10"
|
||||||
alsa-sys = "^0.1.1"
|
alsa-sys = "^0.1.1"
|
||||||
error-chain = { git = "https://github.com/hasufell/error-chain.git", branch = "PR-from-error" }
|
error-chain = "^0.10.0"
|
||||||
ffi = "^0.0.2"
|
ffi = "^0.0.2"
|
||||||
flexi_logger = "^0.5.1"
|
flexi_logger = "^0.6.8"
|
||||||
gdk-pixbuf = { git = "https://github.com/gtk-rs/gdk-pixbuf.git" }
|
gdk-pixbuf = "^0.2.0"
|
||||||
gdk-pixbuf-sys = { git = "https://github.com/gtk-rs/sys" }
|
gdk-pixbuf-sys = "^0.4.0"
|
||||||
gdk-sys = { git = "https://github.com/gtk-rs/sys" }
|
gdk-sys = "^0.4.0"
|
||||||
gio = { git = "https://github.com/gtk-rs/gio.git" }
|
gio = "^0.2.0"
|
||||||
glib = { git = "https://github.com/gtk-rs/glib.git" }
|
glib = "^0.3.1"
|
||||||
glib-sys = { git = "https://github.com/gtk-rs/sys" }
|
glib-sys = "^0.4.0"
|
||||||
gobject-sys = { git = "https://github.com/gtk-rs/sys" }
|
gobject-sys = "^0.4.0"
|
||||||
gtk-sys = { git = "https://github.com/gtk-rs/sys" }
|
gtk-sys = "^0.4.0"
|
||||||
libc = "^0.2.23"
|
|
||||||
log = "^0.3.8"
|
|
||||||
serde = "^1.0.9"
|
|
||||||
serde_derive = "^1.0.9"
|
|
||||||
toml = "^0.4.2"
|
|
||||||
which = "*"
|
|
||||||
xdg = "*"
|
|
||||||
libnotify = { git = "https://github.com/hasufell/rust-libnotify.git", branch = "git-deps", optional = true }
|
|
||||||
png = "^0.9.0"
|
|
||||||
lazy_static = "^0.2.8"
|
lazy_static = "^0.2.8"
|
||||||
|
libc = "^0.2.30"
|
||||||
|
libnotify = { version = "^1.0.1", optional = true }
|
||||||
|
log = "^0.3.8"
|
||||||
|
png = "^0.9.0"
|
||||||
|
serde = "^1.0.11"
|
||||||
|
serde_derive = "^1.0.11"
|
||||||
|
toml = "^0.4.5"
|
||||||
w_result = "^0.1.2"
|
w_result = "^0.1.2"
|
||||||
|
which = "^1.0.2"
|
||||||
|
xdg = "^2.1.0"
|
||||||
[dependencies.x11]
|
|
||||||
version = "^2.14.0"
|
|
||||||
features = ["xlib", "xtst"]
|
|
||||||
|
|
||||||
[dependencies.gtk]
|
|
||||||
git = "https://github.com/gtk-rs/gtk.git"
|
|
||||||
features = [ "v3_10", "v3_12", "v3_22" ]
|
|
||||||
|
|
||||||
[dependencies.gdk]
|
[dependencies.gdk]
|
||||||
git = "https://github.com/gtk-rs/gdk.git"
|
features = [
|
||||||
features = [ "v3_10", "v3_12", "v3_22" ]
|
"v3_10",
|
||||||
|
"v3_12",
|
||||||
|
"v3_22",
|
||||||
|
]
|
||||||
|
version = "^0.6.0"
|
||||||
|
|
||||||
[profile.dev]
|
[dependencies.gtk]
|
||||||
opt-level = 0 # controls the `--opt-level` the compiler builds with
|
features = [
|
||||||
debug = true # controls whether the compiler passes `-C debuginfo`
|
"v3_10",
|
||||||
# a value of `true` is equivalent to `2`
|
"v3_12",
|
||||||
rpath = false # controls whether the compiler passes `-C rpath`
|
"v3_22",
|
||||||
lto = false # controls `-C lto` for binaries and staticlibs
|
]
|
||||||
debug-assertions = false # controls whether debug assertions are enabled
|
version = "^0.2.0"
|
||||||
codegen-units = 1 # controls whether the compiler passes `-C codegen-units`
|
|
||||||
# `codegen-units` is ignored when `lto = true`
|
|
||||||
panic = 'unwind' # panic strategy (`-C panic=...`), can also be 'abort'
|
|
||||||
|
|
||||||
|
[dependencies.x11]
|
||||||
|
features = [
|
||||||
|
"xlib",
|
||||||
|
"xtst",
|
||||||
|
]
|
||||||
|
version = "^2.15.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
notify = ["libnotify"]
|
notify = ["libnotify"]
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
doc = true
|
||||||
|
name = "pnmixerlib"
|
||||||
|
path = "src/lib.rs"
|
||||||
|
[profile.dev]
|
||||||
|
codegen-units = 1
|
||||||
|
debug = true
|
||||||
|
debug-assertions = false
|
||||||
|
lto = false
|
||||||
|
opt-level = 0
|
||||||
|
panic = "unwind"
|
||||||
|
rpath = false
|
||||||
|
@ -126,7 +126,7 @@ impl AudioFrontend for AlsaBackend {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn card_name(&self) -> Result<String> {
|
fn card_name(&self) -> Result<String> {
|
||||||
return self.acard.borrow().card.get_name().from_err();
|
return Ok(self.acard.borrow().card.get_name()?);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn chan_name(&self) -> Result<String> {
|
fn chan_name(&self) -> Result<String> {
|
||||||
|
@ -95,7 +95,7 @@ pub fn alsa_card_has_playable_selem(card: &Card) -> bool {
|
|||||||
|
|
||||||
/// Get the `Mixer` for the given alsa card.
|
/// Get the `Mixer` for the given alsa card.
|
||||||
pub fn get_mixer(card: &Card) -> Result<Mixer> {
|
pub fn get_mixer(card: &Card) -> Result<Mixer> {
|
||||||
return Mixer::new(&format!("hw:{}", card.get_index()), false).from_err();
|
return Ok(Mixer::new(&format!("hw:{}", card.get_index()), false)?);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,9 +24,8 @@ pub fn execute_vol_control_command(prefs: &Prefs) -> Result<()> {
|
|||||||
|
|
||||||
/// Try to execute the given command asynchronously via gtk.
|
/// Try to execute the given command asynchronously via gtk.
|
||||||
pub fn execute_command(cmd: &str) -> Result<()> {
|
pub fn execute_command(cmd: &str) -> Result<()> {
|
||||||
return glib::spawn_command_line_async(cmd)
|
return Ok(glib::spawn_command_line_async(cmd)
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
std::io::Error::new(std::io::ErrorKind::Other, e.description())
|
std::io::Error::new(std::io::ErrorKind::Other, e.description())
|
||||||
})
|
})?);
|
||||||
.from_err();
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user