mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-05 04:01:28 +03:00
quick support if right click && run as admin on win
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -54,11 +54,6 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
return core_main_invoke_new_connection(std::env::args());
|
||||
}
|
||||
let click_setup = cfg!(windows) && args.is_empty() && crate::common::is_setup(&arg_exe);
|
||||
#[cfg(not(feature = "flutter"))]
|
||||
{
|
||||
_is_quick_support =
|
||||
cfg!(windows) && args.is_empty() && arg_exe.to_lowercase().ends_with("qs.exe");
|
||||
}
|
||||
if click_setup {
|
||||
args.push("--install".to_owned());
|
||||
flutter_args.push("--install".to_string());
|
||||
@@ -70,6 +65,14 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
println!("{}", crate::VERSION);
|
||||
return None;
|
||||
}
|
||||
#[cfg(windows)]
|
||||
{
|
||||
_is_quick_support |= !crate::platform::is_installed()
|
||||
&& args.is_empty()
|
||||
&& (arg_exe.to_lowercase().ends_with("qs.exe")
|
||||
|| (!click_setup && crate::platform::is_elevated(None).unwrap_or(false)));
|
||||
crate::portable_service::client::set_quick_support(_is_quick_support);
|
||||
}
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
use hbb_common::env_logger::*;
|
||||
|
||||
Reference in New Issue
Block a user