@@ -92,10 +92,13 @@ target("legacy-script-engine")
9292 )
9393 set_basename (" legacy-script-engine-lua" )
9494 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 )
95+ local baselibPath = path.join (os.projectdir (), " src/baselib/BaseLib.lua" )
96+ local langPath = path.join (os.projectdir (), " src/lang" )
97+ local outputPath = path.join (os.projectdir (), " bin/" .. target :name ())
98+ local baselibOutputPath = path.join (outputPath , " baselib" )
99+ os .mkdir (baselibOutputPath )
100+ os .cp (baselibPath , baselibOutputPath )
101+ os .cp (langPath , outputPath )
99102 end )
100103
101104 elseif is_config (" backend" , " quickjs" ) then
@@ -105,9 +108,12 @@ target("legacy-script-engine")
105108 set_basename (" legacy-script-engine-quickjs" )
106109 after_build (function (target )
107110 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+ local langPath = path.join (os.projectdir (), " src/lang" )
112+ local outputPath = path.join (os.projectdir (), " bin/" .. target :name ())
113+ local baselibOutputPath = path.join (outputPath , " baselib" )
114+ os .mkdir (baselibOutputPath )
115+ os .cp (baselibPath , baselibOutputPath )
116+ os .cp (langPath , outputPath )
111117 end )
112118
113119 elseif is_config (" backend" , " python" ) then
@@ -116,18 +122,23 @@ target("legacy-script-engine")
116122 )
117123 set_basename (" legacy-script-engine-python" )
118124 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 )
125+ local baselibPath = path.join (os.projectdir (), " src/baselib/BaseLib.py" )
126+ local langPath = path.join (os.projectdir (), " src/lang" )
127+ local outputPath = path.join (os.projectdir (), " bin/" .. target :name ())
128+ local baselibOutputPath = path.join (outputPath , " baselib" )
129+ os .mkdir (baselibOutputPath )
130+ os .cp (baselibPath , baselibOutputPath )
131+ os .cp (langPath , outputPath )
123132 end )
124133
125134 elseif is_config (" backend" , " nodejs" ) then
126135 add_defines (
127136 " LEGACY_SCRIPT_ENGINE_BACKEND_NODEJS"
128137 )
129138 set_basename (" legacy-script-engine-nodejs" )
130-
139+ local langPath = path.join (os.projectdir (), " src/lang" )
140+ local outputPath = path.join (os.projectdir (), " bin/" .. target :name ())
141+ os .cp (langPath , outputPath )
131142 end
132143
133144 add_files (
@@ -136,5 +147,4 @@ target("legacy-script-engine")
136147 add_includedirs (
137148 " src" ,
138149 " src/legacy"
139- )
140-
150+ )
0 commit comments