mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-23 05:01:24 -05:00
Update desktop readme, and add a helper script to use CLI args
This commit is contained in:
parent
343834e7af
commit
c904bb5b5f
@ -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:
|
||||
|
9
desktop/scripts/dev.sh
Executable file
9
desktop/scripts/dev.sh
Executable file
@ -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()" $@
|
@ -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
|
Loading…
Reference in New Issue
Block a user