Skip to content

Commit cefe296

Browse files
att
1 parent 703968a commit cefe296

4 files changed

Lines changed: 20 additions & 2 deletions

File tree

build/build/amalgamation_build.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,16 @@ function amalgamation_build()
4848
project.add_lua_code("end\n")
4949
project.add_lua_code("heregitage = heregitage()\n")
5050

51+
project.add_lua_code("clpr_module = ")
52+
project.add_lua_file("dependencies/clpr.lua")
53+
project.add_lua_code("\n")
54+
project.add_lua_file("clpr_start.lua")
5155
local src_files = darwin.dtw.list_files_recursively("luasrc",true);
5256
for i=1,#src_files do
5357
local file = src_files[i]
5458
project.add_lua_file(file);
5559
end
56-
project.add_lua_code("private_vibescript.main()\n")
60+
project.add_lua_code("clpr.add_main(private_vibescript.main)")
5761
project.c_external_code[#project.c_external_code + 1] ="#define VIBE_AMALGAMATION\n"
5862
project.add_c_file("csrc/start.c",true)
5963
project.load_lib_from_c("vibescript_start","cvibescript")

build/install_dependencies.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ function Install_dependencies()
2323
{url="https://github.com/OUIsolutions/LuaWebDriver/releases/download/1.6.0/luaWebDriver.lua", path = "dependencies/luaWebDriver.lua"},
2424
{url="https://github.com/SamuelHenriqueDeMoraisVitrio/LuaBerrante/releases/download/V0.0.1/LuaBerrante.lua", path = "dependencies/LuaBerrante.lua"},
2525
{url="https://github.com/mateusmoutinho/LuaHeritage/releases/download/1.0.0/heregitage.lua", path = "dependencies/heregitage.lua"},
26+
{url="https://github.com/OUIsolutions/clpr/releases/download/0.1.0/embed.lua", path = "dependencies/clpr.lua"},
27+
2628
}
2729
for _, lib in ipairs(libs) do
2830
local executor = function()

clpr_start.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
clpr = clpr_module.newOrchestrator({
2+
args = arg,
3+
database_path = ".clpr",
4+
write_file = dtw.write_file,
5+
remove_dir = dtw.remove_any,
6+
load_file = dtw.load_file,
7+
dumper = dtw.serialize_var,
8+
loader = dtw.interpret_serialized_var,
9+
get_pid = dtw.get_pid,
10+
is_pid_alive = dtw.is_pid_alive,
11+
kill_process_by_pid = dtw.kill_process,
12+
})

luasrc/main.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ private_vibescript.internal_main = function()
9090
dofile(filename)
9191

9292
end
93+
9394
private_vibescript.main = function()
9495

9596
if vibescript_extension_main then
@@ -98,7 +99,6 @@ private_vibescript.main = function()
9899

99100
argv.get_next_unused()
100101

101-
102102
local ok, error = pcall(private_vibescript.internal_main)
103103
if not ok then
104104
print(private_vibescript.RED..error..private_vibescript.RESET)

0 commit comments

Comments
 (0)