diff --git a/libs/enigo/examples/mouse.rs b/libs/enigo/examples/mouse.rs index 50a3506cf..f963e041e 100644 --- a/libs/enigo/examples/mouse.rs +++ b/libs/enigo/examples/mouse.rs @@ -23,15 +23,18 @@ fn main() { enigo.mouse_click(MouseButton::Left); thread::sleep(wait_time); - enigo.mouse_scroll_x(2); - thread::sleep(wait_time); + #[cfg(not(target_os = "macos"))] + { + enigo.mouse_scroll_x(2); + thread::sleep(wait_time); - enigo.mouse_scroll_x(-2); - thread::sleep(wait_time); + enigo.mouse_scroll_x(-2); + thread::sleep(wait_time); - enigo.mouse_scroll_y(2); - thread::sleep(wait_time); + enigo.mouse_scroll_y(2); + thread::sleep(wait_time); - enigo.mouse_scroll_y(-2); - thread::sleep(wait_time); + enigo.mouse_scroll_y(-2); + thread::sleep(wait_time); + } } diff --git a/libs/portable/src/bin_reader.rs b/libs/portable/src/bin_reader.rs index 499c18e2c..2d0b1bf7e 100644 --- a/libs/portable/src/bin_reader.rs +++ b/libs/portable/src/bin_reader.rs @@ -4,7 +4,10 @@ use std::{ path::PathBuf, }; +#[cfg(windows)] const BIN_DATA: &[u8] = include_bytes!("../data.bin"); +#[cfg(not(windows))] +const BIN_DATA: &[u8] = &[]; // 4bytes const LENGTH: usize = 4; const IDENTIFIER_LENGTH: usize = 8; @@ -118,7 +121,7 @@ impl BinaryReader { (parsed, executable) } - #[cfg(unix)] + #[cfg(linux)] pub fn configure_permission(&self, prefix: &PathBuf) { use std::os::unix::prelude::PermissionsExt; diff --git a/libs/portable/src/main.rs b/libs/portable/src/main.rs index edcbdd1fd..13dd0c3dc 100644 --- a/libs/portable/src/main.rs +++ b/libs/portable/src/main.rs @@ -30,7 +30,7 @@ fn setup(reader: BinaryReader, dir: Option, clear: bool) -> Option