add version limit

yy-thunks
star9029 2 weeks ago
parent 64ac60ded8
commit 79a98dedc3
  1. 6
      packages/y/yy-thunks/rules/link.lua
  2. 2
      packages/y/yy-thunks/xmake.lua

@ -5,10 +5,12 @@ rule("xp")
if thunks then if thunks then
local installdir = thunks:installdir() local installdir = thunks:installdir()
table.insert(target:objectfiles(), 1, path.join(installdir, "lib", objectfile)) table.insert(target:objectfiles(), 1, path.join(installdir, "lib", objectfile))
if thunks:version():ge("1.1") then
if target:is_shared() then if target:is_shared() then
target:add("shflags", "/entry:DllMainCRTStartupForYY_Thunks", {tools = "link", force = true}) target:add("shflags", "/entry:DllMainCRTStartupForYY_Thunks", {tools = "link", force = true})
end end
end end
end
end) end)
rule("vista") rule("vista")
@ -17,7 +19,7 @@ rule("vista")
local thunks = target:pkg("yy-thunks") local thunks = target:pkg("yy-thunks")
if thunks then if thunks then
local installdir = thunks:installdir() local installdir = thunks:installdir()
table.insert(target:objectfiles(), path.join(installdir, "lib", objectfile)) table.insert(target:objectfiles(), 1, path.join(installdir, "lib", objectfile))
end end
end) end)
@ -31,7 +33,7 @@ rule("2k")
local thunks = target:pkg("yy-thunks") local thunks = target:pkg("yy-thunks")
if thunks then if thunks then
local installdir = thunks:installdir() local installdir = thunks:installdir()
table.insert(target:objectfiles(), path.join(installdir, "lib", objectfile)) table.insert(target:objectfiles(), 1, path.join(installdir, "lib", objectfile))
end end
end) end)

@ -11,7 +11,7 @@ package("yy-thunks")
add_versions("1.0.9", "216b88757f28075d3d8c0363139e870d49ba84458fc10a0f094f264ebf0a302c") add_versions("1.0.9", "216b88757f28075d3d8c0363139e870d49ba84458fc10a0f094f264ebf0a302c")
add_versions("1.0.7", "3607a79ac37f141cbcbf00aaea8d82a4c2628d81d8dad9e2a4dce4c8c17a025b") add_versions("1.0.7", "3607a79ac37f141cbcbf00aaea8d82a4c2628d81d8dad9e2a4dce4c8c17a025b")
on_install("windows|x64", "windows|x86", "mingw", "msys", function (package) on_install("windows|x64", "windows|x86", function (package)
-- check vs version -- check vs version
local vs = package:toolchain("msvc"):config("vs") local vs = package:toolchain("msvc"):config("vs")
if vs and tonumber(vs) < 2005 then if vs and tonumber(vs) < 2005 then

Loading…
Cancel
Save