Skip to content

Commit 8d06564

Browse files
committed
refactor: use compile time env var for vulkan icd base path
1 parent e82ca5b commit 8d06564

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Freedesktop Desktop Entry Specification
22

3-
This crate provides a library for efficiently parsing [Desktop Entry](https://specifications.freedesktop.org/desktop-entry-spec/latest/index.html) files.
3+
This crate provides a library for efficiently parsing and launching [Desktop Entry](https://specifications.freedesktop.org/desktop-entry-spec/latest/index.html) files.
44

55
```rust
66
use std::fs;

src/exec/dbus.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl DesktopEntry<'_> {
6262
return false;
6363
}
6464

65-
let dbus_proxy = dbus_proxy;
65+
let dbus_proxy = dbus_proxy.unwrap();
6666
let dbus_names = dbus_proxy.list_activatable_names();
6767

6868
if dbus_names.is_err() {

src/exec/graphics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::io;
77
use std::ops::Deref;
88
use std::path::{Path, PathBuf};
99

10-
const VULKAN_ICD_PATH: &str = "/usr/share/vulkan/icd.d";
10+
const VULKAN_ICD_PATH: &str = std::env!("VULKAN_ICD_PATH", "must define system Vulkan ICD path (ex: `/usr/share/vulkan/icd.d`)");
1111

1212
#[derive(Debug, Default)]
1313
pub struct Gpus {

src/exec/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub mod error;
1414
mod graphics;
1515

1616
impl DesktopEntry<'_> {
17-
/// Execute the given desktop entry `Exec` key with either the default gpu or
17+
/// Launch the given desktop entry either via dbus or via its `Exec` key with the default gpu or
1818
/// the alternative one if available.
1919
pub fn launch(&self, uris: &[&str], prefer_non_default_gpu: bool) -> Result<(), ExecError> {
2020
match Connection::session() {

0 commit comments

Comments
 (0)