mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-05-07 21:00:46 +00:00
exclude libraries in linuxdeploy
flutter already brings some libraries and when building the AppImage with linuxdeploy, it bundles some libraries again. Duplicate libraries leads to bigger AppImage size.
This commit is contained in:
parent
2d52c1c10b
commit
52e0875670
1 changed files with 9 additions and 2 deletions
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
|
|
@ -295,7 +295,13 @@ jobs:
|
|||
# Copy built files
|
||||
cp -r build/linux/x64/release/bundle/* AppDir/usr/bin/
|
||||
cp -rL linux/packaging/icons/* AppDir/usr/share/icons
|
||||
# Create desktop file in AppDir root
|
||||
# Scan AppDir/usr/bin/lib for existing libraries to exclude them from linuxdeploy packaging
|
||||
EXCLUDE_LIBS=$(find AppDir/usr/bin/lib -type f -name "*.so*" -exec basename {} \; | sort -u)
|
||||
# Add --exclude-library flag to each found library
|
||||
for lib in $EXCLUDE_LIBS; do
|
||||
EXCLUDE_ARGS+=" --exclude-library $lib"
|
||||
done
|
||||
# Copy desktop file to AppDir root
|
||||
cp linux/mangayomi.desktop AppDir/mangayomi.desktop
|
||||
# Create AppRun file
|
||||
cat <<EOF > AppDir/AppRun
|
||||
|
|
@ -303,7 +309,7 @@ jobs:
|
|||
SELF=\$(readlink -f "\$0")
|
||||
HERE=\${SELF%/*}
|
||||
export PATH="\${HERE}/usr/bin/:\${PATH}"
|
||||
export LD_LIBRARY_PATH="\${HERE}/usr/lib/:\${HERE}/usr/bin/lib/:\${LD_LIBRARY_PATH}"
|
||||
export LD_LIBRARY_PATH="\${HERE}/usr/bin/lib/:\${HERE}/usr/lib/:\${LD_LIBRARY_PATH}"
|
||||
exec "\${HERE}/usr/bin/mangayomi" "\$@"
|
||||
EOF
|
||||
chmod +x AppDir/AppRun
|
||||
|
|
@ -313,6 +319,7 @@ jobs:
|
|||
--desktop-file AppDir/mangayomi.desktop \
|
||||
--icon-file AppDir/usr/share/icons/hicolor/512x512/apps/mangayomi.png \
|
||||
--executable AppDir/usr/bin/mangayomi \
|
||||
$EXCLUDE_ARGS \
|
||||
--output appimage
|
||||
mv $(find . -type f -name "*.AppImage") build/linux/x64/release/Mangayomi-${{ github.ref_name }}-linux.AppImage
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue