mirror of
https://github.com/onionshare/onionshare.git
synced 2025-04-22 16:29:12 -04:00
Try adding more paths to LD_LIBRARY_PATH
This commit is contained in:
parent
46e225ef32
commit
56394de326
@ -47,20 +47,30 @@ parts:
|
||||
plugin: nil
|
||||
override-build: |
|
||||
mkdir -p $SNAPCRAFT_PART_INSTALL/bin
|
||||
|
||||
cat > $SNAPCRAFT_PART_INSTALL/bin/launcher-setup << EOF
|
||||
#!/bin/sh
|
||||
export PATH=\$SNAP/bin:\$SNAP/usr/bin:\$SNAP/usr/local/bin:\$PATH
|
||||
export PYTHONPATH=\$SNAP/lib/python3.8/site-packages:\$SNAP/usr/lib/python3/dist-packages
|
||||
ORIG_IFS=\$IFS
|
||||
LD_BASE=\$(for D in \$LD_LIBRARY_PATH; do echo \$D; done | grep \$SNAP/usr/lib/)
|
||||
IFS=\$ORIGIN_IFS
|
||||
export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$SNAP/usr/local/lib:\$LD_BASE/qt5/plugins/imageformats:\$LD_BASE/qt5/plugins/platforms:\$LD_BASE/qt5/plugins/wayland-shell-integration
|
||||
EOF
|
||||
|
||||
cat > $SNAPCRAFT_PART_INSTALL/bin/onionshare-launcher << EOF
|
||||
#!/bin/sh
|
||||
export PATH=\$SNAP/bin:\$SNAP/usr/bin:\$SNAP/usr/local/bin:\$PATH
|
||||
export PYTHONPATH=\$SNAP/lib/python3.8/site-packages
|
||||
export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$SNAP/usr/local/lib
|
||||
launcher-setup
|
||||
onionshare \$@
|
||||
EOF
|
||||
|
||||
cat > $SNAPCRAFT_PART_INSTALL/bin/onionshare-cli-launcher << EOF
|
||||
#!/bin/sh
|
||||
export PATH=\$SNAP/bin:\$SNAP/usr/bin:\$SNAP/usr/local/bin:\$PATH
|
||||
export PYTHONPATH=\$SNAP/lib/python3.8/site-packages
|
||||
export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$SNAP/usr/local/lib
|
||||
launcher-setup
|
||||
onionshare-cli \$@
|
||||
EOF
|
||||
|
||||
chmod 755 $SNAPCRAFT_PART_INSTALL/bin/launcher-setup
|
||||
chmod 755 $SNAPCRAFT_PART_INSTALL/bin/onionshare-launcher
|
||||
chmod 755 $SNAPCRAFT_PART_INSTALL/bin/onionshare-cli-launcher
|
||||
onionshare:
|
||||
|
Loading…
x
Reference in New Issue
Block a user