Modern C++ Design: Part I Workshop Docker Wrapper
The workshop is intended to run on a Docker container based on a provided image. The image provides gcc, clang, CMake, Ninja, debuggers, clang-format, pre-configured Conan package manager, and more...
To install Docker please follow the point #1 of a detailed installation instruction in Developing inside a Container section of VSCode documentation.
Note: WSL 2 improves the performance of Docker on Windows. It is also a really powerful tool for daily C++ programming use. If you do not use it currently, please consider installing it.
Irrlicht is an open source realtime 3D engine written in C++. In order to see 3D graphics we will need to export docker container's display to the host's XServer.
- Install VcXsrv Windows X Server.
- Run
XLaunch
from the start menu and follow the configuration steps:Next
on "Display settings"Next
on "Client startup"- Check "Disable access control" on "Extra settings" and
Next
Finish
on "Finish configuration"
- Uncomment appropriate line in "remoteEnv" part of
devcontainer.json
file.
- Install XQuartz and use it in a similar way as in the above Windows case.
- Uncomment appropriate line in "remoteEnv" part of
devcontainer.json
file.
- Run the following command
xhost +SI:localuser:root
- Uncomment appropriate line in "remoteEnv" part of
devcontainer.json
file.
The usage of Visual Studio Code is strongly suggested for this workshop. Make sure to enable at least the following extensions:
You can try to use your own development environment for this workshop but in such a case please make sure that you:
- have a C++20-ready compiler,
- installed recent version of CMake
- installed Conan package manager and provided a profile for your compiler
- [Windows only] [optional] installed DirectX SDK
- can compile and run the provided example.
-
When you open this folder in a VSCode it will ask:
Folder contains a Dev Container configuration file. Reopen folder to develop in a container (learn more).
- If on Windows and WSL 2 is not available:
- choose
Clone in Volume
, - either provide a clone URL directly (https://github.com/train-it-eu/irrlicht-example.git) or choose "Clone a repository form GitHub in a Container Volume", and type "train-it-eu/irrlicht-example",
- choose a volume for the repository (unique, current, other).
- choose
- Otherwise, choose
Reopen in Container
.
- If on Windows and WSL 2 is not available:
-
Wait a moment for the container to initialize.