`npcap_sdk`: add `mingw` support with workaround for unrecognized SAL (#5390)

* npcap_sdk: add mingw support with workaround for unrecognized SAL

* npcap_sdk: add previous version 1.12 for compatibility

* correct architecture specifier for mingw

* fix wrong patch
pull/3693/merge
Doekin 2 months ago committed by GitHub
parent 53ae098458
commit 88636725f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 11
      packages/n/npcap_sdk/xmake.lua

@ -4,12 +4,17 @@ package("npcap_sdk")
set_urls("https://npcap.com/dist/npcap-sdk-$(version).zip") set_urls("https://npcap.com/dist/npcap-sdk-$(version).zip")
add_versions("1.13", "dad1f2bf1b02b787be08ca4862f99e39a876c1f274bac4ac0cedc9bbc58f94fd") add_versions("1.13", "dad1f2bf1b02b787be08ca4862f99e39a876c1f274bac4ac0cedc9bbc58f94fd")
add_versions("1.12", "24c4862723f61d28048a24e10eb31d2269b2152a5762410dd1caffc041871337")
on_install("windows", function (package) on_install("windows", "mingw", function (package)
os.cp("Include", package:installdir()) if package:is_plat("mingw") and package:version():eq("1.13") then
io.replace("Include/Packet32.h", "_Post_invalid_", "", {plain = true})
end
os.cp("Include/*", package:installdir("include"))
if package:is_arch("arm64") then if package:is_arch("arm64") then
os.cp("Lib/ARM64/*", package:installdir("lib")) os.cp("Lib/ARM64/*", package:installdir("lib"))
elseif package:is_arch("x86") then elseif package:is_arch("x86") or package:is_arch("i386") then
os.cp("Lib/*.lib", package:installdir("lib")) os.cp("Lib/*.lib", package:installdir("lib"))
else else
os.cp("Lib/x64/*.lib", package:installdir("lib")) os.cp("Lib/x64/*.lib", package:installdir("lib"))

Loading…
Cancel
Save