@@ -91,18 +91,36 @@ target("legacy-script-engine")
9191 " LEGACY_SCRIPT_ENGINE_BACKEND_LUA"
9292 )
9393 set_basename (" legacy-script-engine-lua" )
94+ after_build (function (target )
95+ local baselibPath = path.join (os.projectdir (), " src/baselib/BaseLib.lua" )
96+ local outputPath = path.join (os.projectdir (), " bin/" .. target :name () .. " /baselib" )
97+ os .mkdir (outputPath )
98+ os .cp (baselibPath , outputPath )
99+ end )
94100
95101 elseif is_config (" backend" , " quickjs" ) then
96102 add_defines (
97103 " LEGACY_SCRIPT_ENGINE_BACKEND_QUICKJS"
98104 )
99105 set_basename (" legacy-script-engine-quickjs" )
106+ after_build (function (target )
107+ local baselibPath = path.join (os.projectdir (), " src/baselib/BaseLib.js" )
108+ local outputPath = path.join (os.projectdir (), " bin/" .. target :name () .. " /baselib" )
109+ os .mkdir (outputPath )
110+ os .cp (baselibPath , outputPath )
111+ end )
100112
101113 elseif is_config (" backend" , " python" ) then
102114 add_defines (
103115 " LEGACY_SCRIPT_ENGINE_BACKEND_PYTHON"
104116 )
105117 set_basename (" legacy-script-engine-python" )
118+ after_build (function (target )
119+ local baselibPath = path.join (os.projectdir (), " src/baselib/BaseLib.py" )
120+ local outputPath = path.join (os.projectdir (), " bin/" .. target :name () .. " /baselib" )
121+ os .mkdir (outputPath )
122+ os .cp (baselibPath , outputPath )
123+ end )
106124
107125 elseif is_config (" backend" , " nodejs" ) then
108126 add_defines (
0 commit comments