IncludePrerequisites
IncludePrerequisites
#Overview
name: IncludePrerequisites
The value of this variable can be defined or overridden in .ini config files. 2
.ini config files referencing this setting variable.
It is referenced in 9
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of IncludePrerequisites is to control whether prerequisites for packaged games, such as redistributable operating system components, are included in the game package on platforms that support it.
This setting variable is primarily used in the Unreal Engine’s packaging and deployment systems. Based on the callsites, it’s utilized in the following subsystems and modules:
- DeveloperToolSettings
- LauncherServices
- TurnkeySupport
The value of this variable is typically set in the project’s packaging settings. It can be modified through the Unreal Editor’s Project Settings interface or programmatically using the UProjectPackagingSettings class.
IncludePrerequisites interacts with other packaging-related variables, such as:
- IncludeAppLocalPrerequisites
- ApplocalPrerequisitesDirectory
Developers should be aware of the following when using this variable:
- It affects the size of the packaged game, as including prerequisites will increase the package size.
- It may impact the deployment process and the end-user experience during installation.
- The variable is serialized and deserialized as part of the launcher profile, affecting how projects are packaged and deployed.
Best practices when using this variable include:
- Consider the target platform and audience when deciding whether to include prerequisites.
- Test the packaged game with and without prerequisites to ensure proper functionality in both scenarios.
- Document the decision to include or exclude prerequisites for future reference and team communication.
- Regularly review and update the prerequisites included to ensure they match the current project requirements and target platform specifications.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseGame.ini:106, section: [/Script/UnrealEd.ProjectPackagingSettings]
- INI Section:
/Script/UnrealEd.ProjectPackagingSettings
- Raw value:
True
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/DefaultGame.ini:117, section: [/Script/UnrealEd.ProjectPackagingSettings]
- INI Section:
/Script/UnrealEd.ProjectPackagingSettings
- Raw value:
True
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Developer/DeveloperToolSettings/Classes/Settings/ProjectPackagingSettings.h:416
Scope (from outer to inner):
file
class class UProjectPackagingSettings : public UObject
Source code excerpt:
/** Specifies whether to include an installer for prerequisites of packaged games, such as redistributable operating system components, on platforms that support it. */
UPROPERTY(config, EditAnywhere, Category=Prerequisites, meta=(DisplayName="Include prerequisites installer"))
bool IncludePrerequisites;
/** Specifies whether to include prerequisites alongside the game executable. */
UPROPERTY(config, EditAnywhere, Category = Prerequisites, meta = (DisplayName = "Include app-local prerequisites"))
bool IncludeAppLocalPrerequisites;
/**
#Loc: <Workspace>/Engine/Source/Developer/LauncherServices/Private/Profiles/LauncherProfile.h:869
Scope (from outer to inner):
file
class class FLauncherProfile final : public ILauncherProfile
function virtual bool IsIncludingPrerequisites
Source code excerpt:
virtual bool IsIncludingPrerequisites() const override
{
return IncludePrerequisites;
}
virtual bool IsGeneratingChunks() const override
{
return bGenerateChunks;
}
#Loc: <Workspace>/Engine/Source/Developer/LauncherServices/Private/Profiles/LauncherProfile.h:1061
Scope (from outer to inner):
file
class class FLauncherProfile final : public ILauncherProfile
function virtual bool Serialize
Source code excerpt:
if (Version >= LAUNCHERSERVICES_ADDEDINCLUDEPREREQUISITES)
{
Archive << IncludePrerequisites;
}
if (Version >= LAUNCHERSERVICES_ADDEDBUILDMODE)
{
Archive << BuildMode;
}
#Loc: <Workspace>/Engine/Source/Developer/LauncherServices/Private/Profiles/LauncherProfile.h:1245
Scope (from outer to inner):
file
class class FLauncherProfile final : public ILauncherProfile
function virtual void Save
Source code excerpt:
Writer.WriteValue("ArchiveDirectory", ArchiveDir);
Writer.WriteValue("AdditionalCommandLineParameters", AdditionalCommandLineParameters);
Writer.WriteValue("IncludePrerequisites", IncludePrerequisites);
Writer.WriteValue("UseIoStore", bUseIoStore);
Writer.WriteValue("MakeBinaryConfig", bMakeBinaryConfig);
Writer.WriteValue("BuildTargetSpecified", BuildTargetSpecified);
Writer.WriteValue("BuildTargetName", BuildTargetName);
// serialize the default launch role
#Loc: <Workspace>/Engine/Source/Developer/LauncherServices/Private/Profiles/LauncherProfile.h:1934
Scope (from outer to inner):
file
class class FLauncherProfile final : public ILauncherProfile
function virtual bool Load
Source code excerpt:
if (Version >= LAUNCHERSERVICES_ADDEDINCLUDEPREREQUISITES)
{
IncludePrerequisites = Object.GetBoolField(TEXT("IncludePrerequisites"));
}
if (Version >= LAUNCHERSERVICES_ADDEDUSEIOSTORE)
{
bUseIoStore = Object.GetBoolField(TEXT("UseIoStore"));
}
#Loc: <Workspace>/Engine/Source/Developer/LauncherServices/Private/Profiles/LauncherProfile.h:2061
Scope (from outer to inner):
file
class class FLauncherProfile final : public ILauncherProfile
function virtual void SetDefaults
Source code excerpt:
DeploymentMode = ELauncherProfileDeploymentModes::CopyToDevice;
DeployStreamingServer = false;
IncludePrerequisites = false;
DeployWithUnrealPak = false;
DeployedDeviceGroupId = FGuid();
HideFileServerWindow = false;
DeployIncremental = false;
CreateReleaseVersion = false;
#Loc: <Workspace>/Engine/Source/Developer/LauncherServices/Private/Profiles/LauncherProfile.h:2527
Scope (from outer to inner):
file
class class FLauncherProfile final : public ILauncherProfile
function virtual void SetIncludePrerequisites
Source code excerpt:
virtual void SetIncludePrerequisites(bool InValue) override
{
if (IncludePrerequisites != InValue)
{
IncludePrerequisites = InValue;
Validate();
}
}
virtual void SetTimeout( uint32 InTime ) override
#Loc: <Workspace>/Engine/Source/Developer/LauncherServices/Private/Profiles/LauncherProfile.h:3125
Scope (from outer to inner):
file
class class FLauncherProfile final : public ILauncherProfile
Source code excerpt:
// Flag to indicate if game prerequisites should be included
bool IncludePrerequisites;
// Flag indicating if content should be split into chunks
bool bGenerateChunks;
// Flag indicating if chunked content should be used to generate HTTPChunkInstall data
bool bGenerateHttpChunkData;
#Loc: <Workspace>/Engine/Source/Editor/TurnkeySupport/Private/TurnkeySupportModule.cpp:445
Scope (from outer to inner):
file
class class FTurnkeySupportCallbacks
function static void CookOrPackage
Source code excerpt:
}
if (PackagingSettings->IncludePrerequisites)
{
BuildCookRunParams += TEXT(" -prereqs");
}
if (!PackagingSettings->ApplocalPrerequisitesDirectory.Path.IsEmpty())
{