linuxdeploy-plugin-qt icon indicating copy to clipboard operation
linuxdeploy-plugin-qt copied to clipboard

Is there a way to exclude libraries

Open hhnaidi opened this issue 3 years ago • 3 comments

I have a custom Qt installation that contains the debug version of Qt libraries, I didn't find any way to exclude them.

linuxdeploy has an exclude-library option but qt plugin hasn't this option.

Do you have any way to do that?

hhnaidi avatar May 19 '22 12:05 hhnaidi

Not yet. We'd need to provide an environment variable that supplements the CLI option, and implement it both here and in linuxdeploy. PRs highly welcome!

TheAssassin avatar May 19 '22 12:05 TheAssassin

Suggested workaround is to call linuxdeploy twice, and remove the offending files once the qt plugin has performed its pass, and then exclude-libraries in the main linuxdeploy app on the second pass.

This approach can also be used to add application-specific data files into usr/share.

S.

# Create build-dir tree (don't create app image)
linuxdeploy --desktop-file APP.desktop --icon-file APP.png --appdir build-dir --executable APP --plugin qt

# Remove unwanted libnss files
/bin/rm -f build-dir/usr/lib/libnss*

# Copy application-specific data files from src/share to build-dir/usr/share/APP
mkdir -p build-dir/usr/share/APP
cp -R "src/share/*" "build-dir/usr/share/APP"

# Now create the output image
linuxdeploy --appdir build-dir --exclude-library "*libnss*" --output APP

trumpton avatar Jun 13 '22 19:06 trumpton

FTR PR to fix this https://github.com/linuxdeploy/linuxdeploy/pull/283

dantti avatar Jun 19 '24 12:06 dantti