1
0
mirror of https://github.com/PurpleI2P/i2pd_docs_en synced 2025-01-26 06:25:27 +00:00
i2pd_docs_en/docs/devs/building/qt-desktop-gui.md

132 lines
3.6 KiB
Markdown
Raw Normal View History

2023-04-05 15:38:15 +08:00
# Qt Desktop GUI app build instructions
2018-04-04 22:35:15 +08:00
2022-08-28 16:52:00 +08:00
## Build Requirements
2023-04-02 19:11:13 +08:00
Qt 5
2022-08-28 16:52:00 +08:00
2018-04-04 22:35:15 +08:00
## Under Windows
### Without Qt Creator
2018-04-22 19:49:27 +08:00
All commands should be run under MSYS2 mingw32.
2018-04-22 19:44:26 +08:00
2023-04-05 15:38:15 +08:00
(obsolete instructions, please do a PR if you have working instrucitons)
```bash
2018-04-22 20:33:57 +08:00
pacman -S git make tar mingw-w64-i686-gcc mingw-w64-i686-boost mingw-w64-i686-libpng mingw-w64-i686-openssl mingw-w64-i686-zlib
pacman -S mingw-w64-i686-qt5-static
pacman -S openssl-devel mingw-w64-i686-miniupnpc
2018-04-22 19:54:41 +08:00
mkdir -p /c/dev/
cd /c/dev/
git clone https://github.com/PurpleI2P/i2pd.git
cd i2pd
git checkout openssl
2018-04-22 20:24:37 +08:00
export MINGW='mingw32'
2018-04-22 20:32:12 +08:00
export PATH=/$MINGW/bin:/usr/bin:/mingw32/qt5-static/bin
2018-04-22 20:24:37 +08:00
cd qt/i2pd_qt
qmake
make USE_UPNP=yes
2018-04-22 19:44:26 +08:00
```
2018-04-05 07:17:48 +08:00
2018-04-22 20:24:37 +08:00
#### Caveats
It is important to restrict PATH as described above. If you have Strawberry Perl and/or Mercurial installed, it will pick up gcc & openssl from the wrong places.
2018-04-24 01:48:35 +08:00
If you are an Arch Linux user, refrain from updating system with `pacman -Syu`. Always update runtime separately as described on the home page, otherwise you might end up with DLLs incompatibility problems.
2018-04-04 22:35:15 +08:00
2023-04-02 19:11:13 +08:00
## Under Debian/Ubuntu
2018-04-04 22:35:15 +08:00
### With Qt Creator
2023-04-02 19:11:13 +08:00
```bash
# Debian
sudo apt-get install build-essential g++ make libcrypto++-dev libssl-dev \
libboost-all-dev libminiupnpc-dev libwebsocketpp-dev libqt5gui5 \
libqt5widgets5 git zlib1g-dev qt5-qmake qtbase5-dev
# Ubuntu
2022-08-28 16:52:00 +08:00
sudo apt install qtcreator qt5-default build-essential g++ make libcrypto++-dev \
libssl-dev libboost-all-dev libminiupnpc-dev libwebsocketpp-dev libqt5gui5 git \
zlib1g-dev
2023-04-02 19:11:13 +08:00
2019-08-27 17:27:11 +08:00
mkdir git
cd git
2022-08-28 16:52:00 +08:00
git clone --recursive https://github.com/PurpleI2P/i2pd-qt.git
2019-08-27 17:27:11 +08:00
```
2022-08-28 16:52:00 +08:00
Then, open Qt Creator; open `git/i2pd-qt/i2pd_qt.pro`; set build make parameter
2019-08-27 17:27:11 +08:00
`-jNUMBER-OF-CPU-CORES`, e.g. `-j7`. Then, finally, press Make button.
2018-04-04 22:35:15 +08:00
### Without Qt Creator
2023-04-05 15:38:15 +08:00
```bash
2023-04-02 19:11:13 +08:00
# Debian
sudo apt-get install build-essential g++ make libcrypto++-dev libssl-dev \
libboost-all-dev libminiupnpc-dev libwebsocketpp-dev libqt5gui5 \
libqt5widgets5 git zlib1g-dev qt5-qmake qtbase5-dev
# Ubuntu
2022-08-28 16:52:00 +08:00
sudo apt-get install build-essential g++ make libcrypto++-dev libssl-dev \
libboost-all-dev libminiupnpc-dev libwebsocketpp-dev qt5-default \
libqt5gui5 git zlib1g-dev
2023-04-02 19:11:13 +08:00
2018-04-08 08:21:00 +08:00
mkdir git
cd git
2022-08-28 16:52:00 +08:00
git clone --recursive https://github.com/PurpleI2P/i2pd-qt.git
2021-04-04 18:08:34 +08:00
cd i2pd-qt
2018-04-08 08:21:00 +08:00
```
2018-10-31 11:45:58 -04:00
2021-04-04 18:08:34 +08:00
For release build,
`qmake`
For debug build,
`qmake i2pd_qt.pro "CONFIG += debug"`
And when `qmake` completed, run:
`make USE_UPNP=yes`
2022-04-04 11:02:00 +03:00
## Under Kali
### Without Qt Creator
2023-04-05 15:38:15 +08:00
```bash
2022-08-28 16:52:00 +08:00
sudo apt-get install build-essential g++ make libcrypto++-dev libssl-dev \
libboost-all-dev libminiupnpc-dev libwebsocketpp-dev qtbase5-dev \
libqt5gui5 git zlib1g-dev
2022-04-04 11:02:00 +03:00
mkdir git
cd git
2022-08-28 16:52:00 +08:00
git clone --recursive https://github.com/PurpleI2P/i2pd-qt.git
2022-04-04 11:02:00 +03:00
cd i2pd-qt
```
For release build,
`qmake`
For debug build,
`qmake i2pd_qt.pro "CONFIG += debug"`
And when `qmake` completed, run:
`make USE_UPNP=yes`
2018-10-31 11:45:58 -04:00
## Building a Flatpak package
2023-04-05 15:38:15 +08:00
```bash
2018-10-31 11:45:58 -04:00
sudo apt install flatpak flatpak-builder
2019-09-22 16:17:12 +08:00
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak --user install flathub org.kde.Sdk/x86_64/5.14 # required SDK version might be higher, check the manifest at https://github.com/flathub/website.i2pd.i2pd/blob/master/website.i2pd.i2pd.json
2018-10-31 11:45:58 -04:00
git clone https://github.com/flathub/website.i2pd.i2pd && cd website.i2pd.i2pd
export FLATPAK_BUILDER_N_JOBS=4 # build process jobs count
2018-10-31 11:45:58 -04:00
flatpak-builder --user --install --force-clean i2pd_build_dir website.i2pd.i2pd.json
```
2022-08-28 16:52:00 +08:00
## More details
For more details on build procedures, see the GitHub actions at https://github.com/PurpleI2P/i2pd-qt/tree/master/.github/workflows .