1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-15 06:52:34 +02:00
ScreenPlay/Docs/DeveloperSetup.md

137 lines
5.4 KiB
Markdown
Raw Normal View History

2020-05-16 14:07:02 +02:00
# Developer Setup
1. Install latest [git + git-lfs](https://git-scm.com/)
2021-05-16 13:09:32 +02:00
2. Install [python 3](https://www.python.org/)
3. Clone ScreenPlay
``` bash
git clone --recursive https://gitlab.com/kelteseth/ScreenPlay.git ScreenPlay
```
4. Download the latest __Qt 6.3.x__ for you platform. Earlier versions are not supported!
2021-02-26 11:22:11 +01:00
1. [Install instructions Windows](#windows)
1. [Install instructions Linux](#linux)
1. [Install instructions MacOSX](#macosx)
2021-05-16 13:09:32 +02:00
5. Start the following script to download all needed dependencies automatically. This will create a ScreenPlay-vcpkg folder in the same directory as your ScreenPlay source folder.
``` bash
2021-02-26 11:16:27 +01:00
cd Tools
2021-05-16 13:09:32 +02:00
py setup.py
```
* This will install these dependencies via __vcpkg__
2021-11-11 18:24:10 +01:00
* openSSL
2020-09-18 12:22:42 +02:00
* sentry-native
2021-02-26 11:16:27 +01:00
* doctest
2021-05-16 13:09:32 +02:00
* infoware
2021-02-26 11:32:28 +01:00
<div>
<img width="100%" height="auto" src="../.gitlab/media/QtCreator_kit.png">
</div>
2021-02-26 11:33:59 +01:00
5. Open __QtCreator__ and open the settings `Tools -> Options`
6. Clone an existing kit like `Qt 6.3.1 MSVC2019 64bit` and add `ScreenPlay` to the new kit name
2021-02-26 11:32:28 +01:00
5. Edit CMake variables amd add CMAKE_TOOLCHAIN_FILE and VCPKG_TARGET_TRIPLET
2021-02-26 11:33:59 +01:00
* `Kits -> <Your_Kit> -> CMake Configuration`
2021-02-26 11:16:27 +01:00
Append this:
``` bash
-DCMAKE_TOOLCHAIN_FILE:STRING=%{CurrentProject:Path}/../ScreenPlay-vcpkg/scripts/buildsystems/vcpkg.cmake
2021-02-26 11:16:27 +01:00
# Only _one_ of these lines that match your OS:
-DVCPKG_TARGET_TRIPLET:STRING=x64-windows
-DVCPKG_TARGET_TRIPLET:STRING=x64-linux
-DVCPKG_TARGET_TRIPLET:STRING=x64-osx
-DVCPKG_TARGET_TRIPLET:STRING=arm64-osx
2021-02-26 11:16:27 +01:00
```
2021-02-26 11:32:28 +01:00
6. Save and close the settings.
7. Open Project via `File -> Open File or Project` and select your `CMakeLists.txt`. Then select __our created kit__, press `Configure Project`
2021-02-26 11:16:27 +01:00
<div>
2021-02-26 11:18:45 +01:00
<img height="auto" src="../.gitlab/media/QtCreator_kit_select.png">
2021-02-26 11:16:27 +01:00
</div>
2021-02-26 11:32:28 +01:00
8. Press build (the big green play button on the bottom left). This will compile and start ScreenPlay and copy all necessary files into your Qt installation.
2021-02-26 11:16:27 +01:00
## Windows
2021-02-26 11:40:03 +01:00
1. It is recommended (but not necessary) to use an easy git UI like [gitextensions](https://gitextensions.github.io/).
2020-10-02 10:49:05 +02:00
1. [Download and install the most recent MSVC 2019 Community](https://visualstudio.microsoft.com/vs/community/)
- Select "Desktop development with C++"
1. [Download and install Qt binary installer from qt.io](https://www.qt.io/download-qt-installer)
- Install the Maintaince tool
- Select the following features to install:
- Qt 6.3.1
2020-10-02 10:49:05 +02:00
- MSVC 2019 64-bit
2021-11-11 18:24:10 +01:00
- **ALL Additional Libraries**
2021-09-10 12:46:30 +02:00
- Qt Quick 3d
- Qt 5 Compatibility Module
- Qt Shader Tools
- Developer and Designer Tools
- Cmake
- Ninja
## Linux via qt.io account
1. Install dependencies for your distro:
``` bash
# Debian/Ubuntu
sudo apt install build-essential git gpg ffmpeg mesa-common-dev libxkbcommon-* libfontconfig curl zip unzip tar git pkg-config apt-transport-https ca-certificates gnupg software-properties-common wget software-properties-common python3-pip libgl1-mesa-dev lld ninja-build cmake qml-module-qt-websockets qtwebengine5-* -y
```
1. [Download and install Qt binary installer from qt.io](https://www.qt.io/download-qt-installer)
- Install the Maintaince tool
- Select the following features to install:
- Qt 6.3.1
- GCC
2021-11-11 18:24:10 +01:00
- **ALL Additional Libraries**
2021-09-10 12:46:30 +02:00
- Qt Quick 3d
- Qt 5 Compatibility Module
- Qt Shader Tools
2021-02-26 11:16:27 +01:00
- Developer and Designer Tools
- OpenSSL 1.1.1.c Toolkit
- OpenSSL 64-bit binaries
- Cmake
- Ninja
## Linux via aqt command line & VSCode
1. Alternativly download via aqt
```
pip3 install -U pip
pip3 install aqtinstall
aqt install-qt -O ~/aqt linux desktop 6.3.1 gcc_64 -m all
```
1. Open VSCode and install the `CMake Tools`
1. ctrl + p: `CMake: Select Configure Preset`
2. Select `ScreenPlay 64bit Debug Linux`
3. ctrl + p: `CMake: Configure`
4. ctrl + p: `CMake: Build`
### Fix python scripts not in path:
```
vim ~/.bashrc
```
Add at the end of the file and restart the console/terminal:
```
export PATH="~/.local/bin:$PATH"
```
2021-02-26 11:16:27 +01:00
## MacOSX
2022-08-26 15:45:49 +02:00
1. Install XCode 13+ , open and restart your device.
1. Install [brew](https://brew.sh) that is needed by some third party vcpkg packages. Do not forget to add brew to your path as outlined at the on of the installation!
- `brew install pkg-config git llvm cmake ninja`
1. [Download and install Qt binary installer from qt.io](https://www.qt.io/download-qt-installer)
- Install the Maintaince tool
- Select the following features to install:
- Qt 6.3.1
- Qt WebEngine
2021-11-11 18:24:10 +01:00
- **ALL Additional Libraries**
2021-09-10 12:46:30 +02:00
- Qt Quick 3d
- Qt 5 Compatibility Module
- Qt Shader Tools
- Developer and Designer Tools
- OpenSSL 1.1.1.c Toolkit
- OpenSSL 64-bit binaries
- Cmake
- Ninja
1. Change your default kit:
- `QtCreator -> Options -> Kits -> Select your default kit (Desktop Qt 6.3.1) -> Change c and c++ Compiler to Apple Clang (x86_64)`
# Developer docs
We use qdoc to generate documentation. Qt6 is the minimum version qdoc, because of vastly improved c++ parsing support.
* qdoc.exe configWindows.qdocconf
If you have installed Qt in a different directory, change the path to your Qt location.
Some useful links:
* [Introduction to QDoc](https://doc.qt.io/qt-5/01-qdoc-manual.html)
2021-02-26 11:22:11 +01:00
* [Writing qdoc comments](https://doc.qt.io/qt-5/qdoc-guide-writing.html)