onionshare/desktop/README.md

86 lines
2.3 KiB
Markdown
Raw Normal View History

# OnionShare Desktop
## Building OnionShare
2020-10-15 01:36:31 -04:00
Start by getting the source code and changing to the `desktop` folder:
```sh
git clone https://github.com/onionshare/onionshare.git
2020-10-15 01:36:31 -04:00
cd onionshare/desktop
```
Make sure you have Python 3 installed. If you're using Windows or macOS, install version 3.10.1 [from python.org](https://www.python.org/downloads/release/python-3101/). 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.
Download Tor Browser and extract the binaries:
```sh
poetry run ./scripts/get-tor-linux.py
```
#### macOS
Download Tor Browser and extract the binaries:
```sh
poetry run ./scripts/get-tor-osx.py
```
#### Windows
2020-10-15 01:36:31 -04:00
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.
2021-08-22 16:18:52 -04:00
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.
2020-10-15 01:36:31 -04:00
Download Tor Browser and extract the binaries:
2020-10-15 01:36:31 -04:00
```sh
poetry run python scripts\get-tor-windows.py
```
### Compile dependencies
2021-11-07 15:12:12 -05:00
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`.)
Download and compile `meek-client`:
2020-11-29 13:42:04 -05:00
```sh
./scripts/build-meek-client.py
2020-11-29 13:42:04 -05:00
```
### Running OnionShare from the source code tree
To run OnionShare from the source tree:
```sh
poetry run onionshare
poetry run onionshare --help
poetry run onionshare -v
poetry run onionshare -v --local-only
```
## Running tests
Run the tests:
```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 poetry run ./tests/run.sh
```