xmake.lua 1.1 KB

12345678910111213141516171819202122232425
  1. package("w64devkit")
  2. set_kind("toolchain")
  3. set_homepage("https://github.com/skeeto/w64devkit")
  4. set_description("Portable C and C++ Development Kit for x64 (and x86) Windows")
  5. set_license("Unlicense")
  6. if os.arch() == "x64" then
  7. add_urls("https://github.com/skeeto/w64devkit/releases/download/v$(version)/w64devkit-x64-$(version).exe")
  8. add_versions("2.0.0", "cea23fc56a5e61457492113a8377c8ab0c42ed82303fcc454ccd1963a46f8ce1")
  9. elseif os.arch() == "x86" then
  10. add_urls("https://github.com/skeeto/w64devkit/releases/download/v$(version)/w64devkit-x86-$(version).exe")
  11. add_versions("2.0.0", "20ad6ef39c6b5fa0a0f49ec11891224a5856071976f4cb4042106a2451feef61")
  12. end
  13. on_install("@windows|x64", function (package)
  14. local archive = format("../w64devkit-%s-%s.exe", package:arch(), package:version_str())
  15. os.vrunv("7z", {"x", archive, "-o."})
  16. os.cp("w64devkit/*", package:installdir())
  17. end)
  18. on_test(function (package)
  19. os.vrunv(package:installdir("bin/x86_64-w64-mingw32-gcc.exe"), {"--version"})
  20. end)