fix: build (#11611)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou 2025-04-30 23:49:18 +08:00 committed by GitHub
parent 83aae23ba6
commit 20fcddffbd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 17 additions and 17 deletions

1
Cargo.lock generated
View file

@ -5947,7 +5947,6 @@ dependencies = [
"uuid",
"virtual_display",
"wallpaper",
"whoami",
"winapi 0.3.9",
"windows 0.61.1",
"windows-service",

View file

@ -46,7 +46,6 @@ screencapturekit = ["cpal/screencapturekit"]
[dependencies]
async-trait = "0.1"
whoami = "1.5.0"
scrap = { path = "libs/scrap", features = ["wayland"] }
hbb_common = { path = "libs/hbb_common" }
serde_derive = "1.0"
@ -95,7 +94,7 @@ sys-locale = "0.3"
enigo = { path = "libs/enigo", features = [ "with_serde" ] }
clipboard = { path = "libs/clipboard" }
ctrlc = "3.2"
# arboard = { version = "3.4.0", features = ["wayland-data-control"] }
# arboard = { version = "3.4", features = ["wayland-data-control"] }
arboard = { git = "https://github.com/rustdesk-org/arboard", features = ["wayland-data-control"] }
clipboard-master = { git = "https://github.com/rustdesk-org/clipboard-master" }
@ -118,7 +117,7 @@ winapi = { version = "0.3", features = [
"ioapiset",
"winspool",
] }
windows = { version = "0.61.1", features = [
windows = { version = "0.61", features = [
"Win32",
"Win32_System",
"Win32_System_Diagnostics",
@ -131,7 +130,7 @@ virtual_display = { path = "libs/virtual_display" }
remote_printer = { path = "libs/remote_printer" }
impersonate_system = { git = "https://github.com/rustdesk-org/impersonate-system" }
shared_memory = "0.12"
tauri-winrt-notification = "0.1.2"
tauri-winrt-notification = "0.1"
runas = "1.2"
[target.'cfg(target_os = "macos")'.dependencies]

@ -1 +1 @@
Subproject commit bfddd5bb193883237c2a1c2c8d8e3cfe02823ac7
Subproject commit 4eca5b45b95b2f3d71789dc001595149c015fe72

View file

@ -2335,7 +2335,7 @@ impl LoginConfigHandler {
.collect::<Vec<_>>()
.join(" ");
#[cfg(not(target_os = "android"))]
let my_platform = whoami::platform().to_string();
let my_platform = hbb_common::whoami::platform().to_string();
#[cfg(target_os = "android")]
let my_platform = "Android".into();
let hwid = if self.get_option("trust-this-device") == "Y" {

View file

@ -463,7 +463,7 @@ pub fn is_support_multi_clipboard(peer_version: &str, peer_platform: &str) -> bo
if get_version_number(peer_version) < get_version_number("1.3.0") {
return false;
}
if ["", &whoami::Platform::Ios.to_string()].contains(&peer_platform) {
if ["", &hbb_common::whoami::Platform::Ios.to_string()].contains(&peer_platform) {
return false;
}
if "Android" == peer_platform && get_version_number(peer_version) < get_version_number("1.3.3")

View file

@ -7,6 +7,8 @@ use std::{
use serde_json::{json, Map, Value};
#[cfg(not(any(target_os = "android", target_os = "ios")))]
use hbb_common::whoami;
use hbb_common::{
allow_err,
anyhow::{anyhow, Context},

View file

@ -1,7 +1,7 @@
use hbb_common::config::Config;
use hbb_common::{
allow_err,
anyhow::bail,
config::Config,
config::{self, RENDEZVOUS_PORT},
log,
protobuf::Message as _,
@ -10,7 +10,7 @@ use hbb_common::{
self,
sync::mpsc::{unbounded_channel, UnboundedReceiver, UnboundedSender},
},
ResultType,
whoami, ResultType,
};
use std::{

View file

@ -1089,7 +1089,7 @@ mod desktop {
}
self.display = self
.display
.replace(&whoami::hostname(), "")
.replace(&hbb_common::whoami::hostname(), "")
.replace("localhost", "");
}

View file

@ -1268,8 +1268,8 @@ impl Connection {
#[cfg(not(target_os = "android"))]
{
pi.hostname = whoami::hostname();
pi.platform = whoami::platform().to_string();
pi.hostname = hbb_common::whoami::hostname();
pi.platform = hbb_common::whoami::platform().to_string();
}
#[cfg(target_os = "android")]
{
@ -1314,13 +1314,13 @@ impl Connection {
#[cfg(any(target_os = "windows", feature = "unix-file-copy-paste"))]
{
let is_both_windows = cfg!(target_os = "windows")
&& self.lr.my_platform == whoami::Platform::Windows.to_string();
&& self.lr.my_platform == hbb_common::whoami::Platform::Windows.to_string();
#[cfg(feature = "unix-file-copy-paste")]
let is_unix_and_peer_supported = crate::is_support_file_copy_paste(&self.lr.version);
#[cfg(not(feature = "unix-file-copy-paste"))]
let is_unix_and_peer_supported = false;
let is_both_macos = cfg!(target_os = "macos")
&& self.lr.my_platform == whoami::Platform::MacOS.to_string();
&& self.lr.my_platform == hbb_common::whoami::Platform::MacOS.to_string();
let is_peer_support_paste_if_macos =
crate::is_support_file_paste_if_macos(&self.lr.version);
let has_file_clipboard = is_both_windows
@ -4279,7 +4279,7 @@ mod raii {
) -> Self {
let printer = conn_type == crate::server::AuthConnType::Remote
&& crate::is_support_remote_print(&lr.version)
&& lr.my_platform == whoami::Platform::Windows.to_string();
&& lr.my_platform == hbb_common::whoami::Platform::Windows.to_string();
AUTHED_CONNS.lock().unwrap().push(AuthedConn {
conn_id,
conn_type,

View file

@ -29,7 +29,7 @@ use hbb_common::{
sync::mpsc,
time::{Duration as TokioDuration, Instant},
},
Stream,
whoami, Stream,
};
use crate::client::io_loop::Remote;