Overview
In this tutorial, we will explore three methods to set up a build environment for Xentara:
- Using a pre-built Docker container for a streamlined setup.
- Setting up on Debian Linux for advanced users.
- Setting up on Windows.
The objectives of this tutorial are to:
- Provide instructions for setting up a Xentara build environment using Docker.
- Outline installation steps for a native Debian environment for experienced Linux users.
- Describe the Windows installation process.
Method 1: Using a Pre-Built Docker Container
Using a pre-built Docker container is the simplest and most consistent way to set up a Xentara build environment.
The official Xentara Docker container is available on Docker Hub and includes all necessary dependencies and configurations.
Steps
- Install Docker:
If you do not have Docker installed, follow the installation instructions at Docker website.
Download and Run the Container:
Use the official Xentara build environment Docker container by running the following command:
docker pull xentara/xentara-build
- Add the
.devcontainer.json File:
- Open in Visual Studio Code:
Visual Studio Code provides seamless Docker integration. Install the Docker extension for Visual Studio Code, then:
- Open Visual Studio Code.
- If the
.devcontainer.json file is present, Visual Studio Code will automatically prompt you to reopen your project in the container.
- Select Reopen in Container to start the Xentara Docker environment.
- Select the Target Platform:
Once you are in the container environment, you need to select the target platform. In Visual Studio Code:
- Open the Command Palette (by pressing
Ctrl+Shift+P or F1).
- Search for and select CMake: Set Default Target.
- Choose the target platform (e.g.,
Clang (amd64) or another specific target as needed for your project).
- Start Building:
With the container running and the target platform selected, you can start building and testing your Xentara project directly within Visual Studio Code.
Method 2: Setting Up on Debian Linux
For advanced users, you can set up a build environment directly on Debian Linux. This method requires a Debian Bookworm environment and a basic understanding of Linux package management and system configurations.
Requirements
- OS: Debian Bookworm
- Packages: CMake, Ninja, GCC
- Xentara Plugin:
xentara-cpp-control package
Steps
Update and Upgrade: Start by updating your package lists and upgrading existing packages:
sudo apt update
sudo apt upgrade
Install CMake: Install the default CMake version available on Debian Bookworm (typically version 3.25).
Install Ninja Build System: Install Ninja, a fast and lightweight build system that Xentara recommends for efficiency.
sudo apt install ninja-build
Install GCC: Ensure you have GCC installed for C++ support.
- Download and Install
xentara-cpp-control:
- Go to download.xentara.io and use the installer script to download the
xentara-cpp-control package.
- Follow the installation instructions provided on the website to install this package, which provides the necessary libraries and dependencies to build Xentara controls.
Verify the Installation: Check that all packages are installed correctly by running:
cmake --version
ninja --version
gcc --version
- Note
- This setup is recommended only for experienced users who are comfortable with Linux package management and dependency configurations.
Method 3: Setting Up on Windows
For Windows users, Xentara provides a installer that simplifies the setup process. This method is suitable for building Xentara projects natively on Windows.
Steps
- Install the Xentara Installer:
- Download the Xentara installer from download.xentara.io.
- Run the installer and follow the on-screen instructions to install the base Xentara platform.
- Install the XentaraCPPControl Plugin:
- Download the XentaraCPPControl installer from download.xentara.io.
- Run the installer and ensure you select the option to install Development Files during the installation process. These files are necessary for building custom Xentara controls.
- Note
- This setup supports native Windows compilation only. If you require cross-compilation (e.g., building for Linux targets), you will need to install and configure Windows Subsystem for Linux (WSL). For more details, refer to the Microsoft WSL documentation.
Summary
In this tutorial, we covered three different methods to set up a Xentara build environment:
- Docker Container: An easy and portable option using a pre-configured container, ideal for Visual Studio Code users.
- Debian Linux Setup: A flexible method on Debian Bookworm for advanced Linux users.
- Windows Installation: A installation process for Windows users.
Choose the setup method that best suits your platform and experience level. Each option provides a stable build environment for developing and testing Xentara projects.