diff --git a/Cargo.lock b/Cargo.lock index 33eff117548..d4f1c7b66aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4254,7 +4254,7 @@ dependencies = [ [[package]] name = "nokhwa" version = "0.10.7" -source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#48963f514bb7f1ee5db44d38dfc88027029de5e6" +source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#f37cb2299908ec3294d5a1e868a0d8a38cfe22bd" dependencies = [ "flume", "image 0.25.1", @@ -4269,7 +4269,7 @@ dependencies = [ [[package]] name = "nokhwa-bindings-linux" version = "0.1.1" -source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#48963f514bb7f1ee5db44d38dfc88027029de5e6" +source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#f37cb2299908ec3294d5a1e868a0d8a38cfe22bd" dependencies = [ "nokhwa-core", "v4l", @@ -4278,7 +4278,7 @@ dependencies = [ [[package]] name = "nokhwa-bindings-macos" version = "0.2.2" -source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#48963f514bb7f1ee5db44d38dfc88027029de5e6" +source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#f37cb2299908ec3294d5a1e868a0d8a38cfe22bd" dependencies = [ "block", "cocoa-foundation", @@ -4294,7 +4294,7 @@ dependencies = [ [[package]] name = "nokhwa-bindings-windows" version = "0.4.2" -source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#48963f514bb7f1ee5db44d38dfc88027029de5e6" +source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#f37cb2299908ec3294d5a1e868a0d8a38cfe22bd" dependencies = [ "dlopen", "lazy_static", @@ -4306,7 +4306,7 @@ dependencies = [ [[package]] name = "nokhwa-core" version = "0.1.5" -source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#48963f514bb7f1ee5db44d38dfc88027029de5e6" +source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#f37cb2299908ec3294d5a1e868a0d8a38cfe22bd" dependencies = [ "bytes", "image 0.25.1", diff --git a/src/core_main.rs b/src/core_main.rs index 0805e32cd10..771ee4ca899 100644 --- a/src/core_main.rs +++ b/src/core_main.rs @@ -78,13 +78,14 @@ pub fn core_main() -> Option> { #[cfg(any(target_os = "linux", target_os = "windows"))] if args.is_empty() { #[cfg(target_os = "linux")] - let is_server_running = crate::check_process("--server", false); + let should_check_start_tray = crate::check_process("--server", false); // We can use `crate::check_process("--server", false)` on Windows. // Because `--server` process is the System user's process. We can't get the arguments in `check_process()`. // We can assume that self service running means the server is also running on Windows. #[cfg(target_os = "windows")] - let is_server_running = crate::platform::is_self_service_running(); - if is_server_running && !crate::check_process("--tray", true) { + let should_check_start_tray = crate::platform::is_self_service_running() + && crate::platform::is_cur_exe_the_installed(); + if should_check_start_tray && !crate::check_process("--tray", true) { #[cfg(target_os = "linux")] hbb_common::allow_err!(crate::platform::check_autostart_config()); hbb_common::allow_err!(crate::run_me(vec!["--tray"])); diff --git a/src/lang/fr.rs b/src/lang/fr.rs index 5fd4265a415..f46dc266fb1 100644 --- a/src/lang/fr.rs +++ b/src/lang/fr.rs @@ -681,22 +681,22 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("remote-printing-disallowed-text-tip", "Les paramètres de l’appareil contrôlé n’autorisent pas l’impression à distance."), ("save-settings-tip", "Enregistrer les paramètres"), ("dont-show-again-tip", "Ne plus afficher"), - ("Take screenshot", ""), - ("Taking screenshot", ""), - ("screenshot-merged-screen-not-supported-tip", ""), - ("screenshot-action-tip", ""), - ("Save as", ""), - ("Copy to clipboard", ""), - ("Enable remote printer", ""), - ("Downloading {}", ""), - ("{} Update", ""), - ("{}-to-update-tip", ""), - ("download-new-version-failed-tip", ""), - ("Auto update", ""), - ("update-failed-check-msi-tip", ""), - ("websocket_tip", ""), - ("Use WebSocket", ""), - ("Trackpad speed", ""), - ("Default trackpad speed", ""), + ("Take screenshot", "Prendre une capture d’écran"), + ("Taking screenshot", "Prise de capture d’écran"), + ("screenshot-merged-screen-not-supported-tip", "Actuellement, la prise de capture d’écran ne prend pas en charge les affichages multiples. Veuillez réessayer après avoir sélectionné un seul affichage."), + ("screenshot-action-tip", "Veuillez choisir l’action à effectuer avec la capture d’écran."), + ("Save as", "Enregistrer sous"), + ("Copy to clipboard", "Copier dans le presse-papier"), + ("Enable remote printer", "Activer l’impression à distance"), + ("Downloading {}", "Téléchargement de {}"), + ("{} Update", "Mise à jour de {}"), + ("{}-to-update-tip", "{} va maintenant quitter afin d’installer la nouvelle version."), + ("download-new-version-failed-tip", "Le téléchargement a échoué. Vous pouvez réessayer, ou bien cliquer sur le bouton « Télécharger » pour vous rendre sur la page de publication afin de mettre à jour manuellement."), + ("Auto update", "Installer les mises à jour automatiquement"), + ("update-failed-check-msi-tip", "La vérification de la méthode d’installation a échoué. Veuillez cliquer sur le bouton « Télécharger » pour vous rendre sur la page de publication afin de mettre à jour manuellement."), + ("websocket_tip", "Seules les connexions via relais sont prises en charge lors de l’utilisation de WebSocket."), + ("Use WebSocket", "Utiliser WebSocket"), + ("Trackpad speed", "Vitesse du pavé tactile"), + ("Default trackpad speed", "Vitesse par défaut du pavé tactile"), ].iter().cloned().collect(); } diff --git a/src/lang/hu.rs b/src/lang/hu.rs index ec1821af2d7..1df598aba4c 100644 --- a/src/lang/hu.rs +++ b/src/lang/hu.rs @@ -687,16 +687,16 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("screenshot-action-tip", "Képernyőkép-művelet"), ("Save as", "Mentés másként"), ("Copy to clipboard", "Másolás a vágólapra"), - ("Enable remote printer", ""), - ("Downloading {}", ""), - ("{} Update", ""), - ("{}-to-update-tip", ""), - ("download-new-version-failed-tip", ""), - ("Auto update", ""), - ("update-failed-check-msi-tip", ""), - ("websocket_tip", ""), - ("Use WebSocket", ""), - ("Trackpad speed", ""), - ("Default trackpad speed", ""), + ("Enable remote printer", "Távoli nyomtatók engedélyezése"), + ("Downloading {}", "Letöltés {}"), + ("{} Update", "{} Frissítés"), + ("{}-to-update-tip", "A {} bezárása és az új verzió telepítése."), + ("download-new-version-failed-tip", "Ha a letöltés sikertelen, akkor vagy újrapróbálkozhat, vagy a \"Letöltés\" gombra kattintva letöltheti a kiadási oldalról, és manuálisan frissíthet."), + ("Auto update", "Automatikus frissítés"), + ("update-failed-check-msi-tip", "A telepítési módszer felismerése nem sikerült. Kérjük, kattintson a \"Letöltés\" gombra, hogy letöltse a kiadási oldalról, és manuálisan frissítse."), + ("websocket_tip", "WebSocket használatakor csak a relé-kapcsolatok támogatottak."), + ("Use WebSocket", "WebSocket használata"), + ("Trackpad speed", "Érintőpad sebessége"), + ("Default trackpad speed", "Alapértelmezett érintőpad sebessége"), ].iter().cloned().collect(); } diff --git a/src/platform/windows.rs b/src/platform/windows.rs index 63302cfadb8..f17b2104422 100644 --- a/src/platform/windows.rs +++ b/src/platform/windows.rs @@ -3177,6 +3177,20 @@ pub fn is_msi_installed() -> std::io::Result { Ok(1 == uninstall_key.get_value::("WindowsInstaller")?) } +pub fn is_cur_exe_the_installed() -> bool { + let (_, _, _, exe) = get_install_info(); + // Check if is installed, because `exe` is the default path if is not installed. + if !std::fs::metadata(&exe).is_ok() { + return false; + } + let mut path = std::env::current_exe().unwrap_or_default(); + if let Ok(linked) = path.read_link() { + path = linked; + } + let path = path.to_string_lossy().to_lowercase(); + path == exe.to_lowercase() +} + #[cfg(not(target_pointer_width = "64"))] pub fn get_pids_with_first_arg_check_session, S2: AsRef>( name: S1,