mirror of https://github.com/encounter/objdiff.git
Fix Windows build
This commit is contained in:
parent
5a8e4cb608
commit
008c92ebd1
|
@ -2988,6 +2988,7 @@ dependencies = [
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
"tracing-wasm",
|
"tracing-wasm",
|
||||||
"wgpu",
|
"wgpu",
|
||||||
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -374,8 +374,7 @@ fn run_interactive(
|
||||||
})?;
|
})?;
|
||||||
}
|
}
|
||||||
loop {
|
loop {
|
||||||
let has_event = event::poll(Duration::from_millis(100))?;
|
if event::poll(Duration::from_millis(100))? {
|
||||||
if has_event {
|
|
||||||
match view.handle_event(&mut state, event::read()?) {
|
match view.handle_event(&mut state, event::read()?) {
|
||||||
EventControlFlow::Break => break 'outer,
|
EventControlFlow::Break => break 'outer,
|
||||||
EventControlFlow::Continue(r) => result = r,
|
EventControlFlow::Continue(r) => result = r,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use std::{
|
use std::{
|
||||||
env::{current_dir, current_exe},
|
env::{current_dir, current_exe},
|
||||||
fs::{File, Permissions},
|
fs::File,
|
||||||
path::PathBuf,
|
path::PathBuf,
|
||||||
sync::mpsc::Receiver,
|
sync::mpsc::Receiver,
|
||||||
task::Waker,
|
task::Waker,
|
||||||
|
@ -51,7 +51,7 @@ fn run_update(
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
{
|
{
|
||||||
use std::{fs, os::unix::fs::PermissionsExt};
|
use std::{fs, os::unix::fs::PermissionsExt};
|
||||||
fs::set_permissions(&target_file, Permissions::from_mode(0o755))?;
|
fs::set_permissions(&target_file, fs::Permissions::from_mode(0o755))?;
|
||||||
}
|
}
|
||||||
tmp_dir.close()?;
|
tmp_dir.close()?;
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,9 @@ features = [
|
||||||
optional = true
|
optional = true
|
||||||
default-features = false
|
default-features = false
|
||||||
|
|
||||||
|
[target.'cfg(windows)'.dependencies]
|
||||||
|
winapi = "0.3"
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
exec = "0.3"
|
exec = "0.3"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue