Commit Graph

1634 Commits

Author SHA1 Message Date
james singer
cec61abd1a Fix an issue with chunked builds related to incorrect quoting of path
#jira UE-206734
[REVIEW] [at]zack.neyland
#rb zack.neyland

[CL 36758644 by james singer in 5.5 branch]
2024-10-01 19:40:59 -04:00
ben marsh
595309196c Merging NET 8 upgrades from Main.
[CL 36755991 by ben marsh in 5.5 branch]
2024-10-01 19:12:37 -04:00
paul chipchase
6e7f255861 Add a new feature allowing bulkdata cooked output to be split into smaller files to help with data organization and patching efforts.
#rb Per.Larsson, Pere.Rifa
#jira UE-222974

- To enable the feature call FBulkData::SetCookedIndex with a FBulkDataCookedIndex set to a value between 1 - 255. Zero is currently reserved as the default/off state and can be quickly accessed via FBulkDataCookedIndex::Default.
-- Note that we might change the default value in the future, the main reason to keep it as zero for now is that it means FChunkId values will remain unchanged for bulkdata files not using the feature.
- When a bulkdata object has a cooked index it will output to a file with that value based on the following format  <packagename>.CookedIndex.<extension> so a normal bulkdata payload with a cooked index of 5 would end up writing to <packagename>.005.ubulk.
-- This allows the calling systems to control which bulkdata payloads go to which sub files.
- We currently do not support memory mapped payloads or payloads with the duplicate non optional flags. Support and testing for this will be added later.
- Tested saving/editing/loading packages with bulkdata in the editor (vector fields), build/cook/run normal builds, build/cook/run with feature enabled then running the new code with data produced from non modified code and running non modified exe on data generated with the new code.

### IPackageResourceManager
- Added overloads for most methods that take EPackageSegment that also take a FBulkDataCookedIndex and deprecated the older versions.
- Not all methods have been ported over, just the ones I could test but the rest will need the same treatment at some point.

### FLinkerSave
- Now stores each set of bulkdata, optional bulkdata and memory mapped payloads in separate archives, one per cooked index.
- Added a method ::HasCookedIndexBulkData that returns if any of the normal bulkdata payloads contain a non default cooked index. This is used for some paranoid checks when saving packages to the workspace domain.

[CL 36754477 by paul chipchase in 5.5 branch]
2024-10-01 18:59:56 -04:00
jeremie roy
b19011be77 Add automation script to create a LiveLinkHub installed build.
You can pass -set:WithVendorPlugins to generate a build with vendor plugins.

Add parameter to the BuildPlugin command to allow outputting the build artifacts in a subdir named after the plugin.


#rb zach.brockway

[CL 36390746 by jeremie roy in 5.5 branch]
2024-09-18 10:33:30 -04:00
michael kirzinger
0ca265f5e1 Update UAT to have the same default value for n.VerifyPeer as UE. Fixes cacert.pem not being staged when n.VerifyPeer is not explicitly set to true in Engine.ini
#jira UE-195417
[REVIEW] [at]lorry.li
#rb lorry.li

[CL 36345669 by michael kirzinger in 5.5 branch]
2024-09-17 14:52:49 -04:00
Ryan Hummer
4af2fd066d Updating Dev-Release-5.5 from Main at CL #36144969
#okforversepublic

[CL 36146571 by Ryan Hummer in Dev-5.5 branch]
2024-09-10 10:26:02 -04:00
josh adams
40b23a4c9b - Added ability to read plugins into a config hierarchy, controlled by passing optional IncludePluginsForTargetType param to ConfigCache.ReadHierarchy(), with a TargetType (like Game or Editor).
- Use this in CopyBuildToStagingDIrectory when reading the Packaging settings when staging. This allows plugins to add files/directories to stage without needing to modify every project.
- Added a ConfigTester Turnkey command that can help test C# inis programmatically. Currently need to pass in these 3 params on commandline, it doesn't ask for them: -Branch=Engine -Section=SomeSection -Key=SomeKey

#rb David.Harvey

[CL 35927236 by josh adams in ue5-main branch]
2024-08-30 11:05:34 -04:00
joe kirchoff
64e020fed0 Fix staging an application under the restricted directory
#rnx
#jira UE-118865

[CL 35742384 by joe kirchoff in ue5-main branch]
2024-08-22 11:34:48 -04:00
marc audy
ac0ec29059 Add support for a new type of Restricted folder, LimitedAccess
LimitedAccess will allow Plugins and Programs to be shared externally with a limited subset of users under alternate agreements or for varying purposes without requiring bespoke, problematic, custom permissions that reach in to the NotForLicencees folders or bespoke, problematic, custom distribution processes for providing the code.

[CL 35094184 by marc audy in ue5-main branch]
2024-07-25 16:15:56 -04:00
allan bentham
c00cc02c65 Add #define to enable mmapping of the metalmap file.
This allows the OS to page in areas of the file on demand.
The OS should be able to page it out when under memory pressure.

requires that the on-disk layout of the metalmap file matches the in-memory form.
for mapping to succeed metalmap files stored within pak files must not be compressed.

#rb adam.kinge, carl.lloyd, Chris.Babcock, Peter.Sauerbrei

[CL 35088932 by allan bentham in ue5-main branch]
2024-07-25 14:03:07 -04:00
charles bloom
7da13e27d0 CopyBuildToStagingDirectory : bForceUseLatestOodle option to let you disable OodleCompressDLL per-target-platform
#rb fabian.giesen

[CL 35086563 by charles bloom in ue5-main branch]
2024-07-25 13:00:18 -04:00
zousar shaker
2a6d6a650e Change pak chunk manifests to be relative paths, not absolute. This allows them to be re-used as part of snapshots when the generating machine's root path will differ from the consuming machine's root path.
#rb matt.peters

[CL 35071606 by zousar shaker in ue5-main branch]
2024-07-24 19:01:40 -04:00
zousar shaker
995dc340cb Allow staging to pull chunk manifest info from zenserver directly instead of from files on the filesystem so that zen snapshots (which contain the chunk manifests produced during cook, but not as files on the filesystem) can stage to pak correctly.
#rb per.larsson

[CL 35056945 by zousar shaker in ue5-main branch]
2024-07-24 12:23:49 -04:00
zousar shaker
6a6743fcfd Relocate the TmpPackaging directory so that it is not under Project\Saved\TmpPackaging (regardless of presence of DLC), but is instead in the cook Metadata folder. This ensures that:
1. DLC cooks don't overwrite the TmpPackaging contents of a base game
2. TmpPackaging contents are picked up by zen filesystem and snapshot logic as other metadata

#rb Matt.Peters

[CL 34938925 by zousar shaker in ue5-main branch]
2024-07-19 14:14:45 -04:00
graeme thornton
d34e3ad408 CanCookedFileBeStaged changed to GetStagingTypeForCookedFile in the UAT staging scripts. Allows the staging code to also specify the staging type for a given file rather than just whether it gets staged or not
Adjusted metallib staging to mark those files staged as Non-UFS

#rb josh.adams

[CL 34928474 by graeme thornton in ue5-main branch]
2024-07-19 07:02:07 -04:00
david harvey
716217de44 Add PostStagingFileCopy hook for CustomDeploymentHandler
#jira UE-189295, UE-208522
#rb dave.barrett
#rnx

[CL 34895490 by david harvey in ue5-main branch]
2024-07-18 03:48:26 -04:00
jeanfrancois dube
6ceae4bc8a Fix GatherTextFromAssetsCommandlet to properly handle external actors when keeping alive selected packages.
This happens with Zen loader because of a major difference with the old loader with partial packages; if a package is loaded, then some of its objects are garbage collected but not all, and we reload the same package again, the Zen loader precreates the missing exports in a RF_NeedLoad state, while the old loader would simply just return the initial package with missing exports.
Also backout CL34748964 as this is not required anymore.

#rb danny.couture, Jamie.Dale, Sebastien.Lussier

[CL 34811230 by jeanfrancois dube in ue5-main branch]
2024-07-15 09:09:07 -04:00
jamie dale
33a32fa37d Disable ZenLoader for localization automation while we resolve an actor GC issue
#nrx

[CL 34749596 by jamie dale in ue5-main branch]
2024-06-28 16:56:28 -04:00
paul chipchase
0376e1d8b2 Added command line switch '-ApplyIoStoreOnDemand' to UAT BuildCookRun that will force the IoStoreOnDemand module into the target project and force on additional settings to allow IoStoreOnDemand to work.
#rb Per.Larsson
#jira UE-218584
#rnx

- This is only intended for development and testing IoStoreOnDemand as it allows us to apply it to a project without changing the project files on disk. This should not be used to enable the feature on a project in production.

### Enabling the code module
- When forcing on IoStoreOnDemand, BuildCookRun will pass '-CompileIoStoreOnDemand' to UnrealBuildTool which will set 'bCompileIoStoreOnDemand' to true in the target rules. This in turn will add the 'IoStoreOnDemand' module to the Engine module but only for runtime targets.
- None of this should be used when enabling the feature for a project permanentl, instead just add 'IoStoreOnDemand' module to your project's *.build.cs

### Staging SSL certificates
- IoStoreOnDemand needs access to the engine/project#s SSL certificates at runtime  so we need to stage them, which is done by forcing 'bStageSSLCertificates' to be true during BuildCookRun.
- To do this properly for a project set ini:Engine:[/Script/Engine.NetworkSettings]:n.VerifyPeer=true

### Generate Chunks
- In order for IoStoreOnDemand to work we need to generate chunks (more than one container file) which can be done by forcing ProjectParams.Manifests to true.
- To do this properly for a project set ini:Game:[/Script/UnrealEd.ProjectPackagingSettings]:bGenerateChunks=true

### Pak Rules
- Once chunked builds are enabled IoStoreOnDemand will require at least one PakRule that sets  'bOnDemand' to true. So first we check to see if any rules like this for the existing project and if not we force add one via CreateIoStoreOnDemandPakRules. This rule will include all *.ubulk and *.uptnl files except ones found under a \map\ directory. This is because some level bulkdata files can get too large for IoStoreOnDemand to support so excluding anything under a map directory is a quick and easy way to try and work around that. The end result is that other than map data, pretty much all bulkdata will end up on demand, which is a good stress test for the system but not a great representation on how the system should be used.
- If you are trying to set up rules properly you'd need to consider what data you actually want to stream over the network and what data you want to remain on disk, which would greatly depend on your project set up. One popular choice is to only stream optional (.uptnl) bulkdata and leave the required bulkdata to be found on disk.

### Enabling Persistent Local Storage
- IoStoreOnDemand requires persistent local storage to be set aside for it's caching which may or may not require special set up for a project depending on the target platform. If we detect that the current project has not been set up for persistent local storage we will attempt to enable it for the project during staging.
- To set this up properly you will need to consult the documentation for your target platform and follow the instructions.

[CL 34702097 by paul chipchase in ue5-main branch]
2024-06-27 02:50:43 -04:00
david harvey
46f5c56af0 Fix for custom deployment handlers interfering when multiple platforms are specified on the BuildCookRun command line.
#jira UE-218487
#rb tomasz.obrebski
#rnx

[CL 34674250 by david harvey in ue5-main branch]
2024-06-26 09:50:39 -04:00
zousar shaker
67cdc1bbb8 Fix a crash bug when no cooked output exists and you attempt to stage a build.
[CL 34660943 by zousar shaker in ue5-main branch]
2024-06-25 18:32:06 -04:00
zousar shaker
d9a5936c76 Extract CookedPackageStore and CookMetadataFiles functionality from IoStoreUtilities.cpp into Internal headers that allow use from IoStoreUtilities as well as PakFileUtilities. Allows Pak commands to accept a projectstore file argument and make use of data stored in zenserver.
#rb pj.kack

[CL 34623816 by zousar shaker in ue5-main branch]
2024-06-24 18:16:10 -04:00
zousar shaker
839606e1e9 2nd submit: Incremental step towards being able to stage to both a pak build as well as a nopak (streamng) build from a snapshot entirely stored in zenserver (no loose files on the filesystem except a ue.projectstore file).
Key changes:
- Removed the use of cookedfiles.manifest
- Changed IoStore mode of UnrealPak to  be capable of getting zenserver launch data from either a package store manifest (cbobject, metadata) OR a project store marker file (json)
- Ensured that the UAT and IoStore mode of UnrealPak can launch zenserver reliably by passing along the SponsorProcessId when launching zenserver
- Ensured that shader archives (and their accompanying json metadata files) can be read either as loose files on disk or directly from zenserver if it the data for them is internal to zenserver (ie: they have a valid  chunk id)
Remaining work:
- Pak mode of UnrealPak must be able to launch zenserver and pull data from it.

#rb PJ.Kack

[CL 34565129 by zousar shaker in ue5-main branch]
2024-06-21 11:48:33 -04:00
Ryan Hummer
002a22e3b7 Installed Engine Build tweaks
* Improved BuildGraph Compile task batching for Win64 Tools & Datasmith compiles
* Hookup extra compile args for Linux Compile tasks
* Allow extra args for DDC steps and Feature Packs
* Add an option to compile with or with out PCH for Windows Editor/Game

#rnx
#jira none

[CL 34560160 by Ryan Hummer in ue5-main branch]
2024-06-21 09:21:48 -04:00
ben marsh
f7f6ffc00e AutomationTool: Update BuildCommand to use nullable annotations.
#rnx

[CL 34505995 by ben marsh in ue5-main branch]
2024-06-19 13:31:34 -04:00