Skip to content

Commit

Permalink
chore: fix missing language package
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrBox committed Jan 1, 2025
1 parent 3ffc581 commit 3bbf2d5
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,13 @@ target("legacy-script-engine")
)
set_basename("legacy-script-engine-lua")
after_build(function(target)
local baselibPath = path.join(os.projectdir(), "src/baselib/BaseLib.lua")
local outputPath = path.join(os.projectdir(), "bin/" .. target:name() .. "/baselib")
os.mkdir(outputPath)
os.cp(baselibPath, outputPath)
local baselibPath = path.join(os.projectdir(), "src/baselib/BaseLib.lua")
local langPath = path.join(os.projectdir(), "src/lang")
local outputPath = path.join(os.projectdir(), "bin/" .. target:name())
local baselibOutputPath = path.join(outputPath, "baselib")
os.mkdir(baselibOutputPath)
os.cp(baselibPath, baselibOutputPath)
os.cp(langPath, outputPath)
end)

elseif is_config("backend", "quickjs") then
Expand All @@ -105,9 +108,12 @@ target("legacy-script-engine")
set_basename("legacy-script-engine-quickjs")
after_build(function(target)
local baselibPath = path.join(os.projectdir(), "src/baselib/BaseLib.js")
local outputPath = path.join(os.projectdir(), "bin/" .. target:name() .. "/baselib")
os.mkdir(outputPath)
os.cp(baselibPath, outputPath)
local langPath = path.join(os.projectdir(), "src/lang")
local outputPath = path.join(os.projectdir(), "bin/" .. target:name())
local baselibOutputPath = path.join(outputPath, "baselib")
os.mkdir(baselibOutputPath)
os.cp(baselibPath, baselibOutputPath)
os.cp(langPath, outputPath)
end)

elseif is_config("backend", "python") then
Expand All @@ -116,18 +122,23 @@ target("legacy-script-engine")
)
set_basename("legacy-script-engine-python")
after_build(function(target)
local baselibPath = path.join(os.projectdir(), "src/baselib/BaseLib.py")
local outputPath = path.join(os.projectdir(), "bin/" .. target:name() .. "/baselib")
os.mkdir(outputPath)
os.cp(baselibPath, outputPath)
local baselibPath = path.join(os.projectdir(), "src/baselib/BaseLib.py")
local langPath = path.join(os.projectdir(), "src/lang")
local outputPath = path.join(os.projectdir(), "bin/" .. target:name())
local baselibOutputPath = path.join(outputPath, "baselib")
os.mkdir(baselibOutputPath)
os.cp(baselibPath, baselibOutputPath)
os.cp(langPath, outputPath)
end)

elseif is_config("backend", "nodejs") then
add_defines(
"LEGACY_SCRIPT_ENGINE_BACKEND_NODEJS"
)
set_basename("legacy-script-engine-nodejs")

local langPath = path.join(os.projectdir(), "src/lang")
local outputPath = path.join(os.projectdir(), "bin/" .. target:name())
os.cp(langPath, outputPath)
end

add_files(
Expand All @@ -136,5 +147,4 @@ target("legacy-script-engine")
add_includedirs(
"src",
"src/legacy"
)

)

0 comments on commit 3bbf2d5

Please sign in to comment.