1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-03 00:59:47 +02:00
ScreenPlay/Docs/DeveloperSetup.md
Elias Steurer 8c856c1ddc Fix links
2021-02-26 10:22:11 +00:00

4.2 KiB

Developer Setup

  1. Install latest git + git-lfs
  2. Clone ScreenPlay
git clone --recursive https://gitlab.com/kelteseth/ScreenPlay.git ScreenPlay
  1. Download the latest Qt 5.15.x for you platform. Earlier versions are not supported!
    1. Install instructions Windows
    2. Install instructions Linux
    3. Install instructions MacOSX
  2. Start install-dependencies.bat to download dependencies. This will create a ScreenPlay-vcpkg folder in the same directory as your ScreenPlay source folder.
#Windows
cd Tools
.\install_dependencies_windows.bat

#Linux and MacOSX
cd Tools
chmod +x install_dependencies_linux_mac.sh
.\install_dependencies_linux_mac.sh
  • This will install these dependencies via vcpkg
    • openSSL 1.1.1d
    • sentry-native
    • doctest
  1. Open the CMakeLists.txt via QtCreator. This can take some time until QtCreator parses all files!

  2. Add CMake variables

    • Add CMAKE_TOOLCHAIN_FILE and VCPKG_TARGET_TRIPLET
      • Extras -> Tools -> Kits -> <Your Kit> -> CMake Configuration

Append this:

CMAKE_TOOLCHAIN_FILE:STRING=%{CurrentProject:Path}/../ScreenPlay-vcpkg/vcpkg/scripts/buildsystems/vcpkg.cmake
# Only _one_ of these lines that match your OS:
VCPKG_TARGET_TRIPLET:STRING=x64-windows
VCPKG_TARGET_TRIPLET:STRING=x64-linux
VCPKG_TARGET_TRIPLET:STRING=x64-osx
  1. Save and close the settings.
  2. Open Project via File -> Open File or Project and select your CMakeLists.txt. Then select our created kit, press Configure Project
9. 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.

Windows

  1. Download and install the most recent MSVC 2019 Community
    • Select "Desktop development with C++"
  2. Download and install Qt 5 binary installer from qt.io
    • Install the Maintaince tool
    • Select the following features to install:
      • Qt 5.15.1
        • MSVC 2019 64-bit
        • Qt WebEngine
      • Developer and Designer Tools
        • Cmake
        • Ninja

Linux

  1. Install dependencies for your distro:
# Debian/Ubuntu
sudo apt install build-essential libgl1-mesa-dev lld ninja-build cmake

# Fedora/RHEL/CentOS (yum)
sudo yum groupinstall "C Development Tools and Libraries"
sudo yum install mesa-libGL-devel

# openSUSE (zypper)
sudo zypper install -t pattern devel_basis
  1. Download and install Qt 5 binary installer from qt.io
    • Install the Maintaince tool
    • Select the following features to install:
      • Qt 5.15.2
        • GCC
        • Qt WebEngine
      • Developer and Designer Tools
        • OpenSSL 1.1.1.c Toolkit
          • OpenSSL 64-bit binaries
        • Cmake
        • Ninja

MacOSX

  1. Download and install Qt 5 binary installer from qt.io
    • Install the Maintaince tool
    • Select the following features to install:
      • Qt 5.15.2
        • Qt WebEngine
      • Developer and Designer Tools
        • OpenSSL 1.1.1.c Toolkit
          • OpenSSL 64-bit binaries
        • Cmake
        • Ninja
  2. Install homebrew
    • Open a terminal and install clang -> brew install llvm cmake ninja
  3. Change your default kit: QtCreator -> Options -> Kits -> Select your default kit (Desktop Qt 5.13.0) -> 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: