Skip to main content

Build Guide

In this chapter you will learn the steps to build Jenova Runtime from the source code yourself.

Screenshot_JenovaBuilderTerminal

Windows Terminal :: Jenova Builder, Jenova Runtime compiled using standalone builder script.

Jenova Builder

Jenova Framework offers an advanced standalone build system developed entirely in Python from scratch known as Jenova Builder.

By using Jenova Builder, you can build Jenova Runtime for different platforms with a single command. It automatically downloads and builds all required dependencies, compiles the runtime and packages everything to produce a distribution. Additionally, you can use the builder with any IDE including Visual Studio, Visual Studio Code, Neovim, XCode, CLion and more.

python ./Jenova.Builder.py --compiler win-msvc --deps-ver "4.4"
Information

Jenova Builder is used internally in Jenova Runtime GitHub Actions.

Builder Prerequisites

Before using Jenova Builder you need to install following prerequisites on Windows, Linux or Mac.

  • Python (3.10+)
  • CMake (3.20+)
  • Ninja (1.11+)

Additionally, the following Python packages are required for Builder :

pip install requests py7zr colored

💡 Tip : Explore the Jenova Runtime GitHub Action files to gain insights into the complete installation process across various operating systems from scratch. GitHub Actions are provided for all platforms and compilers.

Builder Features

Jenova Builder offers a range of features for deployment and configuration. Here are its key capabilities:

  • Compiler Selection : Supports multiple compiler toolchains. Specify the compiler using the --compiler argument.
  • Dependency Management : Automatically downloads all required dependencies for building the runtime. Specify the dependency version with --deps-version or skip this step using --skip-deps
  • Toolchain Installation : Downloads and installs the required toolchain in the repository directory. If the toolchain was previously downloaded, this step is skipped automatically.
  • Distribution Packaging : Packages the final build into a distributable format for easy installation, including all required components. This step can be skipped with --skip-packaging
  • Deployment Mode : Optimized for running inside GitHub Actions, enabled with --deploy-mode. Additionally, To reduce unnecessary output you can skip the builder banner using --skip-banner
  • Cache System : Includes a minimal caching mechanism to improve compilation performance. Changes to headers are not supported by the cache system, You can disable entire cache system by passing --skip-cache argument.
  • Cleanup System : Removes temporary downloaded files. Use --clean-up for basic cleanup or --deep-clean-up for a more thorough removal.

Building on Windows

On Windows, you can use both Visual Studio and Jenova Builder. The builder supports multiple compiler toolchains, whereas Visual Studio only supports Visual C++ Compiler and Clang-cl. You can use Jenova Builder to compile dependencies, then switch to Visual Studio for further development and compilation.

Using Jenova Builder

On Windows, Jenova Builder utilizes an extensive compiler suite known as GigaChad Toolchain—a universal, streamlined and unbloated solution for developers on the Windows x64 platform. This toolchain includes the following compilers :

  • Microsoft Visual C++ (msvc)
  • Microsoft Visual C++ LLVM (clang-cl)
  • LLVM Clang (clang/clang++)
  • Minimalist GNU for Windows (gcc/g++)

At only ~150MB, GigaChad Toolchain integrates all compiler toolchains, build tools (Git, CMake, Ninja, BusyBox etc.), Windows SDK and essential utilities—All-in-One. No additional installations are required, not even Visual Studio.

To build the runtime using the builder, simply run the builder script with your desired options, and the entire process will be automated.

# Running Builder
python3 ./Jenova.Builder.py

# Build using MSVC
python3 ./Jenova.Builder.py --compiler win-msvc --skip-banner

# Build using MSVC LLVM
python3 ./Jenova.Builder.py --compiler win-clangcl --skip-banner

# Build using MinGW Clang
python3 ./Jenova.Builder.py --compiler win-clang --skip-banner

# Build using MinGW GCC
python3 ./Jenova.Builder.py --compiler win-gcc --skip-banner

📝 Note: Using Jenova Builder with win-msvc ensures the compilation of a fully-featured Jenova Runtime, serving as a standalone and robust alternative to Visual Studio 2022 with C++20.

Using Visual Studio

Building Jenova Runtime for Windows x64 requires Visual Studio 2022 with C++20 Support.

  1. Build or install pre-built dependencies using Jenova Builder.
  2. Open Jenova.sln in Visual Studio 2022
  3. Build the solution

📝 Note : You can build Jenova Runtime with Visual Studio 2017 and 2019 but Visual Studio 2022 is highly recommended.

Building on Linux

On Linux, Jenova Builder is the only way to build the runtime. Previously, there was a Code::Blocks option but project files have been deprecated and removed following a significant update to the builder.

Requirement

Building Jenova Runtime requires a minimum version of GCC 13.0+ or LLVM Clang 18.0+

Information
  • Jenova Runtime source code is fully compatible with both Clang/Clang++ and GCC/G++ standards.
  • Additionally, Visual Studio Code compatibility files are provided.

Using Jenova Builder

Building the runtime on Linux is not as straightforward as on Windows. While the build process itself is relatively simple, you may encounter issues at runtime. You might need to install additional libraries depending on your Linux distribution.

Once the required libraries are installed, the build process follows the same steps as Windows.

# Running Builder
python3 ./Jenova.Builder.py

# Build using Clang++
python3 ./Jenova.Builder.py --compiler linux-clang --skip-banner

# Build using G++
python3 ./Jenova.Builder.py --compiler linux-gcc --skip-banner

I can't provide specific information on required Linux libraries since each distro has its own quirks. However, If you run into issues, consider joining our Discord server, where others with similar experiences may be able to help you.

Using GitHub Codespace

Here's the step to compile Jenova Runtime in GitHub Codespace for Linux :

  1. Create a new GitHub Codespace

  2. Update Package List :

    sudo apt update
  3. Add the necessary repository to get GCC 13 :

    sudo add-apt-repository ppa:ubuntu-toolchain-r/test
  4. Install GCC 13 and G++ 13 :

    sudo apt install gcc-13 g++-13
  5. Use the update-alternatives command to set GCC 13 as the default compiler :

    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 130 --slave /usr/bin/g++ g++ /usr/bin/g++-13
    sudo update-alternatives --config gcc
    gcc --version
  6. Install Python3 and Install colored library :

    pip install colored
  7. Install 7zip Extractor :

    sudo apt-get install p7zip-full
  8. Download pre-built dependencies and extract it :

    wget https://jenova-framework.github.io/archive/dependencies/Jenova-Runtime-latest-Dependencies-Linux64.7z
    7z x Jenova-Runtime-latest-Dependencies-Linux64.7z -oLibs
    rm Jenova-Runtime-latest-Dependencies-Linux64.7z
  9. Build Jenova Runtime with builder :

    python3 ./Jenova.Builder.py --compiler gcc --skip-banner
  10. Download compiled Jenova.Runtime.Linux64.so from linux64 directory.