Pass db location when launching hydrus, force XCB backend
This commit is contained in:
parent
2b40beef0f
commit
26299ab999
1 changed files with 13 additions and 3 deletions
16
src/main.rs
16
src/main.rs
|
@ -30,9 +30,19 @@ fn make_temp_location(path: &str) -> String {
|
||||||
fn launch_hydrus(config: &Config) {
|
fn launch_hydrus(config: &Config) {
|
||||||
println!("Launching hydrus...");
|
println!("Launching hydrus...");
|
||||||
|
|
||||||
let hydrus = Command::new(&config.hydrus_exec_location)
|
let mut hydrus = Command::new(&config.hydrus_exec_location);
|
||||||
.status()
|
let hydrus = hydrus.args(["-d", &config.hydrus_db_location]);
|
||||||
.expect("Failed to run hydrus");
|
|
||||||
|
if cfg!(unix) {
|
||||||
|
hydrus
|
||||||
|
.env("QT_QPA_PLATFORM", "xcb")
|
||||||
|
.status()
|
||||||
|
.expect("Failed to run hydrus");
|
||||||
|
} else {
|
||||||
|
hydrus
|
||||||
|
.status()
|
||||||
|
.expect("Failed to run hydrus");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_locked(config: &Config) -> bool {
|
fn is_locked(config: &Config) -> bool {
|
||||||
|
|
Reference in a new issue