From d27e9014216f4eca78a73781e5de46d2f380e697 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 25 Jan 2026 00:33:16 +0000 Subject: [PATCH] Improve Linux lib packaging Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com> --- .github/workflows/release.yaml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bea86a9c4..4f348dd69 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -68,21 +68,32 @@ jobs: exit 1 fi + zip_add() { + zip -uj eqemu-server-linux-x64.zip "$1" + } + # Add all executable files (excluding tests) - ZIP_CMD="zip -uj eqemu-server-linux-x64.zip" for f in *; do if [ -f "$f" ] && [ -x "$f" ] && [ "$f" != "tests" ]; then - $ZIP_CMD "$f" + zip_add "$f" fi done # Add shared libraries needed for runtime (from build/bin and build/libs) + bin_lib_count="$(find . -maxdepth 1 -type f \( -name "*.so" -o -name "*.so.[0-9]*" \) | wc -l)" + if [ "$bin_lib_count" -gt 0 ]; then + find . -maxdepth 1 -type f \( -name "*.so" -o -name "*.so.[0-9]*" \) -print0 | \ + while IFS= read -r -d '' lib; do + zip_add "$lib" + done + fi + if [ -d ../libs ]; then lib_count="$(find ../libs -type f \( -name "*.so" -o -name "*.so.[0-9]*" \) | wc -l)" if [ "$lib_count" -gt 0 ]; then find ../libs -type f \( -name "*.so" -o -name "*.so.[0-9]*" \) -print0 | \ while IFS= read -r -d '' lib; do - $ZIP_CMD "$lib" + zip_add "$lib" done else echo "No shared libraries found in build/libs"