mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
add: appimage config
This commit is contained in:
@@ -14,7 +14,7 @@ use hbb_common::{
|
||||
};
|
||||
#[cfg(any(target_os = "android", target_os = "ios", feature = "cli"))]
|
||||
use hbb_common::{config::RENDEZVOUS_PORT, futures::future::join_all};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::{sync::{Arc, Mutex}, path::Path};
|
||||
|
||||
pub const CLIPBOARD_NAME: &'static str = "clipboard";
|
||||
pub const CLIPBOARD_INTERVAL: u64 = 333;
|
||||
@@ -377,8 +377,10 @@ pub fn get_time() -> i64 {
|
||||
}
|
||||
|
||||
pub fn run_me<T: AsRef<std::ffi::OsStr>>(args: Vec<T>) -> std::io::Result<std::process::Child> {
|
||||
let cmd = std::env::current_exe()?;
|
||||
return std::process::Command::new(cmd).args(&args).spawn();
|
||||
let cmd = std::env::var("APPDIR").unwrap();
|
||||
let p = Path::new(&cmd).join("AppRun");
|
||||
log::info!("path: {:?}", p);
|
||||
return std::process::Command::new(p).args(&args).spawn();
|
||||
}
|
||||
|
||||
pub fn username() -> String {
|
||||
|
||||
@@ -56,7 +56,10 @@ pub fn start(args: &mut [String]) {
|
||||
macos::show_dock();
|
||||
}
|
||||
#[cfg(all(target_os = "linux", feature = "inline"))]
|
||||
sciter::set_library("/usr/lib/rustdesk/libsciter-gtk.so").ok();
|
||||
{
|
||||
let prefix = std::env::var("APPDIR").unwrap_or("".to_string());
|
||||
sciter::set_library(&(prefix + "/usr/lib/rustdesk/libsciter-gtk.so")).ok();
|
||||
}
|
||||
// https://github.com/c-smile/sciter-sdk/blob/master/include/sciter-x-types.h
|
||||
// https://github.com/rustdesk/rustdesk/issues/132#issuecomment-886069737
|
||||
#[cfg(windows)]
|
||||
|
||||
Reference in New Issue
Block a user