From 358ae641f3dd420617d3094d948028b76559b8ff Mon Sep 17 00:00:00 2001 From: leso-kn Date: Fri, 27 Oct 2023 19:16:15 +0200 Subject: [PATCH] Fix C module loading on windows --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 12a56026..81b52dc4 100644 --- a/main.js +++ b/main.js @@ -172,13 +172,13 @@ async function install_plain_lua_windows(luaExtractPath, luaInstallPath, luaVers } }) - objs["lua"] = [ ...objs["lua"], ...objs["lib"] ] - objs["luac"] = [ ...objs["luac"], ...objs["lib"] ] - let luaXYZ = luaVersion.split(".") let libFile = "lua" + luaXYZ[0] + luaXYZ[1] + ".lib" let dllFile = "lua" + luaXYZ[0] + luaXYZ[1] + ".dll" + objs["lua"] = [ ...objs["lua"], libFile ] + objs["luac"] = [ ...objs["luac"], ...objs["lib"] ] + await msvc_link(luaExtractPath, "link /nologo /DLL", dllFile, objs["lib"]); await msvc_link(luaExtractPath, "link /nologo", "luac.exe", objs["luac"]); await msvc_link(luaExtractPath, "link /nologo", "lua.exe", objs["lua"]); @@ -186,7 +186,7 @@ async function install_plain_lua_windows(luaExtractPath, luaInstallPath, luaVers const luaHpp = (await exists(pathJoin(src, "lua.hpp"))) ? "lua.hpp" : "../etc/lua.hpp" const headers = [ "lua.h", "luaconf.h", "lualib.h", "lauxlib.h", luaHpp ] - await install_files(pathJoin(luaInstallPath, "bin"), luaExtractPath, [ "lua.exe", "luac.exe" ]) + await install_files(pathJoin(luaInstallPath, "bin"), luaExtractPath, [ "lua.exe", "luac.exe", dllFile ]) await install_files(pathJoin(luaInstallPath, "lib"), luaExtractPath, [ dllFile, libFile ]) await install_files(pathJoin(luaInstallPath, "include"), src, headers) }