Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Remove bundled C++ runtime from Auth AppImage

Neeraj Guptada4d42fe33d9
diff --git a/mobile/apps/auth/changes/linux-appimage-cxx-runtime.md b/mobile/apps/auth/changes/linux-appimage-cxx-runtime.md
new file mode 100644
index 0000000000..32b818433f
--- /dev/null
+++ b/mobile/apps/auth/changes/linux-appimage-cxx-runtime.md
@@ -0,0 +1 @@
+- Fixed Auth AppImage startup on Linux systems where bundled C++ runtime libraries could conflict with host graphics drivers.
diff --git a/mobile/apps/auth/linux/packaging/post_process_appimage.sh b/mobile/apps/auth/linux/packaging/post_process_appimage.sh
index 30aff80950..e510ae5e34 100755
--- a/mobile/apps/auth/linux/packaging/post_process_appimage.sh
+++ b/mobile/apps/auth/linux/packaging/post_process_appimage.sh
@@ -34,6 +34,20 @@ chmod +x "$workdir/input.AppImage"
appdir="$workdir/squashfs-root"
if [[ -d "$appdir/usr/lib" ]]; then
+ runtime_libs="$(
+ find "$appdir/usr/lib" \( -type f -o -type l \) \( \
+ -name 'libstdc++.so*' -o \
+ -name 'libgcc_s.so*' \
+ \) -print
+ )"
+ if [[ -n "$runtime_libs" ]]; then
+ echo "Removing bundled C++ runtime libraries from the AppImage:"
+ echo "$runtime_libs"
+ printf '%s\n' "$runtime_libs" | while IFS= read -r runtime_lib; do
+ rm -f "$runtime_lib"
+ done
+ fi
+
blocked_libs="$(
find "$appdir/usr/lib" \( -type f -o -type l \) \( \
-name 'libGL.so*' -o \