Add PortableBuildTools (#5819)

* add portablebuildtools

* fix test
dev
ruki 15 hours ago committed by GitHub
parent 3486564e4d
commit 30b4ce1c4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 17
      packages/p/portablebuildtools/xmake.lua
  2. 4
      scripts/new.lua

@ -0,0 +1,17 @@
package("portablebuildtools")
set_kind("toolchain")
set_homepage("https://github.com/Data-Oriented-House/PortableBuildTools")
set_description("Portable VS Build Tools installer")
add_urls("https://github.com/Data-Oriented-House/PortableBuildTools/releases/download/$(version)/PortableBuildTools.exe")
add_versions("v2.8", "d3a419be62856ab8896004f91af58f5928ce7c536954398d02a8b99202c4808f")
on_install("@windows", "@msys", function (package)
os.cp(package:originfile(), package:installdir("bin"))
end)
on_test(function (package)
os.runv("PortableBuildTools.exe", {"list"})
end)

@ -172,7 +172,7 @@ function generate_package(reponame, get_data)
deps = {},
priority = 1,
install = function(configs, package)
return [=[
return ([=[
io.writefile("xmake.lua", [[
add_rules("mode.release", "mode.debug")
target("%s")
@ -180,7 +180,7 @@ function generate_package(reponame, get_data)
add_files("src/*.c")
add_headerfiles("src/(*.h)")
]])
import("package.tools.xmake").install(package)]=]
import("package.tools.xmake").install(package)]=]):format(packagename)
end,
},
["CMakeLists.txt"] = {

Loading…
Cancel
Save