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 **********
相关推荐
Growthofnotes3 天前
UE4_后期处理六—夜视仪、扫描线
ue4
北冥没有鱼啊5 天前
UE5 贝塞尔曲线导弹
游戏·ue5·游戏引擎·ue4·虚幻
北冥没有鱼啊5 天前
ue5 伤害插件
游戏·ue5·ue4·游戏开发·虚幻
EdSheeran乀6 天前
虚幻中的c++(持续更新)
开发语言·c++·ue5·游戏引擎·ue4·虚幻
北冥没有鱼啊8 天前
ue5 AI追角色后失去目标解决办法
游戏·ue5·游戏引擎·ue4·虚幻
Growthofnotes8 天前
UE4_后期处理_后期处理材质四—场景物体描边
ue4·材质
Growthofnotes9 天前
UE4_后期处理_后期处理材质及后期处理体积二
ue4·材质
Growthofnotes13 天前
UE4_地形_悬崖拉伸的解决
ue4
海码00716 天前
【UE 编译】UE C++工程的编译流程、与C++编译的区别
开发语言·c++·ue5·ue4·虚幻