Browse Source

add v0.4.1 (#6117)

muzili 9 months ago
parent
commit
9e5a55717b
1 changed files with 11 additions and 4 deletions
  1. 11 4
      packages/h/hookmanager/xmake.lua

+ 11 - 4
packages/h/hookmanager/xmake.lua

@@ -7,14 +7,21 @@ package("hookmanager")
     add_urls("https://github.com/cngege/HookManager/archive/refs/tags/$(version).tar.gz",
     add_urls("https://github.com/cngege/HookManager/archive/refs/tags/$(version).tar.gz",
              "https://github.com/cngege/HookManager.git")
              "https://github.com/cngege/HookManager.git")
 
 
+    add_versions("v0.4.1", "51eff9fe2fbff64ddd97e12f8860bb71c194f58a18ef4ebbcfe634bebc632bae")
     add_versions("v0.3.3", "8a4ebc17def15c93a09125466211e8ed700c05c4197a8eb0d6aa4a7ed9a4b9a1")
     add_versions("v0.3.3", "8a4ebc17def15c93a09125466211e8ed700c05c4197a8eb0d6aa4a7ed9a4b9a1")
     add_versions("v0.3.2", "35f4e658182bfe8d70eaab6af15fee6b182367e0cc7a7163c49ddb1c64024183")
     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"})
     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
         if package:config("lighthook") then
             package:add("deps", "lighthook")
             package:add("deps", "lighthook")
             package:add("defines", "USE_LIGHTHOOK")
             package:add("defines", "USE_LIGHTHOOK")
@@ -27,7 +34,7 @@ package("hookmanager")
         end
         end
     end)
     end)
 
 
-    on_install("windows|x64", function (package)
+    on_install("windows", function (package)
         os.cp("include/HookManager/HookManager.hpp", package:installdir("include/HookManager"))
         os.cp("include/HookManager/HookManager.hpp", package:installdir("include/HookManager"))
     end)
     end)