mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
feat: appimage package script
revert: flutter lock file
This commit is contained in:
@@ -377,10 +377,18 @@ 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::var("APPDIR").unwrap();
|
||||
let p = Path::new(&cmd).join("AppRun");
|
||||
log::info!("path: {:?}", p);
|
||||
return std::process::Command::new(p).args(&args).spawn();
|
||||
#[cfg(not(feature = "appimage"))]
|
||||
{
|
||||
let cmd = std::env::current_exe()?;
|
||||
return std::process::Command::new(cmd).args(&args).spawn();
|
||||
}
|
||||
#[cfg(feature = "appimage")]
|
||||
{
|
||||
let appdir = std::env::var("APPDIR").unwrap();
|
||||
let appimage_cmd = Path::new(&appdir).join("AppRun");
|
||||
log::info!("path: {:?}", appimage_cmd);
|
||||
return std::process::Command::new(appimage_cmd).args(&args).spawn();
|
||||
}
|
||||
}
|
||||
|
||||
pub fn username() -> String {
|
||||
|
||||
@@ -57,7 +57,10 @@ pub fn start(args: &mut [String]) {
|
||||
}
|
||||
#[cfg(all(target_os = "linux", feature = "inline"))]
|
||||
{
|
||||
#[cfg(feature = "appimage")]
|
||||
let prefix = std::env::var("APPDIR").unwrap_or("".to_string());
|
||||
#[cfg(not(feature = "appimage"))]
|
||||
let prefix = "".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
|
||||
|
||||
Reference in New Issue
Block a user