mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-19 21:02:41 +00:00
Improve Linux lib packaging
Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com>
This commit is contained in:
parent
2b60bda5b7
commit
d27e901421
17
.github/workflows/release.yaml
vendored
17
.github/workflows/release.yaml
vendored
@ -68,21 +68,32 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
zip_add() {
|
||||||
|
zip -uj eqemu-server-linux-x64.zip "$1"
|
||||||
|
}
|
||||||
|
|
||||||
# Add all executable files (excluding tests)
|
# Add all executable files (excluding tests)
|
||||||
ZIP_CMD="zip -uj eqemu-server-linux-x64.zip"
|
|
||||||
for f in *; do
|
for f in *; do
|
||||||
if [ -f "$f" ] && [ -x "$f" ] && [ "$f" != "tests" ]; then
|
if [ -f "$f" ] && [ -x "$f" ] && [ "$f" != "tests" ]; then
|
||||||
$ZIP_CMD "$f"
|
zip_add "$f"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Add shared libraries needed for runtime (from build/bin and build/libs)
|
# 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
|
if [ -d ../libs ]; then
|
||||||
lib_count="$(find ../libs -type f \( -name "*.so" -o -name "*.so.[0-9]*" \) | wc -l)"
|
lib_count="$(find ../libs -type f \( -name "*.so" -o -name "*.so.[0-9]*" \) | wc -l)"
|
||||||
if [ "$lib_count" -gt 0 ]; then
|
if [ "$lib_count" -gt 0 ]; then
|
||||||
find ../libs -type f \( -name "*.so" -o -name "*.so.[0-9]*" \) -print0 | \
|
find ../libs -type f \( -name "*.so" -o -name "*.so.[0-9]*" \) -print0 | \
|
||||||
while IFS= read -r -d '' lib; do
|
while IFS= read -r -d '' lib; do
|
||||||
$ZIP_CMD "$lib"
|
zip_add "$lib"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "No shared libraries found in build/libs"
|
echo "No shared libraries found in build/libs"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user