Add rebuild-cli.sh script

This commit is contained in:
Micah Lee 2020-11-29 10:42:04 -08:00
parent 66e9feae51
commit 7bcfe6cad1
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
2 changed files with 15 additions and 10 deletions

View File

@ -53,16 +53,6 @@ python scripts\get-tor-windows.py
### Prepare the code
In order to work with the desktop app, you'll need to build a wheel of the CLI package first, and copy it into the `desktop` folder:
```sh
cd ../cli
poetry install
poetry build
cp dist/onionshare_cli-*.whl ../desktop
cd ../desktop
```
OnionShare uses [Briefcase](https://briefcase.readthedocs.io/en/latest/).
Install Briefcase dependencies by following [these instructions](https://docs.beeware.org/en/latest/tutorial/tutorial-0.html#install-dependencies).
@ -86,6 +76,12 @@ While your virtual environment is active, install briefcase from pip.
pip install briefcase
```
In order to work with the desktop app, you'll need to build a wheel of the CLI package first, and copy it into the `desktop` folder. You'll need to re-run this script each time you change the CLI code.
```sh
./scripts/rebuild-cli.sh
```
Run OnionShare from the source tree like this:
```

9
desktop/scripts/rebuild-cli.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
# Build the CLI python wheel and copy it to the desktop folder
SCRIPTS_DIR="$( cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )"
cd $SCRIPTS_DIR
cd ../../cli
poetry build
cp dist/*.whl ../desktop