diff options
| author | ruki <[email protected]> | 2025-05-17 22:08:31 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-05-17 22:08:31 +0800 |
| commit | 2f8decdc353f4e18de953c074ae8fed1c0969cda (patch) | |
| tree | 48c8fc85958094ba81f635e6dcaf59f351e88374 /xmake/modules/detect/tools | |
| parent | bfef847fcd6f6745b52a9f3c2ab2870dcaf23d16 (diff) | |
| parent | 2b88ba37fa0a9957b8ab24cf1bf6da59e2c39f21 (diff) | |
Merge branch 'dev' into unitybuildunitybuild
Diffstat (limited to 'xmake/modules/detect/tools')
| -rw-r--r-- | xmake/modules/detect/tools/find_7z.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_bash.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_clang_format.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_clang_scan_deps.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_clang_tidy.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_curl.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_dxc.lua | 1 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_iverilog.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_midl.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_ollydbg.lua | 1 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_python3.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_renderdoc.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_vsjitdebugger.lua | 1 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_vswhere.lua | 1 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_vvp.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_windbg.lua | 1 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_x64dbg.lua | 1 |
17 files changed, 17 insertions, 11 deletions
diff --git a/xmake/modules/detect/tools/find_7z.lua b/xmake/modules/detect/tools/find_7z.lua index ce1a04f4a..df0c700fc 100644 --- a/xmake/modules/detect/tools/find_7z.lua +++ b/xmake/modules/detect/tools/find_7z.lua @@ -45,7 +45,7 @@ function main(opt) -- find 7z from builtin xmake/winenv if is_host("windows") then - opt.paths = opt.paths or {} + opt.paths = table.wrap(opt.paths) table.insert(opt.paths, path.join(os.programdir(), "winenv", "bin")) end diff --git a/xmake/modules/detect/tools/find_bash.lua b/xmake/modules/detect/tools/find_bash.lua index 0c1322ad2..063895830 100644 --- a/xmake/modules/detect/tools/find_bash.lua +++ b/xmake/modules/detect/tools/find_bash.lua @@ -43,7 +43,7 @@ function main(opt) -- find bash from git for windows if is_host("windows") then - opt.paths = opt.paths or {} + opt.paths = table.wrap(opt.paths) table.insert(opt.paths, "$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\GitForWindows;InstallPath)\\bin") end diff --git a/xmake/modules/detect/tools/find_clang_format.lua b/xmake/modules/detect/tools/find_clang_format.lua index d378be16e..b1839ce50 100644 --- a/xmake/modules/detect/tools/find_clang_format.lua +++ b/xmake/modules/detect/tools/find_clang_format.lua @@ -41,7 +41,7 @@ function main(opt) if not program and is_host("macosx") then local llvm = try {function () return os.iorunv("brew", {"--prefix", "llvm"}) end} if llvm then - opt.paths = opt.paths or {} + opt.paths = table.wrap(opt.paths) opt.force = true table.insert(opt.paths, path.join(llvm:trim(), "bin")) program = find_program(opt.program or "clang-format", opt) diff --git a/xmake/modules/detect/tools/find_clang_scan_deps.lua b/xmake/modules/detect/tools/find_clang_scan_deps.lua index f4b9cd87b..eae1ace5d 100644 --- a/xmake/modules/detect/tools/find_clang_scan_deps.lua +++ b/xmake/modules/detect/tools/find_clang_scan_deps.lua @@ -41,7 +41,7 @@ function main(opt) if not program and is_host("macosx") then local llvm = try {function () return os.iorunv("brew", {"--prefix", "llvm"}) end} if llvm then - opt.paths = opt.paths or {} + opt.paths = table.wrap(opt.paths) opt.force = true table.insert(opt.paths, path.join(llvm:trim(), "bin")) program = find_program(opt.program or "clang-scan-deps", opt) diff --git a/xmake/modules/detect/tools/find_clang_tidy.lua b/xmake/modules/detect/tools/find_clang_tidy.lua index 0ca6dc0d2..ffa4d5c3b 100644 --- a/xmake/modules/detect/tools/find_clang_tidy.lua +++ b/xmake/modules/detect/tools/find_clang_tidy.lua @@ -41,7 +41,7 @@ function main(opt) if not program and is_host("macosx") then local llvm = try {function () return os.iorunv("brew", {"--prefix", "llvm"}) end} if llvm then - opt.paths = opt.paths or {} + opt.paths = table.wrap(opt.paths) opt.force = true table.insert(opt.paths, path.join(llvm:trim(), "bin")) program = find_program(opt.program or "clang-tidy", opt) diff --git a/xmake/modules/detect/tools/find_curl.lua b/xmake/modules/detect/tools/find_curl.lua index 493264684..899f51721 100644 --- a/xmake/modules/detect/tools/find_curl.lua +++ b/xmake/modules/detect/tools/find_curl.lua @@ -42,7 +42,7 @@ function main(opt) -- find curl from builtin xmake/winenv if is_host("windows") then - opt.paths = opt.paths or {} + opt.paths = table.wrap(opt.paths) table.insert(opt.paths, path.join(os.programdir(), "winenv", "bin")) end diff --git a/xmake/modules/detect/tools/find_dxc.lua b/xmake/modules/detect/tools/find_dxc.lua index 3bded84c3..1563a6ec4 100644 --- a/xmake/modules/detect/tools/find_dxc.lua +++ b/xmake/modules/detect/tools/find_dxc.lua @@ -43,6 +43,7 @@ function main(opt) "$(env VK_SDK_PATH)/Bin", "$(env PATH)" } + opt.paths = table.wrap(opt.paths) local program = find_program(opt.program or "dxc.exe", opt) local version = nil if program and opt and opt.version then diff --git a/xmake/modules/detect/tools/find_iverilog.lua b/xmake/modules/detect/tools/find_iverilog.lua index 85ac740f2..0ab509d72 100644 --- a/xmake/modules/detect/tools/find_iverilog.lua +++ b/xmake/modules/detect/tools/find_iverilog.lua @@ -43,7 +43,7 @@ function main(opt) -- find it from some logical drives paths if is_host("windows") then - opt.paths = opt.paths or {} + opt.paths = table.wrap(opt.paths) for _, logical_drive in ipairs(winos.logical_drives()) do table.insert(opt.paths, path.join(logical_drive, "iverilog", "bin")) end diff --git a/xmake/modules/detect/tools/find_midl.lua b/xmake/modules/detect/tools/find_midl.lua index a8b7c6119..d9e59bef6 100644 --- a/xmake/modules/detect/tools/find_midl.lua +++ b/xmake/modules/detect/tools/find_midl.lua @@ -45,7 +45,7 @@ function main(opt) local arch = toolchain and toolchain:arch() or config.arch() local bindir = path.join(envs.WindowsSdkDir, "bin", envs.WindowsSDKVersion, arch) if os.isdir(bindir) then - opt.paths = opt.paths or {} + opt.paths = table.wrap(opt.paths) table.insert(opt.paths, bindir) end end diff --git a/xmake/modules/detect/tools/find_ollydbg.lua b/xmake/modules/detect/tools/find_ollydbg.lua index 78971c89f..62f5ca419 100644 --- a/xmake/modules/detect/tools/find_ollydbg.lua +++ b/xmake/modules/detect/tools/find_ollydbg.lua @@ -50,6 +50,7 @@ function main(opt) return (val("reg " .. reg) or ""):match("\"(.-)\"") end end + opt.paths = table.wrap(opt.paths) opt.check = opt.check or function (program) if not os.isfile(program) then raise() end end -- find program diff --git a/xmake/modules/detect/tools/find_python3.lua b/xmake/modules/detect/tools/find_python3.lua index 3b606f279..2e2477c11 100644 --- a/xmake/modules/detect/tools/find_python3.lua +++ b/xmake/modules/detect/tools/find_python3.lua @@ -40,7 +40,7 @@ function main(opt) -- init options opt = opt or {} if is_host("windows") then - opt.paths = opt.paths or {} + opt.paths = table.wrap(opt.paths) local keys = winos.registry_keys("HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.*\\InstallPath") for _, key in ipairs(keys) do local value = try {function () return winos.registry_query(key .. ";ExecutablePath") end} diff --git a/xmake/modules/detect/tools/find_renderdoc.lua b/xmake/modules/detect/tools/find_renderdoc.lua index 771fbcfd4..f8cb84381 100644 --- a/xmake/modules/detect/tools/find_renderdoc.lua +++ b/xmake/modules/detect/tools/find_renderdoc.lua @@ -40,7 +40,7 @@ function main(opt) -- init options opt = opt or {} if is_host("windows") then - opt.paths = opt.paths or {} + opt.paths = table.wrap(opt.paths) -- add paths from registry local regs = diff --git a/xmake/modules/detect/tools/find_vsjitdebugger.lua b/xmake/modules/detect/tools/find_vsjitdebugger.lua index ecaede0b7..315b333bc 100644 --- a/xmake/modules/detect/tools/find_vsjitdebugger.lua +++ b/xmake/modules/detect/tools/find_vsjitdebugger.lua @@ -50,6 +50,7 @@ function main(opt) return (val("reg " .. reg) or ""):match("\"(.-)\"") end end + opt.paths = table.wrap(opt.paths) opt.check = opt.check or function (program) if not os.isfile(program) then raise() end end -- find program diff --git a/xmake/modules/detect/tools/find_vswhere.lua b/xmake/modules/detect/tools/find_vswhere.lua index 75efb6b6e..7576ceda2 100644 --- a/xmake/modules/detect/tools/find_vswhere.lua +++ b/xmake/modules/detect/tools/find_vswhere.lua @@ -55,6 +55,7 @@ function main(opt) "$(env ProgramFiles%(x86%))\\Microsoft Visual Studio\\Installer", "$(env ProgramFiles)\\Microsoft Visual Studio\\Installer" } + opt.paths = table.wrap(opt.paths) local program = find_program(opt.program or "vswhere.exe", opt) -- find program version diff --git a/xmake/modules/detect/tools/find_vvp.lua b/xmake/modules/detect/tools/find_vvp.lua index c13cbcf1a..11a698f13 100644 --- a/xmake/modules/detect/tools/find_vvp.lua +++ b/xmake/modules/detect/tools/find_vvp.lua @@ -43,7 +43,7 @@ function main(opt) -- find it from some logical drives paths if is_host("windows") then - opt.paths = opt.paths or {} + opt.paths = table.wrap(opt.paths) for _, logical_drive in ipairs(winos.logical_drives()) do table.insert(opt.paths, path.join(logical_drive, "iverilog", "bin")) end diff --git a/xmake/modules/detect/tools/find_windbg.lua b/xmake/modules/detect/tools/find_windbg.lua index 85fc61d03..8a6e07ae4 100644 --- a/xmake/modules/detect/tools/find_windbg.lua +++ b/xmake/modules/detect/tools/find_windbg.lua @@ -50,6 +50,7 @@ function main(opt) return (val("reg " .. reg) or ""):match("\"(.-)\"") end end + opt.paths = table.wrap(opt.paths) opt.check = opt.check or function (program) if not os.isfile(program) then raise() end end -- find program diff --git a/xmake/modules/detect/tools/find_x64dbg.lua b/xmake/modules/detect/tools/find_x64dbg.lua index 350ac8ad0..472aea156 100644 --- a/xmake/modules/detect/tools/find_x64dbg.lua +++ b/xmake/modules/detect/tools/find_x64dbg.lua @@ -50,6 +50,7 @@ function main(opt) return (val("reg " .. reg) or ""):match("\"(.-)\"") end end + opt.paths = table.wrap(opt.paths) opt.check = opt.check or function (program) if not os.isfile(program) then raise() end end -- find program |
