From 8228d5d71725bfb8dd6241c877810eb5e6f3af49 Mon Sep 17 00:00:00 2001 From: slipher Date: Wed, 11 Nov 2026 21:01:29 -0600 Subject: [PATCH] Fix finding Box64 from PATH Quick fix for a regression in https://github.com/DaemonEngine/Daemon/pull/2018 that breaks the existing box64 support by, if the vm.box64.path cvar is empty, just erroring out instead of looking for box64 in PATH. --- src/engine/framework/VirtualMachine.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/engine/framework/VirtualMachine.cpp b/src/engine/framework/VirtualMachine.cpp index b4db6a1995..ea7bf80ca3 100644 --- a/src/engine/framework/VirtualMachine.cpp +++ b/src/engine/framework/VirtualMachine.cpp @@ -97,8 +97,15 @@ static Cvar::Cvar vm_box64_path( // Resolve box64 binary path by looking for a provided one or searching PATH if not explicitly set. static std::string ResolveBox64Path(std::string naclPath) { std::string requestedPath = vm_box64_path.Get(); + if (!requestedPath.empty()) { + if (!FS::RawPath::FileExists(requestedPath)) { + Sys::Error("Box64 emulation is enabled but the requested executable '%s' is missing", requestedPath); + } + + return requestedPath; + } - if (requestedPath.empty()) { + { std::string providedPath = FS::Path::Build(naclPath, "box64"); if (FS::RawPath::FileExists(providedPath)) { @@ -118,14 +125,7 @@ static std::string ResolveBox64Path(std::string naclPath) { return providedPath; } - Log::Warn("Box64 emulation is enabled but the executable is not provided with the engine: %s", providedPath); - } - - if (!FS::RawPath::FileExists(requestedPath)) { - Sys::Error("Box64 emulation is enabled but the requested executable is missing: %s", requestedPath); - } - else { - return requestedPath; + // Log::Warn("Box64 emulation is enabled but the executable is not provided with the engine: %s", providedPath); } const char* envPath = getenv("PATH");