From 0a38323f61ec89ce4a2a62613ec932ae85eb5511 Mon Sep 17 00:00:00 2001 From: jangko Date: Mon, 4 Dec 2023 20:21:08 +0700 Subject: [PATCH] Fix lua build script --- .github/workflows/ci.yml | 2 +- nimLUA.nimble | 4 +++- scripts/build.nims | 2 +- scripts/build_static_lib.nims | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a67c8ec..c9ba03d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -228,7 +228,7 @@ jobs: mkdir -p "$EXTPATH" curl -L https://www.lua.org/ftp/lua-5.3.5.tar.gz -o "$EXTPATH/lua_source.tar.gz" tar xfz "$EXTPATH/lua_source.tar.gz" -C "$EXTPATH" - mv "$EXTPATH/lua-5.3.5" "$EXTPATH/lua" + mv "$EXTPATH/lua-5.3.5" lua cd nimLUA nim e scripts/build_static_lib.nims cd .. diff --git a/nimLUA.nimble b/nimLUA.nimble index c1d6207..55e7f80 100644 --- a/nimLUA.nimble +++ b/nimLUA.nimble @@ -28,9 +28,11 @@ proc test(env, path: string) = if not dirExists "build": mkDir "build" - exec "nim " & lang & " " & env & + let cmd = "nim " & lang & " " & env & " --outdir:build -r --hints:off --warnings:off " & " -d:lua_static_lib --passL:\"-Lexternal -llua " & libm & " \" " & path + echo cmd + exec cmd task test, "Run all tests": test "-d:nimDebugDlOpen", "tests/test_features" diff --git a/scripts/build.nims b/scripts/build.nims index ea5d7de..fca5e66 100644 --- a/scripts/build.nims +++ b/scripts/build.nims @@ -44,7 +44,7 @@ proc toString(names: seq[string]): string = result.add c result.add " " -let src = getCFiles("external" / "lua" / "src") +let src = getCFiles("lua" / "src") var objs: seq[string] = @[] for x in src: diff --git a/scripts/build_static_lib.nims b/scripts/build_static_lib.nims index 28928d1..9f05438 100644 --- a/scripts/build_static_lib.nims +++ b/scripts/build_static_lib.nims @@ -23,7 +23,7 @@ proc toString(names: seq[string]): string = result.add " " proc objList(): string = - let src = getCFiles("external" / "lua" / "src") + let src = getCFiles("lua" / "src") var objs: seq[string] = @[] for x in src: