summaryrefslogtreecommitdiff
path: root/xmake/modules/detect/tool/find_vsjitdebugger.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-05-30 23:14:27 +0800
committerruki <[email protected]>2017-05-30 23:14:27 +0800
commitf01d5364141a3e2a965bd9d46e65a2bd851e27ec (patch)
tree6d56fb256655efa493021ee1a340368407c2c7c2 /xmake/modules/detect/tool/find_vsjitdebugger.lua
parentaf5040e4c197ce261062b925743201358dc5e43c (diff)
add winreg.query and improve program
Diffstat (limited to 'xmake/modules/detect/tool/find_vsjitdebugger.lua')
-rw-r--r--xmake/modules/detect/tool/find_vsjitdebugger.lua18
1 files changed, 7 insertions, 11 deletions
diff --git a/xmake/modules/detect/tool/find_vsjitdebugger.lua b/xmake/modules/detect/tool/find_vsjitdebugger.lua
index bc7b12144..0d3368c72 100644
--- a/xmake/modules/detect/tool/find_vsjitdebugger.lua
+++ b/xmake/modules/detect/tool/find_vsjitdebugger.lua
@@ -46,16 +46,12 @@ function main(opt)
if os.host() ~= "windows" then
return
end
-
- -- find program, TODO from winreg
- local program = find_program(opt.program or "vsjitdebugger", {})
-
- -- find program version
- local version = nil
- if program and opt and opt.version then
- version = find_programver(program)
- end
- -- ok?
- return program, version
+ -- init options
+ opt = opt or {}
+
+ -- find program
+ return find_program(opt.program or "vsjitdebugger", {"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug;Debugger]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug;Debugger]"}
+ , function (program) if not os.isfile(program) then raise() end end)
end