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 {
|
||||
|
||||
Reference in New Issue
Block a user