# Сборка движка из исходников

## Шаги сборки движка из исходников

1. Клонирование репозитория **UE**
2. Вызов **Setup.bat** из корня репозитория
3. Вызов **GenerateProjectFiles.bat** из корня репозитория
4. Компилирование исходников

## Подробнее в видео уроках

В видео уроках для автоматизации сборки мы используем **Jenkins**. Подготовка сборки новой версии занимает не более 5 минут.

{% embed url="<https://youtu.be/NfZq9MD1zaQ>" %}

{% embed url="<https://youtu.be/NTAZ5rFtx20>" %}

## Bat команда

Если **Jenkins** вы по каким-то причинам не используете, рекомендую хотя бы создать простейший **bat** файл для этой цели:

```bash
clone_and_build_ue.bat
```

&#x20;с содержимым:

```bash
rem "clone repo"
git clone https://github.com/EpicGames/UnrealEngine.git

rem "download additional binaries"
call Setup.bat

rem "generate sln"
call GenerateProjectFiles.bat

rem "set params for build"
set MS_BUILD_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
set BUILD_DIR=%~dp0
set PLATFORM=Win64
set CONFIGURATION=Development Editor
set VERBOSITY=diagnostic

rem "perform MSBUILD"
start "%MS_BUILD_PATH%" "%BUILD_DIR%\UE4.sln" -target:"Engine\UE4" -property:Platform="%PLATFORM%";Configuration="%CONFIGURATION%" -verbosity:"%VERBOSITY%"
```

Убедитесь, что у вас [установлен **git**](https://app.gitbook.com/@lifeexe-art/s/unreal-automation/neobkhodimoe-po/git-github) и путь до него добавлен в [переменную среды **PATH**](https://app.gitbook.com/@lifeexe-art/s/unreal-automation/raznoe/kak-ustanovit-peremennuyu-sredy-v-windows) (обычно это происходит автоматически при установке).&#x20;

Скрипт необходимо вызвать из директории, где вы планируете хранить **Unreal Engine** из исходников.

## Дополнительно

* [MSBuild cmd-line reference](https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-command-line-reference?view=vs-2019)
* [verbosity settings](https://docs.microsoft.com/en-us/visualstudio/msbuild/obtaining-build-logs-with-msbuild?view=vs-2019#verbosity-settings)
* [vswhere](https://github.com/microsoft/vswhere/releases)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lifeexe-art.gitbook.io/unreal-automation/iskhodniki-ue/sborka-dvizhka-iz-iskhodnikov.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
