From ca7e9cfd21f556d274833b537ac09e7762926a1b Mon Sep 17 00:00:00 2001 From: Louis Poirier Date: Fri, 20 Dec 2024 12:18:45 +0100 Subject: [PATCH] build(Client): fix installation of plugin - test string 'Cyberpunk2077.exe' is present in standard output when listing running tasks. --- code/loader/xmake.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/code/loader/xmake.lua b/code/loader/xmake.lua index 50560e1..35a384d 100644 --- a/code/loader/xmake.lua +++ b/code/loader/xmake.lua @@ -6,9 +6,10 @@ else return false end local stdout, stderr = os.iorunv("tasklist", {"/FI", "IMAGENAME eq Cyberpunk2077.exe"}) - return #stdout >= 3 + + return string.find(stdout, "Cyberpunk2077.exe") end - + target("Cyberpunk2077") set_kind("binary") set_basename("Cyberpunk2077") @@ -20,7 +21,7 @@ else on_clean(function(target) end) on_link(function(target) end) on_install(function(target) end) - after_build(function(target) + after_build(function(target) local targetdir = target:targetdir() local clientdir = path.join(os.projectdir(), target:dep("Client"):targetdir()) @@ -62,7 +63,7 @@ else on_clean(function(target) end) on_link(function(target) end) on_install(function(target) end) - after_build(function(target) + after_build(function(target) local targetdir = target:targetdir() local clientdir = path.join(os.projectdir(), target:dep("Client"):targetdir()) @@ -84,7 +85,7 @@ else end os.mkdir(modPath) - + local client_dll_path = path.join(clientdir, "CyberpunkMP.dll") local symlink_path = path.join(modPath, "CyberpunkMP.dll")