Setup build environment
We use a modern set of tools like CMake and Qt6 to create ScreenPlay. The setup is mostly automated. To get an overview of ScreenPlays architecture, see Project Architecture
- Download and install the tools for your platform first:
- How to ⬇️ clone ScreenPlay and dependencies
- How to ⚙️ compile ScreenPlay
Windows
- Download and install:
- Microsoft Visual Studio Community 2022 Download
- Make sure you have the component
Desktop development with C++
installed
- Make sure you have the component
- Python 3.11+ and select
Add to Path
during the installation. Download - Optional if you do not have tools like
git
orcmake
installed, we recommendChocolatey
:- Chocolatey via Powershell (Administrator) Download
- Run
choco.exe install git vscode cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
Linux
Install dependencies for Debian/Ubuntu:
sudo apt install cmake libwayland-dev wayland-protocols curl wget zip unzip tar git pkg-config libxcb-* libfontconfig-dev apt-transport-https ca-certificates gnupg software-properties-common python3 python3-pip build-essential libgl1-mesa-dev mesa-common-dev lld ninja-build libxkbcommon-* libx11-dev xserver-xorg-dev xorg-dev -y
Git setup
Enable git credential save, so you do not have to enter your password every time.
git config --global credential.helper cache
MacOS
- Install XCode 14+ , open and restart your device.
- Install brew 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
Clone ScreenPlay
git clone https://gitlab.com/kelteseth/ScreenPlay.git ScreenPlay/ScreenPlay
Downloading dependencies
Downloading dependencies is 100% automated. Simply run the setup.py
script from the Tools
folder:
🐧 Linux
# For Ubuntu 22.04 and newer we need to create an virutal env
sudo apt install python3.11-venv -y
# Run this command in the ScreenPlay source root folder:
python3 -m venv env
source env/bin/activate
cd Tools
python3 -m pip install -r requirements.txt
python3 setup.py
🪟 Windows and 🍏 macOS
cd Tools
python3 -m pip install -r requirements.txt
python setup.py
Install external dependencies for Wayland support before compiling
cd ThirdParty
git clone https://invent.kde.org/frameworks/extra-cmake-modules.git
cd extra-cmake-modules
cmake configure .
make
sudo make install
# back to ScreenPlay/ThirdParty
cd ..
git clone https://invent.kde.org/plasma/layer-shell-qt.git
cd layer-shell-qt
cmake configure . -DCMAKE_PREFIX_PATH="./../../../aqt/6.5.2/gcc_64"
make
sudo make install
Compile
Now you can either use VSCode or QtCreator:
Option 1 VSCode
- Open VSCode
- Install the recommended extentions:
- Press:
CTRL
+SHIFT
+P
for every command:CMake: Select Configure Preset
. Select one of the listed presets likeMSVC SP Qt 6.5.0 Debug
- Press
F7
to Compile andF5
to run!
Option 2 QtCreator
- Open QtCreator at:
- Windows:
..\aqt\Tools\QtCreator\bin\qtcreator.exe
- Linux:
../aqt/Tools/QtCreator/bin/qtcreator
- MacOS:
../aqt/Qt Creator
- Windows:
- Select the imported temporary kit like
MSVC SP Qt 6.5.0 Debug
- Press
CTRL
+R
to compile and run!
Developer docs
We use qdoc to generate documentation.
qdoc.exe configWindows.qdocconf
If you have installed Qt in a different directory, change the path to your Qt location.
Some useful links:
Last update:
August 25, 2023 10:55:05