mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-27 14:59:02 +08:00
remove some errors on mac
This commit is contained in:
parent
0e6e27b0ae
commit
6d95a66de3
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -30,7 +30,7 @@ fn setup(reader: BinaryReader, dir: Option<PathBuf>, clear: bool) -> Option<Path
|
||||
for file in reader.files.iter() {
|
||||
file.write_to_file(&dir);
|
||||
}
|
||||
#[cfg(unix)]
|
||||
#[cfg(linux)]
|
||||
reader.configure_permission(&dir);
|
||||
Some(dir.join(&reader.exe))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user