diff options
| author | ruki <[email protected]> | 2017-05-30 23:14:27 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-05-30 23:14:27 +0800 |
| commit | f01d5364141a3e2a965bd9d46e65a2bd851e27ec (patch) | |
| tree | 6d56fb256655efa493021ee1a340368407c2c7c2 /xmake/modules/detect | |
| parent | af5040e4c197ce261062b925743201358dc5e43c (diff) | |
add winreg.query and improve program
Diffstat (limited to 'xmake/modules/detect')
| -rw-r--r-- | xmake/modules/detect/tool/find_ollydbg.lua | 18 | ||||
| -rw-r--r-- | xmake/modules/detect/tool/find_vsjitdebugger.lua | 18 | ||||
| -rw-r--r-- | xmake/modules/detect/tool/find_windbg.lua | 18 | ||||
| -rw-r--r-- | xmake/modules/detect/tool/find_x64dbg.lua | 18 |
4 files changed, 28 insertions, 44 deletions
diff --git a/xmake/modules/detect/tool/find_ollydbg.lua b/xmake/modules/detect/tool/find_ollydbg.lua index 0075e9eb8..3afd51276 100644 --- a/xmake/modules/detect/tool/find_ollydbg.lua +++ b/xmake/modules/detect/tool/find_ollydbg.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 "ollydbg", {}) - - -- 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 "ollydbg", {"[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 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 diff --git a/xmake/modules/detect/tool/find_windbg.lua b/xmake/modules/detect/tool/find_windbg.lua index 89d9e2563..f42469698 100644 --- a/xmake/modules/detect/tool/find_windbg.lua +++ b/xmake/modules/detect/tool/find_windbg.lua @@ -47,15 +47,11 @@ function main(opt) return end - -- find program, TODO from winreg - local program = find_program(opt.program or "windbg", {}) - - -- 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 "windbg", {"[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 diff --git a/xmake/modules/detect/tool/find_x64dbg.lua b/xmake/modules/detect/tool/find_x64dbg.lua index be6c73155..38b8a5004 100644 --- a/xmake/modules/detect/tool/find_x64dbg.lua +++ b/xmake/modules/detect/tool/find_x64dbg.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 "x64dbg", {}) - - -- 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 "x64dbg", {"[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 |
