diff options
| -rw-r--r-- | xmake/modules/detect/tools/find_sdar.lua | 13 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_sdcc.lua | 11 |
2 files changed, 19 insertions, 5 deletions
diff --git a/xmake/modules/detect/tools/find_sdar.lua b/xmake/modules/detect/tools/find_sdar.lua index 4f1ed46bc..cbc5b6b26 100644 --- a/xmake/modules/detect/tools/find_sdar.lua +++ b/xmake/modules/detect/tools/find_sdar.lua @@ -39,11 +39,18 @@ function main(opt) -- init options opt = opt or {} opt.command = opt.command or "--version" - - -- add search pathes (sdk/bin) + + -- add search pathes + local pathes = {} local bindir = get_config("bin") if bindir and os.isdir(bindir) then - opt.pathes = bindir + table.insert(pathes, bindir) + end + if is_host("windows") then + table.insert(pathes, "$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\SDCC)\\bin") + end + if #pathes > 0 then + opt.pathes = pathes end -- find program diff --git a/xmake/modules/detect/tools/find_sdcc.lua b/xmake/modules/detect/tools/find_sdcc.lua index a57a343db..8c4e96d53 100644 --- a/xmake/modules/detect/tools/find_sdcc.lua +++ b/xmake/modules/detect/tools/find_sdcc.lua @@ -40,10 +40,17 @@ function main(opt) opt = opt or {} opt.command = opt.command or "--version" - -- add search pathes (sdk/bin) + -- add search pathes + local pathes = {} local bindir = get_config("bin") if bindir and os.isdir(bindir) then - opt.pathes = bindir + table.insert(pathes, bindir) + end + if is_host("windows") then + table.insert(pathes, "$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\SDCC)\\bin") + end + if #pathes > 0 then + opt.pathes = pathes end -- find program |
