proton-bridge/BUILDS.md

75 lines
3.0 KiB
Markdown
Raw Permalink Normal View History

2022-10-17 15:19:10 +00:00
# Building Proton Mail Bridge
## 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
* 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)
* 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.
To enable the sending of crash reports using Sentry please set the
`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.
## Build
2022-10-17 15:19:10 +00:00
In order to build Bridge app with Qt interface we are using
[Qt 6.4.3](https://doc.qt.io/qt-6/gettingstarted.html).
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
```bash
export MSYSTEM=
```
### Build Bridge
* in project root run
```bash
make build
```
* The result will be stored in `./cmd/Destop-Bridge/deploy/${GOOS}/`
* 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
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
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
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
* `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