2022-10-17 15:19:10 +00:00
|
|
|
# Building Proton Mail Bridge
|
2020-04-08 10:59:16 +00:00
|
|
|
|
|
|
|
## Prerequisites
|
2022-10-17 15:19:10 +00:00
|
|
|
* 64-bit OS:
|
2022-03-23 12:17:13 +00:00
|
|
|
- the go-rfc5322 module cannot currently be compiled for 32-bit OSes
|
2024-01-23 14:13:23 +00:00
|
|
|
* Go 1.21.6
|
2020-04-15 17:14:18 +00:00
|
|
|
* Bash with basic build utils: make, gcc, sed, find, grep, ...
|
2023-01-24 08:20:27 +00:00
|
|
|
- For Windows, it is recommended to use MinGW 64bit shell from [MSYS2](https://www.msys2.org/)
|
2023-04-24 15:05:07 +00:00
|
|
|
* GCC (Linux), msvc (Windows) or Xcode (macOS)
|
|
|
|
* Windres (Windows)
|
|
|
|
* libglvnd and libsecret development files (Linux)
|
|
|
|
* pkg-config (Linux)
|
2023-08-07 07:12:37 +00:00
|
|
|
* cmake, ninja-build and Qt 6.4.3 are required to build the graphical user interface. On Linux,
|
2023-04-24 15:05:07 +00:00
|
|
|
the Mesa OpenGL development files are also needed.
|
2020-04-08 10:59:16 +00:00
|
|
|
|
|
|
|
To enable the sending of crash reports using Sentry please set the
|
2023-02-13 19:31:32 +00:00
|
|
|
`DSN_SENTRY` environment variable with the client key of your sentry project before build.
|
2020-04-15 17:14:18 +00:00
|
|
|
Otherwise, the sending of crash reports will be disabled.
|
2020-04-08 10:59:16 +00:00
|
|
|
|
|
|
|
## Build
|
2022-10-17 15:19:10 +00:00
|
|
|
In order to build Bridge app with Qt interface we are using
|
2023-08-07 07:12:37 +00:00
|
|
|
[Qt 6.4.3](https://doc.qt.io/qt-6/gettingstarted.html).
|
2020-11-09 11:23:33 +00:00
|
|
|
|
2022-10-17 15:19:10 +00:00
|
|
|
Please note that qmake path must be in your `PATH` to ensure Qt to be found.
|
|
|
|
Also, before you start build **on Windows**, please unset the `MSYSTEM` variable
|
2020-04-08 10:59:16 +00:00
|
|
|
|
|
|
|
```bash
|
|
|
|
export MSYSTEM=
|
|
|
|
```
|
|
|
|
|
2020-05-27 13:58:50 +00:00
|
|
|
### Build Bridge
|
2020-04-08 10:59:16 +00:00
|
|
|
* in project root run
|
|
|
|
|
|
|
|
```bash
|
|
|
|
make build
|
|
|
|
```
|
|
|
|
|
|
|
|
* The result will be stored in `./cmd/Destop-Bridge/deploy/${GOOS}/`
|
2020-05-27 13:58:50 +00:00
|
|
|
* for `linux`, the binary will have the name of the project directory (e.g `proton-bridge`)
|
|
|
|
* for `windows`, the binary will have the file extension `.exe` (e.g `proton-bridge.exe`)
|
|
|
|
* for `darwin`, the application will be created with name of the project directory (e.g `proton-bridge.app`)
|
|
|
|
|
2020-12-10 09:02:22 +00:00
|
|
|
#### Build Bridge without GUI
|
2020-12-11 11:36:21 +00:00
|
|
|
* If you need to build bridge without Qt dependencies, you can do so by running
|
2020-12-10 09:02:22 +00:00
|
|
|
|
|
|
|
```bash
|
|
|
|
make build-nogui
|
|
|
|
```
|
|
|
|
|
2023-01-24 08:20:27 +00:00
|
|
|
* To launch Bridge without GUI, you can invoke the `bridge` executable with one the following command-line switches:
|
|
|
|
* `--noninteractive` or `-n` to start Bridge without any interface (i.e., there is no way to add or remove client, get bridge password, etc.)
|
|
|
|
* `--cli` or `-c` to start Bridge with an interactive terminal interface.
|
|
|
|
* NOTE: You still need to set up a supported keychain on your system.
|
2020-12-10 09:02:22 +00:00
|
|
|
|
2022-10-17 15:19:10 +00:00
|
|
|
## Launchers
|
2020-11-23 10:56:57 +00:00
|
|
|
Launchers are only included in official distributions and provide the public
|
|
|
|
key used to verify signed app binaries, allowing the automatic update feature.
|
|
|
|
See README for more information.
|
|
|
|
|
2022-10-17 15:19:10 +00:00
|
|
|
## Tags
|
2020-10-22 08:22:00 +00:00
|
|
|
Note that repository contains both Bridge and Import-Export apps and they are
|
|
|
|
not released together. Therefore, each app has own tag prefix. Bridge tags
|
2020-10-22 08:26:35 +00:00
|
|
|
starts with `br-` and Import-Export tags starts with `ie-`. Both tags continue
|
2020-10-22 08:22:00 +00:00
|
|
|
with semantic versioning `MAJOR.MINOR.PATCH`. An example of full tag is
|
|
|
|
`br-1.4.4` or `ie-1.1.2` (current versions in October 2020).
|
2020-04-15 17:14:18 +00:00
|
|
|
|
|
|
|
## Useful tests, lints and checks
|
|
|
|
In order to be able to run following commands please install the development dependencies:
|
|
|
|
`make install-dev-dependencies`
|
|
|
|
|
|
|
|
* `make test` will run all unit tests
|
|
|
|
* `make lint` will lint the whole project
|
2020-04-15 17:55:48 +00:00
|
|
|
* `make -C ./test test` will run the integration tests
|
2020-04-15 17:14:18 +00:00
|
|
|
* `make run` will build Bridge without a GUI and start it in CLI mode
|