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 <waruqi@gmail.com>
pull/2351/head
Yiheng Wu 1 year ago committed by GitHub
parent 6a24658a3c
commit fed8abacbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 44
      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)
Loading…
Cancel
Save