UE4 BuildCookRun中的Archive的含义

在UE4中,Archive、Cook、Stage、Package、Build的次序是怎么样的?

整体打包过程如下: Build -> Cook-> Stage -> Package -> Archive。其中,Archive 的含义是从Staged目录中拷贝文件到一个额外的目录即Archive目录。被称为"归档"。

调试方式

选择以上程序,并指定这些参数进行调试:

-ScriptsForProject=D:\我的项目.uproject

BuildCookRun

-nop4

-project=D:\我的项目.uproject

-cook

-stage

-archive

-archivedirectory=C:\Dustbin\MyArchive3

-package

-ue4exe=D:\我的项目\EngineSource/Engine/Binaries/Win64/UE4Editor-Cmd.exe

-compressed

-pak

-prereqs

-nodebuginfo

-manifests

-targetplatform=Win64

-build

-target={我的项目名}

-clientconfig=Development

-utf8output

-compile

DeploymentContext.ArchiveFiles

添加需要Archive的文件到 ArchivedFiles 中:

Project.CreateDeploymentContext

部署任务的上下文,在Stage、Package、Archive 的阶段,都会进入到这里,下面是其中的一些上下文信息:

实际的Archive拷贝动作

由 AutomationTool.Platform.GetFilesToArchive 触发 Project.Archive :

cpp 复制代码
Project.Archive
	public static void Archive(ProjectParams Params)
	{
		Params.ValidateAndLog();
		if (!Params.Archive)
		{
			return;
		}

		LogInformation("********** ARCHIVE COMMAND STARTED **********");

		LogInformation("Archiving to {0}", Params.ArchiveDirectoryParam);

		if (!Params.NoClient)
		{
			var DeployContextList = CreateDeploymentContext(Params, false, false);
			foreach ( var SC in DeployContextList )
			{
				CreateArchiveManifest(Params, SC);
				ApplyArchiveManifest(Params, SC);
				SC.StageTargetPlatform.ProcessArchivedProject(Params, SC);
			}
		}

通过向其中的拷贝动作加入日志,观察到Archive的实际操作过程如下:

cpp 复制代码
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目.exe >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目.exe
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Manifest_NonUFSFiles_Win64.txt >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Manifest_NonUFSFiles_Win64.txt
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Binaries\Win64\我的项目.exe >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Binaries\Win64\我的项目.exe
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Binaries\Win64\D3D12\D3D12Core.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Binaries\Win64\D3D12\D3D12Core.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Binaries\Win64\D3D12\d3d12SDKLayers.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Binaries\Win64\D3D12\d3d12SDKLayers.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Content\Paks\pak-0-0-pakchunk0-WindowsNoEditor.pak >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Content\Paks\pak-0-0-pakchunk0-WindowsNoEditor.pak
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Plugins\Pandora\Gamelet\Binaries\Win64\openplatform.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Plugins\Pandora\Gamelet\Binaries\Win64\openplatform.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\avcodec-57.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\avcodec-57.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\avdevice-57.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\avdevice-57.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\avfilter-6.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\avfilter-6.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\avformat-57.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\avformat-57.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\avutil-55.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\avutil-55.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\libwinpthread-1.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\libwinpthread-1.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\pfbs.exe >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\pfbs.exe
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\pixuiCurl.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\pixuiCurl.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\PixUI_PXPlugin.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\PixUI_PXPlugin.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\PixVideo.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\PixVideo.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\pthreadVC2.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\pthreadVC2.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\PxExtFFi.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\PxExtFFi.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\quickjs.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\quickjs.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\swresample-2.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\swresample-2.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\swscale-4.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\swscale-4.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\xaudio2_9redist.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\我的项目\Plugins\Pandora\PixUI\Binaries\Win64\xaudio2_9redist.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\DbgHelp\dbghelp.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\DbgHelp\dbghelp.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\libsndfile\Win64\libsndfile-1.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\libsndfile\Win64\libsndfile-1.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\NVIDIA\NVaftermath\Win64\GFSDK_Aftermath_Lib.x64.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\NVIDIA\NVaftermath\Win64\GFSDK_Aftermath_Lib.x64.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\Oculus\OVRPlugin\OVRPlugin\Win64\OVRPlugin.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\Oculus\OVRPlugin\OVRPlugin\Win64\OVRPlugin.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\Ogg\Win64\VS2015\libogg_64.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\Ogg\Win64\VS2015\libogg_64.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\OpenVR\OpenVRv1_5_17\Win64\openvr_api.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\OpenVR\OpenVRv1_5_17\Win64\openvr_api.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\ApexFrameworkPROFILE_x64.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\ApexFrameworkPROFILE_x64.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\APEX_ClothingPROFILE_x64.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\APEX_ClothingPROFILE_x64.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\APEX_LegacyPROFILE_x64.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\APEX_LegacyPROFILE_x64.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\NvClothPROFILE_x64.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\NvClothPROFILE_x64.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\PhysX3CommonPROFILE_x64.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\PhysX3CommonPROFILE_x64.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\PhysX3CookingPROFILE_x64.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\PhysX3CookingPROFILE_x64.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\PhysX3PROFILE_x64.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\PhysX3PROFILE_x64.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\PxFoundationPROFILE_x64.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\PxFoundationPROFILE_x64.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\PxPvdSDKPROFILE_x64.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\PhysX3\Win64\VS2015\PxPvdSDKPROFILE_x64.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\Vorbis\Win64\VS2015\libvorbisfile_64.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\Vorbis\Win64\VS2015\libvorbisfile_64.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\Vorbis\Win64\VS2015\libvorbis_64.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\Vorbis\Win64\VS2015\libvorbis_64.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Binaries\ThirdParty\Windows\DirectX\x64\WinPixEventRuntime.dll >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Binaries\ThirdParty\Windows\DirectX\x64\WinPixEventRuntime.dll
D:\我的项目\Saved\StagedBuilds\WindowsNoEditor\Engine\Extras\Redist\en-us\UE4PrereqSetup_x64.exe >-> C:\我的归档目录\MyArchive3\WindowsNoEditor\Engine\Extras\Redist\en-us\UE4PrereqSetup_x64.exe
********** ARCHIVE COMMAND COMPLETED **********
相关推荐
3A是个坏同志7 天前
UE4手动实现billboard效果让物体始终面向相机正面
ue4
致命的邂逅23 天前
UE4游戏查找本地角色数据的方法-SDK
游戏·ue4
北冥没有鱼啊25 天前
UE 材质几个输出向量节点
ue5·游戏引擎·ue4·虚幻·材质
北冥没有鱼啊1 个月前
UE 材质 条纹循环发光
游戏·ue5·游戏引擎·ue4·材质
北冥没有鱼啊2 个月前
UE 滚动提示条材质制作
游戏·ue5·游戏引擎·ue4·虚幻·材质
北冥没有鱼啊2 个月前
UE 使用事件分发器设计程序
游戏·ue5·ue4·游戏开发·虚幻
GR902 个月前
UE4 踩坑记录
ue4
程序猿熊跃晖2 个月前
解决 Unreal Engine 5.2 中服务器目标构建问题:从源码编译到项目配置优化
ue4
Ⅰㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ2 个月前
开篇 - Unlua+VsCode的智能提示、调试
vscode·ue4·智能提示·unlua
吴梓穆3 个月前
UE5学习笔记 FPS游戏制作33 换子弹 动画事件
笔记·学习·ue4