Skip to content

Commit b155121

Browse files
committed
fixxx
1 parent d886308 commit b155121

File tree

4 files changed

+14
-43
lines changed

4 files changed

+14
-43
lines changed

.github/workflows/build-lua.yml

Lines changed: 11 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,68 +7,39 @@ on:
77

88
jobs:
99
build-lua:
10-
name: Build Lua in Steam Runtime
10+
name: Get Steam Runtime Compatible Lua
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Build in Steam Runtime container
13+
- name: Download in Steam Runtime container
1414
uses: addnab/docker-run-action@v3
1515
with:
1616
image: registry.gitlab.steamos.cloud/steamrt/scout/sdk
1717
options: -v ${{ github.workspace }}:/work
1818
run: |
19-
# start
2019
set -ex
2120
apt-get update
22-
apt-get install -y curl build-essential
21+
apt-get install -y curl
2322
2423
WORKDIR="/tmp/lua-build"
2524
mkdir -p "$WORKDIR"
2625
cd "$WORKDIR"
2726
28-
# Download with proper error checking
29-
curl -fsSL "https://www.lua.org/ftp/lua-5.4.7.tar.gz" --output lua.tar.gz
27+
# Download pre-built library
28+
curl -L "https://master.dl.sourceforge.net/project/luabinaries/5.4.2/Linux%20Libraries/lua-5.4.2_Linux313_64_lib.tar.gz?viasf=1" -o lua.tar.gz
3029
31-
# Verify download
32-
if [ ! -s lua.tar.gz ]; then
33-
echo "Download failed or file is empty"
34-
exit 1
35-
fi
36-
37-
# Extract with verification
30+
# Extract
3831
tar xf lua.tar.gz
39-
if [ ! -d "lua-5.4.7" ]; then
40-
echo "Extraction failed"
41-
exit 1
42-
fi
43-
44-
cd "lua-5.4.7"
45-
46-
# Download and apply patch
47-
curl -fsSL "https://gist.githubusercontent.com/ZeWaka/5d8a24ded388763bfd2e5213093eac95/raw/63d7664347bbdd59389a8af6eeeb5531335af35c/liblua.so.patch" -o lua-shared-lib.patch
48-
patch -p1 < lua-shared-lib.patch
49-
50-
# Build with patched Makefile and PIC
51-
make linux MYCFLAGS="-fPIC"
5232
53-
cd src
54-
55-
# Test the library
56-
nm -D liblua.so | grep ' T ' || echo "No exported symbols found!"
57-
ldd liblua.so || echo "Library dependencies not found!"
58-
59-
# Copy and rename
33+
# Copy library
6034
mkdir -p /work/artifacts
61-
cp liblua.so /work/artifacts/liblua5.4.so
35+
cp liblua54.so /work/artifacts/
6236
63-
# Verify copy
64-
if [ ! -f /work/artifacts/liblua5.4.so ]; then
65-
echo "Failed to copy library"
66-
exit 1
67-
fi
37+
# Test the library
38+
ldd /work/artifacts/liblua54.so || echo "Library dependencies not found!"
6839
6940
- name: Upload Lua library
7041
uses: actions/upload-artifact@v4
7142
with:
7243
name: steamrt-lua
73-
path: artifacts/liblua5.4.so
44+
path: artifacts/liblua54.so
7445
if-no-files-found: error

scripts/constants.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ local function get_lib_info()
1111
elseif app.os.macos then
1212
return "lua54", "libdmi.dylib"
1313
else -- Linux
14-
return "lua5.4", "libdmi.so"
14+
return "lua54", "libdmi.so"
1515
end
1616
end
1717

scripts/main.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ function loadlib(plugin_path)
232232
LUA_LIB = "liblua54.dylib"
233233
else
234234
package.cpath = package.cpath .. ";?.so"
235-
LUA_LIB = "liblua5.4.so"
235+
LUA_LIB = "liblua54.so"
236236
end
237237
end
238238

tools/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
os.remove(zip_path)
8888
elif CI and sys.platform.startswith('linux'):
8989
# For CI Linux builds, Lua library should already be in dist/unzipped
90-
lua_library = f"{library_prefix}lua5.4{library_extension}"
90+
lua_library = f"{library_prefix}lua54{library_extension}"
9191

9292
# Check to-copy directory
9393
to_copy_path = os.path.join(working_dir, "to-copy")

0 commit comments

Comments
 (0)