diff --git a/packages/p/portablebuildtools/xmake.lua b/packages/p/portablebuildtools/xmake.lua new file mode 100644 index 000000000..f3d4bbae7 --- /dev/null +++ b/packages/p/portablebuildtools/xmake.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) + diff --git a/scripts/new.lua b/scripts/new.lua index ad610da28..2d423b766 100644 --- a/scripts/new.lua +++ b/scripts/new.lua @@ -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"] = {