Skip to content

Commit

Permalink
CI/AppImage: Don't bundle libssl/libcrypto
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed May 12, 2024
1 parent 318fd0b commit a2abcc9
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions scripts/appimage/make-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ BINARY=duckstation-qt
APPDIRNAME=DuckStation.AppDir
STRIP=strip

declare -a EXCLUDE_LIBS=(
'libcrypto.so*'
'libssl.so*'
)

declare -a MANUAL_LIBS=(
"libshaderc_shared.so"
)
Expand Down Expand Up @@ -95,7 +100,7 @@ OUTDIR=$(realpath "./$APPDIRNAME")
rm -fr "$OUTDIR"

echo "Locating extra libraries..."
EXTRA_LIBS_ARGS=""
declare -a EXTRA_LIBS_ARGS=()
for lib in "${MANUAL_LIBS[@]}"; do
srcpath=$(find "$DEPSDIR" -name "$lib")
if [ ! -f "$srcpath" ]; then
Expand All @@ -105,11 +110,12 @@ for lib in "${MANUAL_LIBS[@]}"; do

echo "Found $lib at $srcpath."

if [ "$EXTRA_LIBS_ARGS" == "" ]; then
EXTRA_LIBS_ARGS="--library=$srcpath"
else
EXTRA_LIBS_ARGS="$EXTRA_LIBS_ARGS,$srcpath"
fi
EXTRA_LIBS_ARGS+=("--library=$srcpath")
done

declare -a EXCLUDE_LIBS_ARGS=()
for lib in "${EXCLUDE_LIBS[@]}"; do
EXCLUDE_LIBS_ARGS+=("--exclude-library=$lib")
done

# Why the nastyness? linuxdeploy strips our main binary, and there's no option to turn it off.
Expand All @@ -134,7 +140,8 @@ EXTRA_PLATFORM_PLUGINS="libqwayland-egl.so;libqwayland-generic.so" \
DEPLOY_PLATFORM_THEMES="1" \
QMAKE="$DEPSDIR/bin/qmake" \
NO_STRIP="1" \
$LINUXDEPLOY --plugin qt --appdir="$OUTDIR" --executable="$BUILDDIR/bin/duckstation-qt" $EXTRA_LIBS_ARGS \
$LINUXDEPLOY --plugin qt --appdir="$OUTDIR" --executable="$BUILDDIR/bin/duckstation-qt" \
"${EXTRA_LIBS_ARGS[@]}" "${EXCLUDE_LIBS_ARGS[@]}" \
--desktop-file="$ROOTDIR/scripts/org.duckstation.DuckStation.desktop" \
--icon-file="$ROOTDIR/scripts/org.duckstation.DuckStation.png" \

Expand Down

0 comments on commit a2abcc9

Please sign in to comment.