diff options
| author | ruki <[email protected]> | 2023-03-15 22:32:47 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-03-15 22:32:47 +0800 |
| commit | 01f609b7044a43206d1a05aaa1bdc318116ffad7 (patch) | |
| tree | a38e23e2a14ac92efa0d0cf0b93027d2bd65e49f | |
| parent | 046b0d1fdbab9375add79dc86e7167268fc6f6e6 (diff) | |
fix install qt program on windows #3505
| -rw-r--r-- | xmake/rules/qt/deploy/macosx.lua | 3 | ||||
| -rw-r--r-- | xmake/rules/qt/install/windows.lua | 3 | ||||
| -rw-r--r-- | xmake/rules/qt/moc/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/qt/qmltyperegistrar/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/qt/qrc/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/qt/ui/xmake.lua | 2 |
6 files changed, 8 insertions, 6 deletions
diff --git a/xmake/rules/qt/deploy/macosx.lua b/xmake/rules/qt/deploy/macosx.lua index 12a1c6081..5abbe4263 100644 --- a/xmake/rules/qt/deploy/macosx.lua +++ b/xmake/rules/qt/deploy/macosx.lua @@ -25,6 +25,7 @@ import("core.project.config") import("core.project.depend") import("core.tool.toolchain") import("lib.detect.find_path") +import("detect.sdks.find_qt") import("utils.progress") -- save Info.plist @@ -87,7 +88,7 @@ function main(target, opt) progress.show(opt.progress, "${color.build.target}generating.qt.app %s.app", target:basename()) -- get qt sdk - local qt = target:data("qt") + local qt = assert(find_qt(), "Qt SDK not found!") -- get macdeployqt local macdeployqt = path.join(qt.bindir, "macdeployqt") diff --git a/xmake/rules/qt/install/windows.lua b/xmake/rules/qt/install/windows.lua index 2582d74ae..fdd9dd384 100644 --- a/xmake/rules/qt/install/windows.lua +++ b/xmake/rules/qt/install/windows.lua @@ -23,6 +23,7 @@ import("core.base.option") import("core.project.config") import("core.tool.toolchain") import("lib.detect.find_path") +import("detect.sdks.find_qt") -- get install directory function _get_installdir(target) @@ -38,7 +39,7 @@ function main(target, opt) local installfile = path.join(installdir, "bin", path.filename(targetfile)) -- get qt sdk - local qt = target:data("qt") + local qt = assert(find_qt(), "Qt SDK not found!") -- get windeployqt local windeployqt = path.join(qt.bindir, "windeployqt.exe") diff --git a/xmake/rules/qt/moc/xmake.lua b/xmake/rules/qt/moc/xmake.lua index 6290e6395..ab2026d20 100644 --- a/xmake/rules/qt/moc/xmake.lua +++ b/xmake/rules/qt/moc/xmake.lua @@ -28,7 +28,7 @@ rule("qt.moc") import("core.tool.compiler") -- get moc - local qt = assert(target:data("qt"), "qt not found!") + local qt = assert(target:data("qt"), "Qt not found!") local moc = path.join(qt.bindir, is_host("windows") and "moc.exe" or "moc") if not os.isexec(moc) and qt.libexecdir then moc = path.join(qt.libexecdir, is_host("windows") and "moc.exe" or "moc") diff --git a/xmake/rules/qt/qmltyperegistrar/xmake.lua b/xmake/rules/qt/qmltyperegistrar/xmake.lua index f31f95789..b0f1e3514 100644 --- a/xmake/rules/qt/qmltyperegistrar/xmake.lua +++ b/xmake/rules/qt/qmltyperegistrar/xmake.lua @@ -24,7 +24,7 @@ rule("qt.qmltyperegistrar") on_config(function(target) -- get qt - local qt = assert(target:data("qt"), "qt not found!") + local qt = assert(target:data("qt"), "Qt not found!") -- get qmltyperegistrar local qmltyperegistrar = path.join(qt.bindir, is_host("windows") and "qmltyperegistrar.exe" or "qmltyperegistrar") diff --git a/xmake/rules/qt/qrc/xmake.lua b/xmake/rules/qt/qrc/xmake.lua index e15ae96d6..05b35dbdd 100644 --- a/xmake/rules/qt/qrc/xmake.lua +++ b/xmake/rules/qt/qrc/xmake.lua @@ -24,7 +24,7 @@ rule("qt.qrc") on_config(function (target) -- get rcc - local qt = assert(target:data("qt"), "qt not found!") + local qt = assert(target:data("qt"), "Qt not found!") local rcc = path.join(qt.bindir, is_host("windows") and "rcc.exe" or "rcc") if not os.isexec(rcc) and qt.libexecdir then rcc = path.join(qt.libexecdir, is_host("windows") and "rcc.exe" or "rcc") diff --git a/xmake/rules/qt/ui/xmake.lua b/xmake/rules/qt/ui/xmake.lua index b9058685e..27fbe5764 100644 --- a/xmake/rules/qt/ui/xmake.lua +++ b/xmake/rules/qt/ui/xmake.lua @@ -24,7 +24,7 @@ rule("qt.ui") on_config(function (target) -- get uic - local qt = assert(target:data("qt"), "qt not found!") + local qt = assert(target:data("qt"), "Qt not found!") local uic = path.join(qt.bindir, is_host("windows") and "uic.exe" or "uic") if not os.isexec(uic) and qt.libexecdir then uic = path.join(qt.libexecdir, is_host("windows") and "uic.exe" or "uic") |
