aboutsummaryrefslogtreecommitdiff
path: root/desktop/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/README.md')
-rw-r--r--desktop/README.md106
1 files changed, 27 insertions, 79 deletions
diff --git a/desktop/README.md b/desktop/README.md
index 7f13ad70..1578f956 100644
--- a/desktop/README.md
+++ b/desktop/README.md
@@ -9,135 +9,83 @@ git clone https://github.com/onionshare/onionshare.git
cd onionshare/desktop
```
+Make sure you have Python 3 installed. If you're using Windows or macOS, install version 3.9.9 [from python.org](https://www.python.org/downloads/release/python-399/). For Windows, make sure to install the 32-bit (x86) version, and to check the box to add python to the path on the first page of the installer.
+
+Make sure you have [poetry installed](https://python-poetry.org/docs/#installation), and then install the dependencies:
+
+```sh
+poetry install
+```
+
### Install platform-specific dependencies
#### Linux
In Ubuntu 20.04 you need the `libxcb-xinerama0` package installed.
-Install python dependencies:
-
-```sh
-pip3 install --user poetry requests
-```
-
Download Tor Browser and extract the binaries:
```sh
-./scripts/get-tor-linux.py
+poetry run ./scripts/get-tor-linux.py
```
#### macOS
-Download and install Python 3.8.6 from https://www.python.org/downloads/release/python-386/. I downloaded `python-3.8.6-macosx10.9.pkg`. (You may need to also run `/Applications/Python\ 3.8/Install\ Certificates.command`.)
-
-Install python dependencies:
-
-```sh
-pip3 install --user poetry requests
-```
-
Download Tor Browser and extract the binaries:
```sh
-./scripts/get-tor-osx.py
+poetry run ./scripts/get-tor-osx.py
```
#### Windows
These instructions include adding folders to the path in Windows. To do this, go to Start and type "advanced system settings", and open "View advanced system settings" in the Control Panel. Click Environment Variables. Under "System variables" double-click on Path. From there you can add and remove folders that are available in the PATH.
-Download Python 3.8.6, 32-bit (x86) from https://www.python.org/downloads/release/python-386/. I downloaded `python-3.8.6.exe`. When installing it, make sure to check the "Add Python 3.8 to PATH" checkbox on the first page of the installer.
-
-Download and install 7-Zip from http://www.7-zip.org/download.html. I downloaded `7z1900.exe`. Add `C:\Program Files (x86)\7-Zip` to your path.
-
-Install python dependencies:
-
-```
-pip install poetry requests
-```
+Download and install 7-Zip from https://7-zip.org/download.html. I downloaded `7z1900.exe`. Add `C:\Program Files (x86)\7-Zip` to your path.
Download Tor Browser and extract the binaries:
-```
-python scripts\get-tor-windows.py
+```sh
+poetry run python scripts\get-tor-windows.py
```
### Compile dependencies
-Install Go. The simplest way to make sure everything works is to install Go by following [these instructions](https://golang.org/doc/install). (In Windows, make sure to install the 32-bit version of Go, such as `go1.17.3.windows-386.msi`.)
+Install Go. The simplest way to make sure everything works is to install Go by following [these instructions](https://golang.org/doc/install). (In Windows, make sure to install the 32-bit version of Go, such as `go1.17.5.windows-386.msi`.)
Download and compile `meek-client`:
-```
-./scripts/build-meek-client.py
-```
-
-### Prepare the virtual environment
-
-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).
-
-Now create and/or activate a virtual environment.
-
-* Linux and macOS
- ```
- python3 -m venv venv
- . venv/bin/activate
- ```
-* Windows
- ```
- python -m venv venv
- venv\Scripts\activate.bat
- ```
-
-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
-python scripts/rebuild-cli.py
+./scripts/build-meek-client.py
```
### Running OnionShare from the source code tree
-Inside the virtual environment, run OnionShare like this to install all of the dependencies:
+To run OnionShare from the source tree:
-```
-briefcase dev -d
+```sh
+poetry run onionshare
+poetry run onionshare --help
+poetry run onionshare -v
+poetry run onionshare -v --local-only
```
-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`:
+You can also run `onionshare-cli` from the source tree, and it will look for Tor binaries in `desktop/onionshare/resources/tor`.
-```
-./scripts/dev.sh --help
-./scripts/dev.sh -v
-./scripts/dev.sh -v --local-only
+```sh
+poetry run onionshare-cli --help
```
-Windows uses `scripts\dev.bat` instead.
-
## Running tests
-Install these packages inside your virtual environment:
-
-```sh
-pip install pytest pytest-briefcase pytest-faulthandler pytest-qt
-```
-
-Then run the tests:
+Run the tests:
```sh
-./tests/run.sh
+poetry run ./tests/run.sh
```
If you want to run tests while hiding the GUI, you must have the `xvfb` package installed, and then:
```sh
-xvfb-run ./tests/run.sh
+xvfb-run poetry run ./tests/run.sh
```