export luau.dll
This commit is contained in:
parent
4303389c5d
commit
ac0ad04e7a
|
@ -747,6 +747,10 @@ if has_plugin("lua_script") then
|
|||
project "lua_script"
|
||||
libType()
|
||||
|
||||
if force_build_luau and not force_build_luau_dynamic then
|
||||
defines { "LUMIX_STATIC_LUAU" }
|
||||
end
|
||||
|
||||
files { "../src/lua_script/**.h", "../src/lua_script/**.cpp" }
|
||||
includedirs { "../src", "../src/lua_script" }
|
||||
defines { "BUILDING_LUA_SCRIPT" }
|
||||
|
|
|
@ -323,6 +323,25 @@ struct StudioLuaPlugin : StudioApp::GUIPlugin {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool exportData(const char* dest_dir) override
|
||||
{
|
||||
#ifndef LUMIX_STATIC_LUAU
|
||||
char exe_path[MAX_PATH];
|
||||
os::getExecutablePath(Span(exe_path));
|
||||
char exe_dir[MAX_PATH];
|
||||
|
||||
copyString(Span(exe_dir), Path::getDir(exe_path));
|
||||
StaticString<MAX_PATH> tmp(exe_dir, "Luau.dll");
|
||||
if (!os::fileExists(tmp)) return false;
|
||||
StaticString<MAX_PATH> dest(dest_dir, "Luau.dll");
|
||||
if (!os::copyFile(tmp, dest))
|
||||
{
|
||||
logError("Failed to copy ", tmp, " to ", dest);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
void onGUI() override {
|
||||
lua_State* L = m_app.getEngine().getState();
|
||||
|
|
|
@ -948,7 +948,7 @@ struct PipelineImpl final : Pipeline
|
|||
if (errors)
|
||||
{
|
||||
logError(m_resource->getPath(), ": ", lua_tostring(m_lua_state, -1));
|
||||
lua_pop(m_lua_state, 1);
|
||||
lua_pop(m_lua_state, 2);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue