This commit is contained in:
ouczbs 2024-10-27 22:38:38 +08:00
parent 081952f1c5
commit 320b41a035
18 changed files with 167 additions and 0 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
build/ build/
vsxmake*/ vsxmake*/
test/ test/
pkg_searchdirs/

View File

@ -0,0 +1,5 @@
[Window][Debug##Default]
Pos=60,60
Size=400,400
Collapsed=0

View File

@ -0,0 +1 @@
{"nodes":{"node:1":{"location":{"x":10,"y":10}},"node:4":{"location":{"x":210,"y":60}}},"selection":null,"view":{"scroll":{"x":-926.13018798828125,"y":-224.184768676757812},"visible_rect":{"max":{"x":3212.46533203125,"y":3025.434814453125},"min":{"x":-6174.201171875,"y":-1494.5650634765625}},"zoom":0.150000005960464478}}

View File

@ -0,0 +1,10 @@
[Window][Debug##Default]
Pos=60,60
Size=400,400
Collapsed=0
[Window][Style]
Pos=60,60
Size=254,1011
Collapsed=0

View File

@ -0,0 +1 @@
{"nodes":{"node:1":{"location":{"x":-252,"y":220}},"node:10":{"location":{"x":-238,"y":504}},"node:16":{"location":{"x":71,"y":80}},"node:20":{"location":{"x":168,"y":316}},"node:27":{"location":{"x":1028,"y":329}},"node:30":{"location":{"x":1204,"y":458}},"node:32":{"location":{"x":868,"y":538}},"node:34":{"group_size":{"x":384,"y":154},"location":{"x":112,"y":576}},"node:35":{"group_size":{"x":640,"y":400},"location":{"x":800,"y":224}},"node:36":{"location":{"x":366,"y":652}},"node:40":{"location":{"x":144,"y":652}},"node:44":{"location":{"x":-348,"y":698}},"node:46":{"location":{"x":-69,"y":652}},"node:5":{"location":{"x":-300,"y":351}},"node:50":{"location":{"x":500,"y":-70}},"node:53":{"location":{"x":500,"y":42}}},"selection":["node:1"],"view":{"scroll":{"x":-326.366241455078125,"y":-251.730209350585938},"visible_rect":{"max":{"x":1336.7591552734375,"y":853.8275146484375},"min":{"x":-647.64129638671875,"y":-499.533538818359375}},"zoom":0.503930568695068359}}

View File

@ -0,0 +1,5 @@
[Window][Debug##Default]
Pos=60,60
Size=400,400
Collapsed=0

View File

@ -0,0 +1,5 @@
[Window][Debug##Default]
Pos=60,60
Size=400,400
Collapsed=0

View File

@ -0,0 +1 @@
{"nodes":{"node:1":{"location":{"x":0,"y":0}}},"selection":null,"view":{"scroll":{"x":-14.2610311508178711,"y":-17.245849609375},"visible_rect":{"max":{"x":1858.31884765625,"y":881.005615234375},"min":{"x":-19.0147113800048828,"y":-22.9944686889648438}},"zoom":0.749999940395355225}}

View File

@ -0,0 +1,5 @@
[Window][Debug##Default]
Pos=60,60
Size=400,400
Collapsed=0

View File

@ -0,0 +1 @@
{"nodes":{"node:1":{"location":{"x":20,"y":20}},"node:10":{"location":{"x":953,"y":73}},"node:4":{"location":{"x":465,"y":9}},"node:7":{"location":{"x":687,"y":9}}},"selection":null,"view":{"scroll":{"x":0,"y":0},"visible_rect":{"max":{"x":1408,"y":678},"min":{"x":0,"y":0}},"zoom":1}}

View File

@ -0,0 +1,17 @@
local lua_xmake = [[
local kind = "%s"
add_requires("lua")
target("lua-protobuf")
set_kind(kind)
add_packages("lua")
add_files("*.c")
add_headerfiles("*.h")
]]
package("lua-protobuf")
set_urls("https://github.com/starwing/lua-protobuf.git")
add_includedirs("include")
on_install("macosx", "linux", "windows", function (package)
io.writefile("xmake.lua", format(lua_xmake,"static"))
local configs = {kind = "static"}
import("package.tools.xmake").install(package, configs)
end)

View File

@ -0,0 +1,11 @@
package("luasocket")
set_kind("share")
set_urls("https://github.com/lunarmodules/luasocket.git")
on_install("macosx", "linux", "windows", function (package)
print("on_install luasocket", os.tmpfile())
local configs = {"-DCMAKE_CXX_STANDARD=17"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.make").build(package)
import("package.tools.make").make(package, {"install_sw"})
end)

View File

@ -0,0 +1,21 @@
local lua_xmake = [[
local kind = "%s"
add_requires("lua")
target("luasocket")
set_basename("core")
set_kind(kind)
add_packages("lua")
add_syslinks("ws2_32")
add_files("src/auxiliar.c","src/buffer.c","src/compat.c" ,"src/except.c" ,"src/inet.c")
add_files("src/io.c","src/luasocket.c","src/options.c" ,"src/select.c" ,"src/tcp.c")
add_files("src/timeout.c","src/udp.c","src/wsocket.c")
add_headerfiles("src/*.h")
]]
package("luasocket")
set_urls("https://github.com/lunarmodules/luasocket.git")
add_includedirs("include")
on_install("macosx", "linux", "windows", function (package)
io.writefile("xmake.lua", format(lua_xmake,"shared"))
local configs = {kind = "shared"}
import("package.tools.xmake").install(package, configs)
end)

View File

@ -0,0 +1,33 @@
package("shaderc")
set_homepage("https://www.lunarg.com/vulkan-sdk/")
set_description("LunarG Vulkan® SDK")
on_load(function (package)
import("detect.sdks.find_vulkansdk")
local vulkansdk = find_vulkansdk()
if vulkansdk then
package:addenv("PATH", vulkansdk.bindir)
end
end)
on_fetch(function (package, opt)
if opt.system then
import("detect.sdks.find_vulkansdk")
import("lib.detect.find_library")
local vulkansdk = find_vulkansdk()
if vulkansdk then
local result = {includedirs = vulkansdk.includedirs, linkdirs = vulkansdk.linkdirs, links = {}}
local utils = {"shaderc", "shaderc_combined","shaderc_util","shaderc_shared"}
for _, util in ipairs(utils) do
if not find_library(util, vulkansdk.linkdirs) then
wprint(format("The library %s for %s is not found!", util, package:arch()))
return
end
table.insert(result.links, util)
end
return result
end
end
end)

View File

@ -0,0 +1,26 @@
local lua_xmake = [[
local kind = "%s"
add_rules("mode.debug", "mode.release")
set_arch("x64")
set_languages("cxx20")
add_requires("UTemplate","USmallFlat")
target("UDRefl")
set_kind(kind)
add_packages("UTemplate","USmallFlat")
add_includedirs("include")
add_files("src/core/**.cpp")
add_headerfiles("include/**.hpp","include/**.h")
]]
package("UDRefl")
set_urls("https://github.com/Ubpa/UDRefl.git")
add_includedirs("include")
add_deps("UTemplate","USmallFlat")
on_install("macosx", "linux", "windows", function (package)
io.writefile("xmake.lua", format(lua_xmake,"static"))
--local configs = {kind = "static"}
package:config_set("debug",true)
os.cp("include", package:installdir())
import("package.tools.xmake").install(package)
--import("package.tools.xmake").install(package)
end)

View File

@ -0,0 +1,9 @@
package("USRefl")
add_deps("UTemplate","USmallFlat")
set_kind("library", {headeronly = true})
set_urls("https://github.com/Ubpa/USRefl.git")
add_includedirs("include")
on_install(function (package)
os.cp("include", package:installdir())
end)

View File

@ -0,0 +1,8 @@
package("USmallFlat")
set_kind("library", {headeronly = true})
set_urls("https://github.com/Ubpa/USmallFlat.git")
add_includedirs("include")
on_install(function (package)
os.cp("include", package:installdir())
end)

View File

@ -0,0 +1,7 @@
package("UTemplate")
set_kind("library", {headeronly = true})
set_urls("https://github.com/Ubpa/UTemplate.git")
add_includedirs("include")
on_install(function (package)
os.cp("include", package:installdir())
end)