diff options
author | Micah Lee <micah@micahflee.com> | 2020-11-29 11:23:23 -0800 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2020-11-29 11:23:23 -0800 |
commit | c904bb5b5f538f7b34d982ae45e6e1fd84cc3671 (patch) | |
tree | ad3e9d4d9b61f8bd7aa044d7df4ad7150d7d4431 | |
parent | 343834e7af9606a413958b4be32ea0e1bb612944 (diff) | |
download | onionshare-c904bb5b5f538f7b34d982ae45e6e1fd84cc3671.tar.gz onionshare-c904bb5b5f538f7b34d982ae45e6e1fd84cc3671.zip |
Update desktop readme, and add a helper script to use CLI args
-rw-r--r-- | desktop/README.md | 14 | ||||
-rwxr-xr-x | desktop/scripts/dev.sh | 9 | ||||
-rwxr-xr-x | desktop/scripts/rebuild-cli.sh | 1 |
3 files changed, 22 insertions, 2 deletions
diff --git a/desktop/README.md b/desktop/README.md index 053bf4ea..5e1c11ea 100644 --- a/desktop/README.md +++ b/desktop/README.md @@ -51,7 +51,7 @@ Download Tor Browser and extract the binaries: python scripts\get-tor-windows.py ``` -### Prepare the code +### Prepare the virtual environment OnionShare uses [Briefcase](https://briefcase.readthedocs.io/en/latest/). @@ -82,12 +82,22 @@ In order to work with the desktop app, you'll need to build a wheel of the CLI p ./scripts/rebuild-cli.sh ``` -Run OnionShare from the source tree like this: +### Running OnionShare from the source code tree + +Inside the virtual environment, run OnionShare like this to install all of the dependencies: ``` briefcase dev -d ``` +Once you have the dependencies installed, you can run it using the `dev.sh` script, which lets you use command line arguments, such as to `--verbose` or `--local-only`: + +``` +./scripts/dev.sh --help +./scripts/dev.sh -v +./scripts/dev.sh -v --local-only +``` + ## Running tests Install these packages inside your virtual environment: diff --git a/desktop/scripts/dev.sh b/desktop/scripts/dev.sh new file mode 100755 index 00000000..6ce5e796 --- /dev/null +++ b/desktop/scripts/dev.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Run OnionShare desktop, allowing you to use command-line arguments + +SCRIPTS_DIR="$( cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )" +cd $SCRIPTS_DIR + +cd ../src +python -c "import onionshare; onionshare.main()" $@
\ No newline at end of file diff --git a/desktop/scripts/rebuild-cli.sh b/desktop/scripts/rebuild-cli.sh index f8191955..9d6a1338 100755 --- a/desktop/scripts/rebuild-cli.sh +++ b/desktop/scripts/rebuild-cli.sh @@ -5,5 +5,6 @@ SCRIPTS_DIR="$( cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )" cd $SCRIPTS_DIR cd ../../cli +poetry install poetry build cp dist/*.whl ../desktop
\ No newline at end of file |