UE4 打包参数说明
打包选项说明
打包代码位于 Engine\Source\Editor\MainFrame\Private\Frame\MainFrameActions.cpp
选项代码位于 Engine\Source\Editor\UnrealEd\Classes\Settings\ProjectPackagingSettings.h
选项 | DefaultGame.ini(ProjectPackagingSettings.h) | 说明 | 命令行参数 |
---|---|---|---|
Packaging | |||
Use Pak File | UsePakFile(bool ) |
是否打包为一个文件(对HTML5平台无效) | -pak |
Generate Chunks | bGenerateChunks(bool ) |
-manifests | |
Generate No Chunks | bGenerateNoChunks(bool ) |
读ini | |
Chunk Hard References Only | bChunkHardReferencesOnly(bool ) |
读ini | |
Build Http Chunk Install Data | bBuildHttpChunkInstallData(bool ) |
-manifests -createchunkinstall -chunkinstalldirectory="%s" -chunkinstallversion=%s | |
Http Chunk Install Data Directory | HttpChunkInstallDataDirectory(FDirectoryPath ) |
||
Http Chunk Install Data Version | HttpChunkInstallDataVersion(FString ) |
||
Share Material Shader Code | bShareMaterialShaderCode(bool ) |
读ini | |
Shared Material native Libraries | bSharedMaterialNativeLibraries(bool ) |
读ini | |
Localizations to Package | (+)CulturesToStage(TArray<FString> ) |
读ini | |
Include Crash Reporter | IncludeCrashReporter(bool ) |
是否包含崩溃报告程序(Windows XP无效) | -CrashReporter |
Internationalization Support | InternationalizationPreset(EProjectPackagingInternationalizationPresets ) |
读ini | |
Cook everything in the project content directory (ignore list of maps below) | bCookAll(bool ) |
cook content目录下的所有资产(会忽略Cook only maps) | 读ini |
Cook only maps (this only affects cookall) | bCookMapsOnly(bool ) |
只cook地图资产 | 读ini |
Create compressed cooked packages | bCompressed(bool ) |
是否使用压缩(可显著降低包大小) | -compressed |
Encrypt ini files inside pak files | bEncryptIniFiles(bool ) |
是否加密pak中的ini文件 | 读ini |
Encrypt the pak index, making it unusable without the required key | bEncryptPakIndex(bool ) |
是否加密pak索引 | 读ini |
Exclude editor content when cooking | bSkipEditorContent(bool ) |
cook时候是否忽略引擎自带编辑器资产 | -SkipCookingEditorContent |
List of maps to include in a packaged build | (+)MapsToCook(TArray<FFilePath> ) |
需要cook的地图资产 | 读ini |
Additional Asset Directories to Cook | (+)DirectoriesToAlwaysCook(TArray<FDirectoryPath> ) |
额外需要cook的资产目录(相对工程content目录的路径),不管目录里的资产有没有被引用到 | 读ini |
Directories to never cook | (+)DirectoriesToNeverCook(TArray<FDirectoryPath> ) |
永远都不cook的资产目录(相对工程content目录的路径),不管目录里的资产有没有被引用到 | 读ini |
Additional Non-Asset Directories to Package | (+)DirectoriesToAlwaysStageAsUFS(TArray<FDirectoryPath> ) |
如果使用pak,额外需要被打包到pak中的目录(相对工程content目录的路径),否则直接复制到对应路径 | 读ini |
Additional Non-Asset Directories To Copy | (+)DirectoriesToAlwaysStageAsNonUFS(TArray<FDirectoryPath> ) |
需要被复制到对应路径的目录(相对工程content目录的路径) | 读ini |
Project | |||
Build | Build(EProjectPackagingBuild ) |
是否编译项目(Always:编译; Never:不编; If project has code, or running a locally built editor: 如果工程包含代码或者引擎是自己本地编的,就编译; If running a locally built editor:只有引擎是自己本地编的才编译) | -build |
Build Configuration | BuildConfiguration(EProjectPackagingBuildConfigurations ) |
编译选项(Debug, Development, Shipping) | -clientconfig=Development 如果选项字符串里包含Client 则额外有 -client |
Staging Directory | StagingDirectory(FDirectoryPath ) |
输出目录 | -stage -archive -archivedirectory="%s" |
Full Rebuild | FullRebuild(bool ) |
是否完全重编(推荐) | -clean |
ForDistribution | ForDistribution(bool ) |
是否是发布版 | -distribution |
Include Debug Files | IncludeDebugFiles(bool ) |
是否包含调试信息,默认包含 | -nodebuginfo |
Blueprints | |||
Blueprint Nativization Method | BlueprintNativizationMethod(EProjectPackagingBlueprintNativizationMethod ) |
是否将蓝图编译为C++ | 读ini |
Prerequisites | |||
Include prerequisites installer | IncludePrerequisites(bool ) |
是否包含运行依赖库安装包 | -prereqs |
Include app-local prerequisites | IncludeAppLocalPrerequisites(bool ) |
是否包含本地依赖 | -applocaldirectory="$(EngineDir)/Binaries/ThirdParty/AppLocalDependencies" |
Applocal Prerequisites Directory | ApplocalPrerequisitesDirectory(FDirectoryPath ) |
依赖库目录 | -applocaldirectory="%s" |
其他参数 | |||
目标平台, 见Engine\Source\Developer\DesktopPlatform\Private\PlatformInfo.cpp 中的 AllPlatformInfoArray 中的 TargetPlatformName 和 UATCommandLine |
-targetplatform= -cookflavor= | ||
是否编译UAT | -nocompile/-compile | ||
不编译编辑器 | -nocompileeditor |