mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2025-12-11 20:15:30 +01:00
Always copy daemon to target path
This commit is contained in:
parent
cdfae75f8a
commit
b5ec591322
@ -67,20 +67,12 @@ fn main() {
|
|||||||
let daemon_target = format!("{}/target/{}/sd-daemon-{}", workspace_dir, profile, target_triple);
|
let daemon_target = format!("{}/target/{}/sd-daemon-{}", workspace_dir, profile, target_triple);
|
||||||
|
|
||||||
if std::path::Path::new(&daemon_source).exists() {
|
if std::path::Path::new(&daemon_source).exists() {
|
||||||
// Remove existing symlink/file if it exists
|
// Remove existing file if it exists
|
||||||
let _ = std::fs::remove_file(&daemon_target);
|
let _ = std::fs::remove_file(&daemon_target);
|
||||||
|
|
||||||
#[cfg(unix)]
|
// Copy the daemon binary with target architecture suffix
|
||||||
{
|
std::fs::copy(&daemon_source, &daemon_target)
|
||||||
std::os::unix::fs::symlink(&daemon_source, &daemon_target)
|
.unwrap_or_else(|e| eprintln!("Warning: Failed to copy daemon: {}", e));
|
||||||
.unwrap_or_else(|e| eprintln!("Warning: Failed to create daemon symlink: {}", e));
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(windows)]
|
|
||||||
{
|
|
||||||
std::fs::copy(&daemon_source, &daemon_target)
|
|
||||||
.unwrap_or_else(|e| eprintln!("Warning: Failed to copy daemon: {}", e));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tauri_build::build()
|
tauri_build::build()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user