Skip to content

Commit

Permalink
add more developer docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Allie Crevier committed May 14, 2020
1 parent 409db11 commit eca632b
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ repository. Before committing, set the TOTP value in the cassette back to the va
7. Add a detached signature (with the release key) for the source tarball.
8. Submit the source tarball and signature via PR into this [repository](https://github.com/freedomofpress/securedrop-debian-packaging) along with the debian changelog addition. This tarball and changelog will be used by the package builder.


## Debugging

To use `pdb`, add these lines:
Expand All @@ -326,3 +327,48 @@ Then you can use [`pdb` commands](https://docs.python.org/3/library/pdb.html#deb

Logs can be found in the `{sdc-home}/logs`. If you are debugging a version of this application installed from a deb package in Qubes, you can debug issues by looking at the log file in `~/.securedrop_client/logs/client.log`. You can also add additional log lines in the running code in
`/opt/venvs/securedrop-client/lib/python3.7/site-packages/securedrop_client/`.


### Link against a debug version of PyQt5

Work in progress...

1. Build debug version of Qt 5

Clone the Qt repo and build it from source following these instructions: https://wiki.qt.io/Building_Qt_5_from_Git#Getting_the_source_code. This defaults to creating a 'debug' build and installs the binaries in the current directory, avoiding the need for `make install`.

2. Build debug version of PyQt5 pointing it to our debug version of Qt

- pip install sip==5.2.0
- Download PyQt5 source (make sure the version is compatible with the version of Qt you just compiled)
- Set LD_LIBRARY_PATH and QTPATH to the debug version of Qt
- python configure.py --qml-debug --debug
- make && make install

3. Install debug version of PyQt5 in the Client's virtual environment


### Find/report a Qt bug

1. Create a Qt account: https://login.qt.io/register
2. Find or report a bug here: https://bugreports.qt.io


## Using Qt Creator

1. Download the Qt installer from: https://www.qt.io/download (be sure to select the download for open source users)

2. Make the installer executable

```
chmod u+x qt-unified-linux-x64-3.2.2-online.run
```

3. Run the installer and select the which version of Qt you want installed

Run `apt-cache show python3-pyqt5` in `sd-app` to figure out which version of PyQt to install

5. Run Qt Creator

Make sure to select a Python 3.7 interpreter in the project's build & run settings.
>>>>>>> add more developer docs

0 comments on commit eca632b

Please sign in to comment.