diff options
| author | ruki <[email protected]> | 2018-04-22 00:31:31 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-04-22 00:31:31 +0800 |
| commit | 291020d00ec56964b62a89e19935a6c13b4baf26 (patch) | |
| tree | ac34ee2b61a71b7b4353cd269ad4956b0f50f0a5 /xmake/modules/detect | |
| parent | e189adce6d8d836e6b8aecf43f10f1cff3949c79 (diff) | |
detect qy sdk for windows
Diffstat (limited to 'xmake/modules/detect')
| -rw-r--r-- | xmake/modules/detect/sdks/find_qt.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/xmake/modules/detect/sdks/find_qt.lua b/xmake/modules/detect/sdks/find_qt.lua index 21c638eae..1becbdfc5 100644 --- a/xmake/modules/detect/sdks/find_qt.lua +++ b/xmake/modules/detect/sdks/find_qt.lua @@ -57,6 +57,24 @@ function _find_sdkdir(sdkdir, sdkver) table.insert(pathes, sdkdir) end if os.host() == "windows" then + local regs = + { + "HKEY_CLASSES_ROOT\\Applications\\QtProject.QtCreator.c\\shell\\Open\\Command", + "HKEY_CLASSES_ROOT\\Applications\\QtProject.QtCreator.cpp\\shell\\Open\\Command", + "HKEY_CURRENT_USER\\SOFTWARE\\Classes\\Applications\\QtProject.QtCreator.c\\shell\\Open\\Command", + "HKEY_CURRENT_USER\\SOFTWARE\\Classes\\Applications\\QtProject.QtCreator.cpp\\shell\\Open\\Command" + } + for _, reg in ipairs(regs) do + table.insert(pathes, function () + local value = val("reg " .. reg) + if value then + local p = value:find("\\Tools\\QtCreator", 1, true) + if p then + return path.translate(value:sub(1, p - 1)) + end + end + end) + end else table.insert(pathes, "~/Qt") end |
