remove linux_headless/appimage/flatpak feature

This commit is contained in:
rustdesk
2024-05-02 13:23:32 +08:00
parent f853b29fd9
commit 7ce0b225ef
15 changed files with 224 additions and 408 deletions

View File

@@ -1,7 +1,5 @@
use super::{CursorData, ResultType};
use desktop::Desktop;
#[cfg(all(feature = "linux_headless"))]
#[cfg(not(any(feature = "flatpak", feature = "appimage")))]
use hbb_common::config::CONFIG_OPTION_ALLOW_LINUX_HEADLESS;
pub use hbb_common::platform::linux::*;
use hbb_common::{
@@ -96,8 +94,6 @@ pub struct xcb_xfixes_get_cursor_image {
}
#[inline]
#[cfg(feature = "linux_headless")]
#[cfg(not(any(feature = "flatpak", feature = "appimage")))]
pub fn is_headless_allowed() -> bool {
Config::get_option(CONFIG_OPTION_ALLOW_LINUX_HEADLESS) == "Y"
}

View File

@@ -44,8 +44,8 @@ fn check_desktop_manager() {
}
}
// --server process
pub fn start_xdesktop() {
debug_assert!(crate::is_sever());
std::thread::spawn(|| {
*DESKTOP_MANAGER.lock().unwrap() = Some(DesktopManager::new());
@@ -91,6 +91,7 @@ fn detect_headless() -> Option<&'static str> {
}
pub fn try_start_desktop(_username: &str, _passsword: &str) -> String {
debug_assert!(crate::is_sever());
if _username.is_empty() {
let username = get_username();
if username.is_empty() {

View File

@@ -20,8 +20,7 @@ pub mod delegate;
#[cfg(target_os = "linux")]
pub mod linux;
#[cfg(all(target_os = "linux", feature = "linux_headless"))]
#[cfg(not(any(feature = "flatpak", feature = "appimage")))]
#[cfg(target_os = "linux")]
pub mod linux_desktop_manager;
#[cfg(not(any(target_os = "android", target_os = "ios")))]