mirror of
https://github.com/onionshare/onionshare.git
synced 2025-09-23 22:14:54 -04:00
Create launcher scripts for snapcraft, to set PATH, PYTHONPATH, and LD_LIBRARY_PATH
This commit is contained in:
parent
defc7a8cbe
commit
2b4f2644ad
1 changed files with 23 additions and 2 deletions
|
@ -19,7 +19,7 @@ architectures:
|
||||||
apps:
|
apps:
|
||||||
onionshare:
|
onionshare:
|
||||||
common-id: org.onionshare.OnionShare
|
common-id: org.onionshare.OnionShare
|
||||||
command: bin/onionshare
|
command: bin/onionshare-launcher
|
||||||
extensions: [gnome-3-38]
|
extensions: [gnome-3-38]
|
||||||
plugs:
|
plugs:
|
||||||
- desktop
|
- desktop
|
||||||
|
@ -32,7 +32,7 @@ apps:
|
||||||
|
|
||||||
cli:
|
cli:
|
||||||
common-id: org.onionshare.OnionShareCli
|
common-id: org.onionshare.OnionShareCli
|
||||||
command: bin/onionshare-cli
|
command: bin/onionshare-cli-launcher
|
||||||
plugs:
|
plugs:
|
||||||
- home
|
- home
|
||||||
- network
|
- network
|
||||||
|
@ -42,6 +42,27 @@ apps:
|
||||||
LANG: C.UTF-8
|
LANG: C.UTF-8
|
||||||
|
|
||||||
parts:
|
parts:
|
||||||
|
# Launcher scripts, in order to set PYTHONPATH
|
||||||
|
launcher:
|
||||||
|
plugin: nil
|
||||||
|
override-build: |
|
||||||
|
mkdir -p $SNAPCRAFT_PART_INSTALL/bin
|
||||||
|
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
|
||||||
|
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
|
||||||
|
onionshare-cli \$@
|
||||||
|
EOF
|
||||||
|
chmod 755 $SNAPCRAFT_PART_INSTALL/bin/onionshare-launcher
|
||||||
|
chmod 755 $SNAPCRAFT_PART_INSTALL/bin/onionshare-cli-launcher
|
||||||
onionshare:
|
onionshare:
|
||||||
source: ./desktop
|
source: ./desktop
|
||||||
plugin: python
|
plugin: python
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue