From 9446ee6cb94c3467f064df0c034f3c7f69b574d2 Mon Sep 17 00:00:00 2001 From: Krusty/Benediction Date: Sun, 18 Aug 2024 08:12:47 +0200 Subject: [PATCH] Fix some compilation issues on windows --- Cargo.lock | 2 +- cpclib-basm/pgo.sh | 0 cpclib-bdasm/tries.sh | 0 cpclib-emucontrol/Cargo.toml | 3 +-- cpclib-runner/Cargo.toml | 3 ++- cpclib-runner/src/emucontrol.rs | 3 +++ 6 files changed, 7 insertions(+), 4 deletions(-) mode change 100755 => 100644 cpclib-basm/pgo.sh mode change 100755 => 100644 cpclib-bdasm/tries.sh diff --git a/Cargo.lock b/Cargo.lock index 1aa9c09d..fdc8cc20 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1699,7 +1699,6 @@ dependencies = [ "clap 4.5.15", "cpclib-common", "cpclib-runner", - "fs_extra", "glob", "ntest", "serial_test", @@ -1753,6 +1752,7 @@ dependencies = [ "directories", "enigo", "flate2", + "fs_extra", "glob", "shlex", "tar", diff --git a/cpclib-basm/pgo.sh b/cpclib-basm/pgo.sh old mode 100755 new mode 100644 diff --git a/cpclib-bdasm/tries.sh b/cpclib-bdasm/tries.sh old mode 100755 new mode 100644 diff --git a/cpclib-emucontrol/Cargo.toml b/cpclib-emucontrol/Cargo.toml index cedd8c85..53e5e3ae 100644 --- a/cpclib-emucontrol/Cargo.toml +++ b/cpclib-emucontrol/Cargo.toml @@ -13,8 +13,7 @@ cpclib-common.workspace = true clap = {workspace=true, features=["derive"]} glob = "0.3.1" -[target.'cfg(windows)'.dependencies] -fs_extra = "1.3.0" + [dev-dependencies] assert_cmd = "2.0.16" diff --git a/cpclib-runner/Cargo.toml b/cpclib-runner/Cargo.toml index 527612d9..ab290e19 100644 --- a/cpclib-runner/Cargo.toml +++ b/cpclib-runner/Cargo.toml @@ -26,4 +26,5 @@ glob = "0.3.1" tar = "0.4.41" zip-extract = "=0.1.3" - +[target.'cfg(windows)'.dependencies] +fs_extra = "1.3.0" diff --git a/cpclib-runner/src/emucontrol.rs b/cpclib-runner/src/emucontrol.rs index 8fa052e6..358e75ee 100644 --- a/cpclib-runner/src/emucontrol.rs +++ b/cpclib-runner/src/emucontrol.rs @@ -10,6 +10,9 @@ use enigo::{Direction, Enigo, Key, Keyboard, Settings}; use xcap::image::{open, ImageBuffer, Rgba}; use xcap::Window; +#[cfg(windows)] +use fs_extra; + use crate::delegated::DelegatedRunner; use crate::runner::emulator::Emulator; use crate::runner::runner::RunnerWithClap;