With Botfather one can write crossplatform bots for Android, Desktop and Web (browser) applications in JavaScript. For this purpose Botfather provides several JavaScript APIs featuring image matching and more. Furthermore scripts can be turned into crossplatform binaries using the Botfather Binary Generator Tool (bingen for short).
- Install gcc and cmake (e.g. 
sudo pacman -S gcc cmake) - Install 
Qt5, including the Qt5Script module (e.g.sudo pacman -S qt5) - Install 
libgit2(e.g.sudo pacman -S libgit2) - Install 
opencv(e.g.sudo pacman -S opencv) - Download the CEF binary distribution and point 
CEF_ROOTto itwget https://cef-builds.spotifycdn.com/cef_binary_3.3578.1861.g1992780_linux64.tar.bz2tar -xvf cef_binary_3.3578.1861.g1992780_linux64.tar.bz2export CEF_ROOT=$(pwd)/cef_binary_3.3578.1861.g1992780_linux64
 - Clone the repository and enter the directory
 - Build the project
mkdir build && cd buildcmake -DCMAKE_BUILD_TYPE=Release ..make
 
We use these builds for testing Flatpak runtimes and to pre-build the binaries we later ship to Flathub.
- Install the runtime and matching SDK: 
flatpak install flathub org.kde.Platform//5.15-23.08 org.kde.Sdk//5.15-23.08 - Build the app and put it in a repository: 
flatpak-builder --repo=flatpak/repo --force-clean flatpak/build-dir flatpak/io.botfather.Nightly.yaml - Install and run the app for testing:
flatpak --user install ./flatpak/repo io.botfather.Nightlyflatpak run io.botfather.Nightly
 
- Install Visual Studio including the 
Desktop development with C++option - Install CMake
 - Install Qt 5.15.2
- Enable the 
Archiveversion filter to list Qt 5 releases - Make sure to install the 
Qt Scriptmodule - Add 
C:\Qt\5.15.2\msvc2015_64to theCMAKE_PREFIX_PATHenvironment variable 
 - Enable the 
 - Set up Chromium Embedded Framework (CEF)
- Download https://cef-builds.spotifycdn.com/cef_binary_3.3578.1861.g1992780_windows64.tar.bz2
 - Extract the archive to a persistent location
 - Set the 
CEF_ROOTenvironment variable to the extracted directory 
 - Set up OpenCV 4
- Download and run the OpenCV installer for Windows
 - Select the OpenCV directory and a build directory in CMake
 - Configure and make sure 
opencv_worldis selected - Generate and open the project
 - Build 
ALL_BUILDin the Release configuration - Point the 
OPENCV_ROOTenvironment variable to the build directory 
 - Set up libgit2
- Download and extract the latest libgit2 release
 - Select the libgit2 directory and a build directory in CMake
 - Configure, generate, and open the project
 - Build 
ALL_BUILDin the Release configuration - Add the libgit2 source and 
build/Releasedirectories to theCMAKE_PREFIX_PATHenvironment variable 
 - Build Botfather
- Clone the 
botfatherrepository - Select the 
botfatherdirectory and a build directory in CMake - Configure, generate, and open the project
 - Build 
ALL_BUILDin the Release configuration - Copy 
git2.dllandopencv_world4xxx.dllto thebuild/bin/Releasedirectory 
 - Clone the 
 
- 
Install the C/C++ VSCode Extension
 - 
Update the extension's IntelliSense configuration
- 
Open the Command Palette (
Ctrl+Shift+P) - 
Search for
>C/C++: Edit Configurations (UI) - 
Add third-party dependencies to the
Include pathsectionOn Arch Linux, the following should be sufficient:
${workspaceFolder}/** /usr/include/qt/** /usr/include/opencv4/** /path/to/cef_binary_3.3578.1861.g1992780_linux64/**
On Ubuntu, the paths differ slightly:
${workspaceFolder}/** /usr/include/x86_64-linux-gnu/qt5/** /usr/include/x86_64-linux-gnu/opencv4/** /path/to/cef_binary_3.3578.1861.g1992780_linux64/**
On Windows, something like this should work:
${workspaceFolder}/** C:\Qt\5.15.2\msvc2015_64\include\** C:\LIBGIT2\libgit2-1.8.2\include\** C:\OPENCV\4.10.0\build\include\** C:\CEF\cef_binary_3.3578.1861.g1992780_windows64\**
 
 - 
 
This means there's no webhelper binary next to the botfather binary.
Fix this problem by placing a webhelper binary next to the botfather binary matching the platform and build type.
Rebuild the both webhelper and botfather.
Look up the latest supported CEF Release Branches and attempt to use it. In case the version appears unstable, use the release CefSharp is based on.
Add the following build options to the io.botfather.Nightly.yaml to prevent the builder from stipping debug symbols from the build.
"build-options": {
	"no-debuginfo": true,
	"strip": false
}Then start a shell in the sandbox using flatpak-builder --run <build-dir> <manifest> sh.
Now use gdb, strace, ldd and so on to debug.
More infos can be found in the Flatpak documentation on debugging.