Skip to content

Commit

Permalink
Don't include GTK libs
Browse files Browse the repository at this point in the history
  • Loading branch information
rbreu committed May 1, 2024
1 parent 435ce78 commit 4a4cdd2
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 6 deletions.
12 changes: 8 additions & 4 deletions tools/find_linux_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,23 +101,27 @@ def iter_lsofoutput(output):
data = json.loads(f.read())
known_libs = data['libs']
packages = set(data['packages'])
excludes = set(data['excludes'])
else:
logger.info(f'No file {args.jsonfile}; starting from scratch')
known_libs = []
packages = set()
excludes = set()


for lib in iter_lsofoutput(output):
links = what_links_to(lib)
if len(links) == 1:
if len(links) == 0:
pass
elif len(links) == 1:
lib = links[0]
else:
logger.warning(f'Double check: {lib} {links}')
lib = links[0]
if lib in known_libs:
logger.debug(f'Found known lib: {lib}')
else:
logger.debug(f'Found unknown lib: {lib}')
logger.debug(f'Found new lib: {lib}')
libs.append(lib)


Expand Down Expand Up @@ -155,11 +159,11 @@ def iter_lsofoutput(output):
line = strip_minor_versions(line)
exclude_masterlist.add(line)

excludes = []

for ex in exclude_masterlist:
for lib in (libs + known_libs):
if lib.endswith(ex):
excludes.append(ex)
excludes.add(ex)
continue


Expand Down
11 changes: 9 additions & 2 deletions tools/linux_libs.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,21 @@
"libX11-xcb.so.1",
"libX11.so.6",
"libc.so.6",
"libcanberra-gtk-module.so",
"libcanberra-gtk3.so.0",
"libcom_err.so.2",
"libdl.so.2",
"libexpat.so.1",
"libfontconfig.so.1",
"libfreetype.so.6",
"libfribidi.so.0",
"libgcc_s.so.1",
"libgdk-3.so.0",
"libgdk_pixbuf-2.0.so.0",
"libgio-2.0.so.0",
"libgpg-error.so.0",
"libgvfscommon.so",
"libgvfsdbus.so",
"libharfbuzz.so.0",
"libm.so.6",
"libpthread.so.0",
Expand All @@ -233,6 +240,6 @@
"libthai.so.0",
"libutil.so.1",
"libxcb.so.1",
"libz.so.1"
]
"libz.so.1",
],
}
20 changes: 20 additions & 0 deletions tools/linux_libs_notes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Appimage : Explanations for including/excluding libraries
=========================================================


GTK/Gnome
---------

By default, in a Gnome session BeeRef pulls a couple of gtk/gdg libs. When opening a native Gnome/GTK file dialog, more gtk/gdl libs are loaded from the system, which might be incompatable.

https://github.com/rbreu/beeref/discussions/103

Current workaround: Exclude the following libs::

"libgvfsdbus.so"
"libcanberra-gtk-module.so"
"libgvfscommon.so"
"libcanberra-gtk3.so.0"
"libgdk-3.so.0"
"libgdk_pixbuf-2.0.so.0"
"libgio-2.0.so.0"

0 comments on commit 4a4cdd2

Please sign in to comment.