Skip to content

Commit

Permalink
Merge pull request #1 from cngege/hookmanager-tov0.4.1-dev
Browse files Browse the repository at this point in the history
add v0.4.1
  • Loading branch information
cngege authored Jan 2, 2025
2 parents 72d7580 + 2b676e6 commit 7429b62
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions packages/h/hookmanager/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@ package("hookmanager")
add_urls("https://github.com/cngege/HookManager/archive/refs/tags/$(version).tar.gz",
"https://github.com/cngege/HookManager.git")

add_versions("v0.4.1", "51eff9fe2fbff64ddd97e12f8860bb71c194f58a18ef4ebbcfe634bebc632bae")
add_versions("v0.3.3", "8a4ebc17def15c93a09125466211e8ed700c05c4197a8eb0d6aa4a7ed9a4b9a1")
add_versions("v0.3.2", "35f4e658182bfe8d70eaab6af15fee6b182367e0cc7a7163c49ddb1c64024183")

add_configs("lighthook", {description = "Use lighthook as the underlying hook executor.", default = true, type = "boolean"})
add_configs("minhook", {description = "Use minhook as the underlying hook executor.", default = false, type = "boolean"})
add_configs("lighthook", {description = "Use lighthook as the underlying hook executor.", default = false, type = "boolean"})
add_configs("minhook", {description = "Use minhook as the underlying hook executor.", default = true, type = "boolean"})
add_configs("detours", {description = "Use detours as the underlying hook executor.", default = false, type = "boolean"})

on_load("windows|x64", function (package)
if on_check then
on_check(function (package)
assert(package:is_arch("x86") and package:config("lighthook"),"package(hookmanager) LightHook does not support the X86 architecture.")
end)
end

on_load(function (package)
if package:config("lighthook") then
package:add("deps", "lighthook")
package:add("defines", "USE_LIGHTHOOK")
Expand All @@ -27,7 +34,7 @@ package("hookmanager")
end
end)

on_install("windows|x64", function (package)
on_install("windows", function (package)
os.cp("include/HookManager/HookManager.hpp", package:installdir("include/HookManager"))
end)

Expand Down

0 comments on commit 7429b62

Please sign in to comment.