Skip to content

Commit 83e5b95

Browse files
author
Robert Masen
committed
split build paths for luaJIT installs
1 parent 999aa98 commit 83e5b95

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

main.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ async function installSystemDependencies() {
181181
}
182182

183183
async function addCMakeBuildScripts(sourcePath, luaVersion) {
184+
if (luaVersion.indexOf("jit") > -1) {
185+
return;
186+
}
184187
debug("addCMakeBuildScripts %s, %s", sourcePath, luaVersion)
185188
fs.unlinkSync(path.join(sourcePath, "src", "luaconf.h"))
186189
debug("removed luaconf.h")
@@ -195,7 +198,20 @@ async function addCMakeBuildScripts(sourcePath, luaVersion) {
195198

196199
async function buildAndInstall(sourcePath, platform) {
197200
debug("buildAndInstall %s, %s", sourcePath, platform)
201+
if (/jit/i.test(sourcePath)) {
202+
buildAndInstallLuaJIT(sourcePath, platform)
203+
} else {
204+
return buildAndInstallLua5(sourcePath, platform)
205+
}
206+
}
207+
208+
async function buildAndInstallLuaJIT(sourcePath, platform) {
209+
await exec.exec("make", undefined, { cwd: sourcePath })
210+
await exec.exec("make install", undefined, { cwd: sourcePath })
211+
}
198212

213+
async function buildAndInstallLua5(sourcePath, platform) {
214+
debug("buildAndInstallLua5 %s, %s", sourcePath, platform)
199215
if(platform){
200216
await exec.exec(`cmake -H"${sourcePath}" -Bbuild -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -A${platform}`, undefined, {
201217
cwd: sourcePath

0 commit comments

Comments
 (0)