Skip to content
How to Build Leonida From Your Own Copy, Step by Step
Official GTA VI screenshot, Rockstar Games. Game art, not build output: the Leonida project does not boot. · Project guide: the GTA 6 recompilation project.
  • Boots: No
  • Release: None
  • File: None

How to Build Leonida From Your Own Copy, Step by Step

Building Leonida means cloning the project, installing the prerequisites, and running the build from your own Xbox Series copy. This guide walks through each stage in order.

Contents
  1. Before You Start: Read This First
  2. Stage One: Install the Prerequisites
  3. Stage Two: Get the Project Code
  4. Stage Three: Run the Build
  5. Stage Four: What You Have Afterwards
  6. Conclusion
  7. Frequently Asked Questions

Before You Start: Read This First

Before any command is run, three facts should be clear. The build produces no playable game. The build needs your own Xbox Series copy, version 1.0.2.1, with its files already readable on disk. And the build needs a large amount of free space and a complete toolchain, checked before work starts. A reader who accepts those three facts will not be surprised by anything that follows.

Leonida build guide readers should also know that a stopped build resumes where it left off, so a long build can be paused and continued. The build records which tools produced each result, and upgrades rerun only the affected stages. That makes the process forgiving of interruptions, but it does not make it short. Plan for hours, not minutes, especially for the asset stage.

Install the Prerequisites

Install the tools in the order the project lists them, and make sure each one is on the system path where the build expects it. Python 3.12 or newer is needed, with the option to add Python to PATH selected during installation. The .NET 8 SDK, the Vulkan SDK for the shader tools, and LLVM 21 or newer with the AMDGPU target for the disassembler follow. Visual Studio 2022 with desktop C++ development and a current Windows SDK provides the runtime build, and ffmpeg on PATH is optional for audio decoding, required only when WAV output is requested.

The LLVM step deserves care on Windows, because the official Windows build has no AMDGPU target. The project provides a script that builds a native disassembler with that target, which takes a noticeable amount of time, and faster routes exist through package managers or a Linux install. Whichever route is chosen, the build checks for the result and lists anything missing in one pass, so a reader should run the check and fix the whole list rather than guessing.

Get the Project Code

Clone the project with its submodule, using the recursive form of the clone command. The submodule holds part of the asset decoding work, and leaving it out breaks the build in a confusing way. The project warns against taking a ZIP archive instead, because the archive leaves the submodule out. If Git is installed, the build fetches a missing submodule itself and says what it did. If Git is not installed, the build says what to do instead, which is to install Git and clone properly.

Use the preservation fork link given on the repository and fork explained page, labelled as a preservation fork, since the original repository went offline. Do not use a copy from a file host, a video description or a forum attachment. The code should come from a repository whose history can be inspected, not from a file whose contents cannot be checked.

Run the Build

The easy route is to double click the build script. It finds the game copy by itself, searching the usual folders and the tops of drives, recognising the version from a few file sizes without reading large files. If more than one copy is found, it asks which one to use. If none is found, it asks for the folder. Before starting, it checks that the prerequisites are installed and that enough free space exists, and it lists anything missing in one go. The result goes to a Leonida folder in Documents, and a stopped build continues where it left off.

The terminal route gives more control with the same behaviour. The build script accepts options to list the copies found, to choose a folder, to check a copy without building anything, to compare file hashes, to choose game, output and work folders, to run only some stages, and to control WAV output and wave64 emulation. The check stage always runs first. Then the shader, asset and runtime stages run together when selected, and the pipeline stage starts once the translated shaders are ready.

What You Have Afterwards

Afterwards, you have translated shaders, exported assets, a runtime build and logs, in the output and work folders the build used. You do not have a playable game, and running the loader against the real executable has not been done, because booting work has not started. The honest way to use the result is to inspect it: read the logs, compare them with the measured status table, check the shader counts, look at the export manifest and its recorded limitations, and run the project's own dashboard tool to see what passes and what blocks the next step.

Keep the work folder intact between runs, because the build reuses translated shaders and exported assets when their producing tools have not changed, and clears and rebuilds only what an upgrade affects. Moving or deleting the work folder forces that work to be done again, which is the most common cause of a build taking far longer the second time than the first.

The Build, Step by Step

Follow the steps in order. Nothing here is a download: every step runs on your own PC, from your own copy of the game. If a step fails, stop and read what the preflight check lists. The build lists everything missing in one pass, so fix the whole list before running it again.

  1. Check the PC and the free space first

    Confirm a 64-bit Windows 10 or Windows 11 PC and about 400 GB free for a full build. The assets stage alone measured about 337 GB before its audio step, in about 2 hours 35 minutes. If space is tight, decide now whether to run only the check, shaders and runtime stages, which need about 30 GB. The work and output folders can sit on another drive.

    • Windows 10 or Windows 11, 64-bit
    • About 400 GB free for the full build, or about 30 GB for the stages without assets
    • Your own Xbox Series copy, version 1.0.2.1, with files already readable on disk
  2. Install every prerequisite

    Install each tool below, and tick the option that adds Python to PATH during the Python install. The build checks for every item before it starts work.

    PrerequisiteVersion or detail in the README
    Your own copyXbox Series package, version 1.0.2.1
    Python3.12 or newer, with Add python.exe to PATH ticked
    .NET SDK.NET 8 SDK
    Vulkan SDKFor spirv-as and spirv-val
    LLVM21 or newer, with the AMDGPU target, for llvm-mc
    Visual Studio 2022Desktop development with C++, Windows SDK 10.0.26100 or newer
    ffmpegOn PATH, optional, decodes XMA2 streams, required for WAV output

    On Windows the official LLVM build has no AMDGPU target. The README names a script that builds a native llvm-mc with that target, which takes about 20 to 40 minutes, and a faster route through conda. The script name, exactly as the README gives it, is scripts\build_llvm_mc.ps1. The conda route, exactly as the README gives it, is:

    conda install -c conda-forge llvm-tools

    After installing through conda, set LLVM_MC to the full path of the llvm-mc it installs. The README gives where.exe llvm-mc as the way to find that path once the environment is active.

  3. Clone the project with its submodule

    Use the recursive clone. A plain ZIP download leaves out the third_party/rpf9-explorer submodule, and the README warns against it. The original repository went offline, so clone the preservation fork, which carries the last upstream code. The README itself names the original address; the fork address below swaps only the owner and repository path, and is labelled as a preservation fork everywhere on this site.

    git clone --recursive https://github.com/avivetech/Leonida

    Your game folder is the one that holds MicrosoftGame.Config and the .rpf archives, as plain files. The repository itself contains no game, no keys and no executable, and it does not explain how to obtain them.

  4. Run the easy build

    Double-click Build.bat. It finds your copy by itself, looking in Downloads, Desktop, Documents, Games, your home folder and the top of every drive, two folders deep. It recognises the version from a few file sizes, without reading anything large. If it finds more than one copy it asks which one to use, and if it finds none it asks you to paste the folder. Before starting it checks that everything is installed and that there is enough free space, and lists anything missing in one go. The result goes to Documents\Leonida. A stopped build continues where it left off.

  5. Or run it from a terminal, with more control

    The same behaviour, with more control, comes from the terminal commands below. Each command is given in the README exactly as written here. Run them from inside the cloned project folder.

    python -I make_game.py --find

    This lists the copies found on this PC, without building anything.

    python -I make_game.py --pick

    This opens a folder dialog so you can choose the game folder yourself.

    python -I make_game.py --check

    This checks your copy and builds nothing. The slower full form also compares the SHA-256 hash of every file:

    python -I make_game.py --check --full-check

    To choose the game, output and work folders explicitly, including putting the work folder on another drive:

    python -I make_game.py --game "D:\path\to\your\package" --out "D:\Games\Leonida" --work "E:\leonida-work"

    To run only some stages:

    python -I make_game.py --stages shaders,assets

    The check stage always runs first. Then the shaders, assets and runtime stages run together when selected. The pipelines stage starts once the translated shaders are ready. Shader translation is the longest CPU step and runs on several processes; the build splits that budget when shaders and assets share the machine.

  6. Inspect what the build produced

    After the build, inspect the result instead of expecting a game. Read the logs under work/logs/, compare the outcome with the measured status table, and run the project's own progress dashboard. The dashboard command, exactly as the README gives it, is:

    python -I tools/progress_dashboard.py --out <folder outside the repo>

    Open the progress.html file it produces. Keep the work folder intact between runs: the build reuses translated shaders and exported assets when their producing tools have not changed, and only rebuilds what an upgrade affects. Deleting the work folder forces that work to be done again.

    • Translated shaders and validation counts match the status table
    • Export manifest present, with its recorded limitations noted
    • Logs read, dashboard opened, no playable result expected

Low disk space, in the README's own terms. The 400 GB figure is for the full build. Running only the check, shaders and runtime stages needs about 30 GB. The assets stage is about 370 GB. WAV output adds several times the Ogg Opus size, because 16-bit PCM WAV is several times larger. The --work and --out options can sit on another drive, and the preflight prints the choice when the assets stage is what does not fit.

Build Flags and Runtime Options, as Named in the README

Every flag below is named in the README, and none has been invented for this guide. The counts they work with are the measured ones: 26,503 shaders translated and validated, and 382,781 models exported. Use a flag only in the form shown here, and re-read the README passage for it before combining flags.

Flag or optionWhat the README says it does
--wavWAV output for audio; requires ffmpeg, which decodes XMA2 streams
--wave64-emulate auto | on | offControls wave64 emulation; auto is the default and picks by subgroup width
--no-float-controlsForwarded to the shader translator, saved next to the translated shaders
--bary-fallbackForwarded to the shader translator, saved next to the translated shaders
--texel-offset-fallbackForwarded to the shader translator, saved next to the translated shaders
--mesh-computeForwarded to the shader translator, saved next to the translated shaders
--jobsNamed in the README among the build options, alongside the stage options
--no-tuiRuns the build without the terminal interface
--work and --outChoose the work folder and the output folder, including on another drive
--stagesRuns only the named stages, for example shaders,assets; check always runs first

The runtime side has its own commands, given in the README for the loader program:

gta6rt --run

This runs the stand-in program through the loader. The dry-run form checks without running:

gta6rt --dry-run

Three environment variables are named in the README for the runtime: LEONIDA_W64_EMULATE=1, LEONIDA_D3D12=vulkan and LEONIDA_SHADERS. Set them only as the README describes, one at a time, and note which one was set when a result changes, so the change can be traced back to it.

Conclusion

Building Leonida is a sequence, not a single action: prerequisites, a recursive clone, a checked build from your own copy, and inspection of the result. Each stage has a check that lists problems in one pass, and the build resumes after stopping. Follow the sequence, keep the work folder, and judge the result by the logs and the status table. The build will not give you a game today, but it will give you the project's real, current state, on your own PC, from your own copy.

Frequently Asked Questions

Do I need to own the game to build Leonida?

Yes. The build needs your own Xbox Series copy, version 1.0.2.1, with files already readable on disk. The project holds no game data and explains no way to obtain a copy.

How long does a Leonida build take?

Hours, with the asset stage the longest part. Shader translation is the longest CPU step, and the build runs it across many processes. A stopped build resumes where it left off.

Where does the build output go?

To a Leonida folder in Documents by default. Output and work folders can be placed on other drives with build options.