diff options
| author | ruki <[email protected]> | 2017-06-01 11:23:19 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-06-01 11:23:19 +0800 |
| commit | 2743cb2ee2b2640bbb22aa39d63c134563949a05 (patch) | |
| tree | 937f1ac22b73da7bb6149bdb99671e80074dc879 /xmake/modules/detect/tool/find_vsjitdebugger.lua | |
| parent | 95a3f4499e5fb575613b4192519a53d323a7a19c (diff) | |
improve find program, file and path modules
Diffstat (limited to 'xmake/modules/detect/tool/find_vsjitdebugger.lua')
| -rw-r--r-- | xmake/modules/detect/tool/find_vsjitdebugger.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xmake/modules/detect/tool/find_vsjitdebugger.lua b/xmake/modules/detect/tool/find_vsjitdebugger.lua index 922d3fdf3..879fd0a5d 100644 --- a/xmake/modules/detect/tool/find_vsjitdebugger.lua +++ b/xmake/modules/detect/tool/find_vsjitdebugger.lua @@ -51,7 +51,10 @@ function main(opt) opt = opt or {} -- find program - return find_program(opt.program or "vsjitdebugger", {"$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug;Debugger)", - "$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug;Debugger)"} + return find_program(opt.program or "vsjitdebugger", {function () + for _, reg in ipairs({"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug;Debugger", "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug;Debugger"}) do + return (val("reg " .. reg) or ""):match("\"(.-)\"") + end + end} , function (program) if not os.isfile(program) then raise() end end) end |
