与团队合作处理虚幻引擎(UE)项目的源构建时,部分团队成员可能不具备从源编译并运行虚幻引擎所需的软件或知识。 在这种情况下,你可以编译虚幻引擎二进制文件,并将其作为已安装构建分发给你的团队。 这样创建的包类似于Epic Games启动程序所部署的内容。
For more general instructions on how to create an Installed Build, refer to the Installed Build Reference Guide. This page provides additional information and steps for developers using Windows.
先决条件
制作已安装构建之前,确保你满足以下先决条件:
Windows Debugging Tools component for Windows 10 SDK (Windows 10 only – See below).
推荐硬件
我们推荐你使用具有高处理器核心/线程数量的计算机进行编译。 虽然UE在单个核心上编译,但使用多核心处理器可以大幅减少编译时间。 如需了解推荐的硬件,请参阅硬件和软件规格。
Windows 10 SDK (Windows 10 users only)
On Windows 10, you need to install the Windows Debugging Tools component in the Windows 10 SDK. This enables PDBCopy.exe, which is used in the build process to strip symbols and optimize the resulting package size.
If you do not already have the Windows 10 SDK installed, follow these steps:
Download and install the Windows 10 SDK from Microsoft's site.
When you reach the dialogue that says select the features you want to install, make sure Debugging Tools for Windows is checked, then proceed with the installation.
Proceed with the installation.
If you already have the Windows 10 SDK set up, but don’t have Debugging Tools for Windows, follow these steps:
Open Add or Remove Programs.
In the list of available programs, locate your Windows Software Development Kit installation. Click Modify.
In the list of options that appears, check Change and click Next.
When you see the dialog that says select the features you want to change, check Debugging Tools for Windows, then click Change to proceed with the installation.
制作已安装构建
To make an Installed Build on Windows, follow these steps:
Regenerate your Unreal Engine project files.
If you encounter error messages when attempting to regenerate project files, double check that you have the Windows DotNet 6.0 runtime installed.
Use
RunUAT.batto create an installed build. The following is an example of a BuildGraph command to create an installed build for Windows:Command Line
C++RunUAT.bat BuildGraph -script=Engine/Build/InstalledEngineBuild.xml -target="Make Installed Build Win64" -nosign -set:GameConfigurations=Development;Shipping -set:WithWin64=true -set:WithAndroid=true -set:WithDDC=false -set:WithLinux=false -set:WithLinuxArm64=false -set:WithIOS=false -set:WithTVOS=false -set:WithMac=false -cleanMake sure you specify whether or not every platform that you have available should be added or not. If you have additional platforms not mentioned here in your source code, add
-Set:With[Platform]=trueor-Set:With[Platform]=falseaccording to your project’s needs, where [Platform] is replaced with the name of the added platform.The details about the parameters used in the above example are as follows:
Parameter Required or Optional Description -target="Make Installed Build Win64”Required
Instructs BuildGraph to run a specific operation. This graph of dependencies is described in the script="Engine/Build/InstalledEngineBuild.xml" and there are other options available that may meet your requirements better, but for the purposes of this document our example targets a build that matches what a user would receive from the launcher version of Unreal Engine.
-set With[Platform]=trueor-set With[Platform]=falseRequired
Specifies whether or not support for a given platform should be added to your installed build, where [Platform] is replaced with the name of a platform you want to enable or disable. Make sure to add this parameter for every platform you have source code for. For details on which platforms to enable or disable, refer to the Required Platforms section below.
-set:GameConfigurations=Development;ShippingRequired
Flag for different versions of the editor. We recommend including Development and Shipping.
-set WithClient=falseand-set WithServer=falseOptional
Specifies whether to create Client and Server builds for network multiplayer projects. Defaults to false.
-set WithDDC=falseOptional
Specifies whether to create a build that includes Derived Data Cache support. Defaults to false.
-cleanRecommended
Performs a fresh recompile of the project. Remove this parameter if you encounter an "Other Compilation Error” message.
If you receive an "Other Compilation Error" message, remove the
-cleanparameter and try again, as there are known issues with this command on Linux.Build the Shader Compiler Worker.
C++Engine\Build\BatchFiles\Build.bat ShaderCompileWorker Win64 Development
Your build appears in the Windows directory where Feature Packs, Templates, and Engine are located for distribution.
必需平台
When creating installed builds on Windows, make sure you enable the following platforms with the -With[Platform] parameter:
| Platform | Parameter | Description |
|---|---|---|
Android |
| Required to support publishing on Android, which is the target platform for most HMI projects. |
Windows 64-bit |
| Required to support building the editor on Windows. |
Disable all other platforms, as they are not necessary for either running Unreal Editor or packaging HMI projects.
测试已安装构建可执行文件
Installed builds appear in the LocalBuilds folder under LocalBuilds/Engine/Linux/Engine/Binaries/Win64. On the Windows operating system, UnrealEditor.exe is the main executable for the Unreal Editor. Run this executable to test your build.
When you run your installed build for the first time, a prompt appears to ask for firewall permissions. We advise that you accept these permissions for full functionality.
To archive and distribute the build, place your installed build in the top directory of your source control repository alongside the FeaturePacks, Templates, and Engine directories.
If you see a prompt stating "Unable to launch ShaderCompileWorker" or experience a crash while compiling shaders, the Shader Compiler Worker has not been built yet. Revisit the last step of the workflow under Make an Installed Build above. We build Shader Compiler Worker separately so that you do not need to rebuild Shader Compiler Worker every time you build the editor.