From fed8abacbe52da172472dc3916fbf8e3a3ccc3a5 Mon Sep 17 00:00:00 2001 From: Yiheng Wu <36156959+jingkaimori@users.noreply.github.com> Date: Sun, 23 Jul 2023 08:26:25 +0800 Subject: [PATCH] Add qt installer framework from aqt (#2342) * add qt installer framework from aqt * fix several issues * Update xmake.lua * add missing xcb library * add msys platform * fix #2 * change xcb package * add missiong package 2 * fix 3rd * fix 4th * add missing library 5th * fix 6th * fix conflict package * re-add shared 7th * fix 8th * fix package conflict 9th * install qtifw only on macos and windows * Update xmake.lua * Update xmake.lua --------- Co-authored-by: ruki --- packages/q/qtifw/xmake.lua | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 packages/q/qtifw/xmake.lua diff --git a/packages/q/qtifw/xmake.lua b/packages/q/qtifw/xmake.lua new file mode 100644 index 000000000..d84a0588c --- /dev/null +++ b/packages/q/qtifw/xmake.lua @@ -0,0 +1,44 @@ +package("qtifw") + set_kind("binary") + set_homepage("https://doc.qt.io/qtinstallerframework/") + set_description("The Qt Installer Framework provides a set of tools and utilities to create installers for the supported desktop Qt platforms: Linux, Microsoft Windows, and macOS.") + set_license("GPL-3") + + add_versions("4.6.0", "dummy") + + add_deps("aqt") + + on_install("@windows", "@msys", "@macosx", function (package) + + local host + if is_host("windows", "msys") then + host = "windows" + elseif is_host("linux") then + host = "linux" + elseif is_host("macosx") then + host = "mac" + else + raise("unhandled host " .. os.host()) + end + + local target = "desktop" + local version = package:version() + local installdir = package:installdir() + os.vrunv("aqt", {"install-tool", "-O", installdir, host, target, "tools_ifw", "qt.tools.ifw." .. version:major() .. version:minor()}) + os.mv(path.join(installdir, "Tools", "*", version:major() .. "." .. version:minor(), "*"), installdir) + os.rmdir(path.join(installdir, "Tools")) + end) + + on_test(function (package) + local function assertbin(name) + if is_host("windows") then + name = name .. ".exe" + end + local exec = path.join(package:installdir(), "bin", name) + assert(os.isexec(exec), name .. " not found!") + end + os.vrun("binarycreator --help") + os.vrun("archivegen --help") + os.vrun("devtool --help") + assertbin("repogen") + end)