mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-19 00:13:01 +08:00
remove unused import and launch service when install
This commit is contained in:
parent
9be6b17a8b
commit
8e6dd76c5b
@ -4,6 +4,13 @@ set sh1 to "cp " & current_dir & "com.carriez.rustdesk.daemon.plist /Library/Lau
|
||||
set sh2 to "cp " & current_dir & "com.carriez.rustdesk.agent.root.plist /Library/LaunchAgents/com.carriez.rustdesk.agent.root.plist && chown root:wheel /Library/LaunchAgents/com.carriez.rustdesk.agent.root.plist"
|
||||
set sh3 to "cp " & current_dir & "com.carriez.rustdesk.agent.user.plist /Library/LaunchAgents/com.carriez.rustdesk.agent.user.plist && chown root:wheel /Library/LaunchAgents/com.carriez.rustdesk.agent.user.plist"
|
||||
|
||||
set sh to sh1 & ";" & sh2 & ";" & sh3
|
||||
set sh to sh1 & ";" & sh2 & ";" & sh3 & "
|
||||
launchctl enable system/com.carriez.rustdesk.daemon;
|
||||
launchctl start system/com.carriez.rustdesk.daemon;
|
||||
launchctl enable system/com.carriez.rustdesk.agent.root;
|
||||
launchctl start system/com.carriez.rustdesk.agent.root;
|
||||
launchctl enable system/com.carriez.rustdesk.agent.user
|
||||
launchctl start system/com.carriez.rustdesk.agent.user
|
||||
"
|
||||
|
||||
do shell script sh with prompt "RustDesk需要安装服务plist" with administrator privileges
|
||||
do shell script sh with prompt "RustDesk需要安装服务" with administrator privileges
|
@ -195,5 +195,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Socks5 Proxy", "Socks5 代理"),
|
||||
("Hostname", "主机名"),
|
||||
("Discovered", "已发现"),
|
||||
("install_daemon", "为了支持在登录系统时可以访问你的桌面,RustDesk需要\"安装系统服务\"")
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ use core_graphics::{
|
||||
use hbb_common::{allow_err, bail, log};
|
||||
use objc::{class, msg_send, sel, sel_impl};
|
||||
use scrap::{libc::c_void, quartz::ffi::*};
|
||||
use std::io::Read;
|
||||
|
||||
static mut LATEST_SEED: i32 = 0;
|
||||
|
||||
@ -139,14 +138,6 @@ pub fn is_installed_daemon(prompt: bool) -> bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
if !std::process::Command::new("osascript")
|
||||
.arg("./privileges_scripts/launch_service.scpt")
|
||||
.status()
|
||||
.unwrap()
|
||||
.success() {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -307,7 +307,7 @@ class App: Reactor.Component
|
||||
{handler.is_installed() && !software_update_url && handler.is_installed_lower_version() ? <UpgradeMe /> : ""}
|
||||
{is_can_screen_recording ? "": <CanScreenRecording />}
|
||||
{is_can_screen_recording && !handler.is_process_trusted(false) ? <TrustMe /> : ""}
|
||||
{is_can_screen_recording && handler.is_process_trusted(false) && handler.is_installed_daemon(false) ? <InstallDaemon /> : ""}
|
||||
{is_can_screen_recording && handler.is_process_trusted(false) && !handler.is_installed_daemon(false) ? <InstallDaemon /> : ""}
|
||||
{system_error ? <SystemError /> : ""}
|
||||
{!system_error && handler.is_login_wayland() && !handler.current_is_wayland() ? <FixWayland /> : ""}
|
||||
{!system_error && handler.current_is_wayland() ? <ModifyDefaultLogin /> : ""}
|
||||
|
Loading…
Reference in New Issue
Block a user