From 2ad44c2f2eab60f58eb09433d6c81d96b812fad4 Mon Sep 17 00:00:00 2001 From: dustin Date: Fri, 15 Sep 2023 11:39:25 -0400 Subject: [PATCH] APPIMAGE: better test for choosing native or appimage libc (#824) --- misc/appimage/appimage-manual_creation.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/misc/appimage/appimage-manual_creation.sh b/misc/appimage/appimage-manual_creation.sh index cce3cf361..82be59b97 100755 --- a/misc/appimage/appimage-manual_creation.sh +++ b/misc/appimage/appimage-manual_creation.sh @@ -28,8 +28,10 @@ Categories=Game; Keywords=quake;first;person;shooter;multiplayer;' TESTPROGRAM=' +#include "curl/curl.h" int main(){ - return 0; + curl_easy_init(); + return 0; } ' @@ -63,13 +65,10 @@ mkdir -p "$DIR/AppDir/usr/bin" || exit 1 mkdir -p "$DIR/AppDir/usr/lib" || exit 1 mkdir -p "$DIR/AppDir/usr/lib-override" || exit 1 -echo "$TESTPROGRAM" > "$DIR/test.c" || exit 2 -gcc "$DIR/test.c" -o "$DIR/AppDir/usr/bin/test" ||exit 2 -rm -f "$DIR/AppDir/test.c" || exit 2 - VERSION=$(sed -n 's/.*VERSION_NUMBER.*"\(.*\)".*/\1/p' src/version.h) REVISION=$(git log -n 1|head -1|awk '{print $2}'|cut -c1-6) +#build ezquake if [ $SKIP_DEPS -eq 0 ];then chmod +x ./build-linux.sh && \ nice ./build-linux.sh || exit 3 @@ -77,6 +76,11 @@ else make -j$(nproc) fi +#build test program +echo "$TESTPROGRAM" > "$DIR/test.c" || exit 2 +gcc "$DIR/test.c" -o "$DIR/AppDir/usr/bin/test" -lcurl || exit 2 +rm -f "$DIR/AppDir/test.c" || exit 2 + cp -f ezquake-linux-$ARCH "$DIR/AppDir/usr/bin/." || exit 4 rm -f "$DIR/AppDir/AppRun" echo "$QUAKE_SCRIPT" > "$DIR/AppDir/AppRun" || exit 4