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 **********
相关推荐
Deveuper8 小时前
UE5 UE4 播放视频没有声音解决
ue5·ue4·音视频
小江村儿的文杰11 天前
UE4安卓Gradle工程中的libUE4.so的生成原理
ue4
北冥没有鱼啊17 天前
UE5 射线折射
游戏·ue5·游戏引擎·ue4
Growthofnotes18 天前
UE4_Niagara基础实例—9、使用条带渲染器来制作闪电
ue4
Growthofnotes18 天前
UE4_Niagara基础实例—10、位置事件
ue4
directx3d_beginner18 天前
ue4 .usf抄写记录
ue4
 M͏⁠͏r.D22 天前
UE4 材质学习笔记13(格斯特纳波)
学习·ue4·材质
Growthofnotes22 天前
UE4_Niagara基础实例—8、生成网格体粒子并与角色产生交互
ue4
 M͏⁠͏r.D23 天前
UE4 材质学习笔记11(水波纹着色器/水深度着色器)
学习·ue4·材质
北冥没有鱼啊24 天前
ue5 扇形射线检测和鼠标拖拽物体
游戏·ue5·ue4·游戏开发·虚幻