Files
Mitchell Wilson 3f8c52a80a Copying //UE4/Dev-Documentation to Samples-Main (//UE4/Samples-Main)
#rb none

[CL 6955335 by Mitchell Wilson in Main branch]
2019-06-12 12:19:04 -04:00

75 lines
3.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
INTSourceChangelist:3783201
Availability:Public
Title:虚幻构建系统
Crumbs:
Description:用于编译引擎和游戏项目的虚幻引擎自定义构建系统。
version:4.15
parent:Programming
tags:Programming
tags:Unreal Build System
type:overview
topic-image:Engine/build_topic.png
[TOC (start:1 end:3)]
[REGION:fullwidth]
![虚幻构建系统](build.png)
[/REGION]
**虚幻构建系统** 指的是自动处理构建虚幻引擎4UE4的工具集合。总的来说UnrealBuildTool和UnrealHeaderTool为虚幻构建系统提供支持。
本指南概括介绍UnrealBuildTool和UnrealHeaderTool包含关于UE4模块化架构的简要讨论。如果您想要使用这组构建工具我们还提供了一些指南可帮助您设置和配置虚幻
构建系统来制作您自己的项目。最后我们将提供一些适用于高级用户的指南方便他们进一步了解Include-What-You-UseIWYU以来模型和BuildGraph脚本系统。
[REGION:note]
如果您想要在Mac OS X上调试UnrealBuildTool或UnrealAutomationTool请安装[MonoDevelop 4.2.2](http://monodevelop.com/Download)和[Mono 3.2.7](http://www.go-mono.com/mono-downloads/download.html)。
[/REGION]
(#unrealbuildtool)
## UnrealBuildTool
**UnrealBuildTool**UBT是用于管理在各种构建配置中构建UE4源代码流程的自定义工具。查看`BuildConfiguration.cs`以探索各种
用户可配置构建选项。
(#unrealheadertool)
## UnrealHeaderTool
**UnrealHeaderTool**UHT是自定义解析和代码生成工具可支持UObject系统。代码编译分两个阶段
1. 调用UHT它解析虚幻相关类元数据的C++头并生成自定义代码来实现各种UObject相关功能。
1. 调用一般的C++编译器来编译结果。
在编译时,任一工具都可能产生错误,因此请务必仔细检查。
(#modulararchitecture)
## 模块化架构
UE4拆分成许多模块。每个模块都有`.build.cs`文件用于控制该模块的构建方式其中包含诸多选项用于定义模块依赖关系、其他库、包含路径等。默认情况下这些模块编译到DLL中并由单个可执行文件加载。您可以选择在`BuildConfiguration.cs`文件中构建单体可执行文件。
(#usingunrealbuildsystem)
## 使用虚幻构建系统
在使用虚幻构建系统之前,必须知道的是,对于开发环境,构建流程独立于任何项目文件单独执行,如`.sln`或`.vcproj`文件针对Visual Studio。但这些文件对于编辑目的十分有用
因此我们提供了一个工具用来动态生成这些文件(根据项目目录树的内容)。您可以可以将这个工具与`[Root UE4]`目录中的`GenerateProject.bat`文件一起运行。
[REGION:tip]
时常运行`GenerateProject.bat`将保持代码编辑器中要添加到磁盘(或从磁盘移除)的文件为最新。
[/REGION]
(#setup)
### 设置
%Programming/UnrealBuildSystem/ProjectFileGenerator:topic%
%Programming/Development/BuildingUnrealEngine:topic%
(#configuration)
### 配置
%Programming/UnrealBuildSystem/Configuration:topic%
%Programming/UnrealBuildSystem/TargetFiles:topic%
(#advancedtopics)
## 高级主题
%Programming/UnrealBuildSystem/IWYUReferenceGuide:topic%
%Programming/BuildTools/AutomationTool/BuildGraph:topic%