Commit Graph

168 Commits

Author SHA1 Message Date
Wei Liu
ef7ff3adc8 Fix a crash when generating a patch with a pak larger than 2GB.
#jira none

#rb PJ.Kack
#fyi Mi.Wang

[CL 35953727 by Wei Liu in ue5-main branch]
2024-09-02 07:44:32 -04:00
per larsson
0cd309c18c Enable DiffContainer command from UnrealPak.exe
#rb Paul.Chipchase
#rnx

[CL 35895219 by per larsson in ue5-main branch]
2024-08-29 10:03:37 -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
pj kack
3ad849a688 UnrealPak: When the existing optional .uproject argument is provided first on the commandline, then let UnrealPak use that to set its project directory and override the monolithic engine program directory (Engine/Programs/UnrealPak).
This will make UnrealPak read from and use the project-specific ini files.
This will make UnrealPak write to and use the project-specific Saved directory, e.g. to save the UnrealPak.log file.
In the BuildCookRun/CopyBuildToStagingDirectory scripts always invoke UnrealPak with the .uproject file argument.
Always run UnrealPak itself with -nopak to avoid picking up and mounting any existing pak files in the project directory.

Motivation: When UnrealPak is run with -compressionEnableDDC it needs to use the project's ddc configuration instead of the engine's ddc configuration.

Note: When UnrealPak is invoked without the project argument it will still use the default program directory, and there is no change in behavior when e.g. manually executing inspection commands like list, extract and describe.
Note: All important packaging options are already passed on command line from BuildCookRun/CopyBuildToStagingDirectory, so from that perspective the change should be low risk, but in the future there is a possibility to reduce the number of command line options and rely on the project configuration instead.

#rb per.larsson
#tests identical binary output

[CL 34266589 by pj kack in ue5-main branch]
2024-06-11 03:37:13 -04:00
graeme thornton
6ccbb2644f [Backout] - CL34089536
[FYI] PJ.Kack
Original CL Desc
-----------------------------------------------------------------
UnrealPak: When the existing optional .uproject argument is provided first on the commandline, then let UnrealPak use that to set its project directory and override the monolithic engine program directory (Engine/Programs/UnrealPak).
This will make UnrealPak read from and use the project-specific ini files.
This will make UnrealPak write to and use the project-specific Saved directory, e.g. to save the UnrealPak.log file.
In the BuildCookRun/CopyBuildToStagingDirectory scripts always invoke UnrealPak with the .uproject file argument.

Motivation: When UnrealPak is run with -compressionEnableDDC it needs to use the project's ddc configuration instead of the engine's ddc configuration.

Note: When UnrealPak is invoked without the project argument it will still use the default program directory, and there is no change in behavior when e.g. manually executing inspection commands like list, extract and describe.
Note: All important packaging options are already passed on command line from BuildCookRun/CopyBuildToStagingDirectory, so from that perspective the change should be low risk, but in the future there is a possibility to reduce the number of command line options and rely on the project configuration instead.

#rb per.larsson
#tests identical binary output

[CL 34107564 by graeme thornton in ue5-main branch]
2024-06-04 17:23:55 -04:00
pj kack
9e01741303 UnrealPak: When the existing optional .uproject argument is provided first on the commandline, then let UnrealPak use that to set its project directory and override the monolithic engine program directory (Engine/Programs/UnrealPak).
This will make UnrealPak read from and use the project-specific ini files.
This will make UnrealPak write to and use the project-specific Saved directory, e.g. to save the UnrealPak.log file.
In the BuildCookRun/CopyBuildToStagingDirectory scripts always invoke UnrealPak with the .uproject file argument.

Motivation: When UnrealPak is run with -compressionEnableDDC it needs to use the project's ddc configuration instead of the engine's ddc configuration.

Note: When UnrealPak is invoked without the project argument it will still use the default program directory, and there is no change in behavior when e.g. manually executing inspection commands like list, extract and describe.
Note: All important packaging options are already passed on command line from BuildCookRun/CopyBuildToStagingDirectory, so from that perspective the change should be low risk, but in the future there is a possibility to reduce the number of command line options and rely on the project configuration instead.

#rb per.larsson
#tests identical binary output

[CL 34089539 by pj kack in ue5-main branch]
2024-06-04 06:12:40 -04:00
steve robb
92463911c8 Fixed mismatched printf format arguments.
#rb brandon.schaefer

[CL 33264801 by steve robb in ue5-main branch]
2024-04-26 11:02:47 -04:00
pj kack
6e34fe7b78 UnrealPak: Restore display logging of mount point for pak list command (as before 24117138).
Add the filename for additional context.

#rb Sebastian.Thomeczek
#rnx

[CL 33225082 by pj kack in ue5-main branch]
2024-04-25 04:00:00 -04:00
martin ridgers
dea833b91e Removed IAS upload from UnrealPak. It is now exposed via the IasTool program.
#rb per.larsson
#rnx

[CL 31676621 by martin ridgers in ue5-main branch]
2024-02-21 03:39:50 -05:00
steve robb
f8d47335a4 Replaced RemoveAt(N, 1, EAllowShrinking::*) with RemoveAt(N, EAllowShrinking::*).
[CL 31626444 by steve robb in ue5-main branch]
2024-02-19 16:51:58 -05:00
josh adams
08e95db7d2 Fixed the warning that caused the original backout
[Backout] - CL31459949
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL31443953
[FYI] Josh.Adams
Original CL Desc
-----------------------------------------------------------------
Phase 1 of the FConfigBranch changes:
Introduced FConfigBranch which maintains logic and data for each individual branch of GConfig (Engine, Game, Input, DeviceProfiles, etc), with static and dynamic layers
Introduced FConfigCommandStream which is how each layer is loaded, and Apply'd to an FConfigFile
Added a new way of making a "diff" of in-memory vs what's loaded, which creates an FConfigCommandStream that can be re-applied (more useful in Phase 2, see below)
Expectation is no visible differences from before this change, as it's mostly internal data structure changes
Phase 2 is where the functional changes will happen, with the dynamic layers being able to be removed at runtime, and the state of GConfig is maintained as expdected
The editor does maintain full state of where config values come from, so the "getini" command in the editor will show a lot more information now
Runtime will not keep any state, so unloading dynamic layers is not supported by default (running with -ConfigReplayMethod=1 or 2 will allow for it, but will use more memory)

#rb david.harvey
#jira UE-201472

[CL 31470013 by josh adams in ue5-main branch]
2024-02-14 08:59:25 -05:00
bob tellez
005a9bf20c [Backout] - CL31443953
[FYI] Josh.Adams
Original CL Desc
-----------------------------------------------------------------
Phase 1 of the FConfigBranch changes:
Introduced FConfigBranch which maintains logic and data for each individual branch of GConfig (Engine, Game, Input, DeviceProfiles, etc), with static and dynamic layers
Introduced FConfigCommandStream which is how each layer is loaded, and Apply'd to an FConfigFile
Added a new way of making a "diff" of in-memory vs what's loaded, which creates an FConfigCommandStream that can be re-applied (more useful in Phase 2, see below)
Expectation is no visible differences from before this change, as it's mostly internal data structure changes
Phase 2 is where the functional changes will happen, with the dynamic layers being able to be removed at runtime, and the state of GConfig is maintained as expdected
The editor does maintain full state of where config values come from, so the "getini" command in the editor will show a lot more information now
Runtime will not keep any state, so unloading dynamic layers is not supported by default (running with -ConfigReplayMethod=1 or 2 will allow for it, but will use more memory)

#rb david.harvey
#jira UE-201472

[CL 31459959 by bob tellez in ue5-main branch]
2024-02-13 23:13:53 -05:00
josh adams
bf1468e4b0 Phase 1 of the FConfigBranch changes:
Introduced FConfigBranch which maintains logic and data for each individual branch of GConfig (Engine, Game, Input, DeviceProfiles, etc), with static and dynamic layers
Introduced FConfigCommandStream which is how each layer is loaded, and Apply'd to an FConfigFile
Added a new way of making a "diff" of in-memory vs what's loaded, which creates an FConfigCommandStream that can be re-applied (more useful in Phase 2, see below)
Expectation is no visible differences from before this change, as it's mostly internal data structure changes
Phase 2 is where the functional changes will happen, with the dynamic layers being able to be removed at runtime, and the state of GConfig is maintained as expdected
The editor does maintain full state of where config values come from, so the "getini" command in the editor will show a lot more information now
Runtime will not keep any state, so unloading dynamic layers is not supported by default (running with -ConfigReplayMethod=1 or 2 will allow for it, but will use more memory)

#rb david.harvey
#jira UE-201472

[CL 31444162 by josh adams in ue5-main branch]
2024-02-13 15:40:54 -05:00
martin ridgers
edf615ef53 Lifted IAS' TOC downloading out from UnrealPak
#rb paul.chipchase
#rnx

[CL 31167977 by martin ridgers in ue5-main branch]
2024-02-05 04:51:45 -05:00
martin ridgers
f2c6bc31dd Moved ListTocs IAS command from UnrealPak to IasTool
#rb paul.chipchase
#rnx

[CL 31081020 by martin ridgers in ue5-main branch]
2024-02-01 04:13:35 -05:00
martin ridgers
47652f3872 Moved non-IAS commands out of the "IAS Commands" paragraph
#rb paul.chipchase
#rnx

[CL 31042576 by martin ridgers in ue5-main branch]
2024-01-31 07:34:22 -05:00
steve robb
6d5b974842 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30735396 by steve robb in ue5-main branch]
2024-01-19 19:41:56 -05:00
per larsson
f1db8a6191 UnrealPak - dump bulk meta data to Json or Csv
Writes a package bulk data instances with offset, size and flags to the specified destination file.

Usage:
UnrealPak.exe -ListContainerBulkData=<Path/To/PakFolder/OrContainerFile> -cryptokeys=<Path> -Out=<Filename[.json|.csv]>

#rb Paul.Chipchase

[CL 30073803 by per larsson in ue5-main branch]
2023-12-04 04:27:29 -05:00
paul chipchase
4220a35232 Remove endpoint priming option (-PrimeEndPoint) from UnrealPak
#rb Per.Larsson
#rnx

- Although this priming did help in certain cases it is not really robust enough for most CDN implementations so removing it so that people do not try to use it thinking that it will help them.

[CL 30073410 by paul chipchase in ue5-main branch]
2023-12-04 03:21:13 -05:00
per larsson
7eb089a219 UnrealPak - expose -List option for dumping container file info to csv
#rb Martin.Ridgers

[CL 30037407 by per larsson in ue5-main branch]
2023-12-01 07:26:40 -05:00
per larsson
dbf2cf9839 IAS - list on demand TOC file(s)
A new command for listing on demand TOC files from an S3 compatible endpoint.
Usage: UnrealPak.exe -ListTocs -Region="us-east-1" -BucketPath=<some/bucket/path/> -CredentialsFile="s3_credentials.txt"

- write json file with -Json="Path/To/File.json".
- dump a specific toc: -TocKey=<IoHash>
- dump a specific build version: -BuildVersion=<Version>
- dump a specific build version and platform: -BuildVersion=<Version> -TargetPlatform=<Platform>
- dump chunk object keys with -ChunkKeys=<path/To/File.json>
- fetch a specific toc from a public CDN: -TocUrl="http://some.cdn.net/bd22076ca12bfc6feb982ffb064d18f28156606c.iochunktoc"

#rb Martin.Ridgers, Paul.Chipchase
#rnx

[CL 29136404 by per larsson in ue5-main branch]
2023-10-26 11:17:20 -04:00
josh adams
aeb5cb1347 - Restoring a backout after fixing the issue that causes the backout
[Backout] - CL27745134
[FYI] stan.hormell
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL27731288 - CIS / Build Errors
[FYI] Josh.Adams
Original CL Desc
-----------------------------------------------------------------
- Deprecated GetSectionPrivate and FindOrAddSection, and accessors in FConfigFile that could return a non-const FConfigSection (this is so we can track modifications to config values)
- Added AddToSection, RemoveKeyFromSection, etc to replace directly accessing a FConfigSection
- Fixed up Epic code for the deprecations (at least the majority, some projects that aren't built by Horde presubmit may have some that we will address going forward)
#jira UE-194955
#rb david.harvey and various others

[CL 27923017 by josh adams in ue5-main branch]
2023-09-15 13:39:02 -04:00
stan hormell
37bad2d07b [Backout] - CL27731288 - CIS / Build Errors
[FYI] Josh.Adams
Original CL Desc
-----------------------------------------------------------------
- Deprecated GetSectionPrivate and FindOrAddSection, and accessors in FConfigFile that could return a non-const FConfigSection (this is so we can track modifications to config values)
- Added AddToSection, RemoveKeyFromSection, etc to replace directly accessing a FConfigSection
- Fixed up Epic code for the deprecations (at least the majority, some projects that aren't built by Horde presubmit may have some that we will address going forward)
#jira UE-194955
#rb david.harvey and various others

[CL 27745141 by stan hormell in ue5-main branch]
2023-09-10 22:58:21 -04:00
josh adams
a8a9a0b759 - Deprecated GetSectionPrivate and FindOrAddSection, and accessors in FConfigFile that could return a non-const FConfigSection (this is so we can track modifications to config values)
- Added AddToSection, RemoveKeyFromSection, etc to replace directly accessing a FConfigSection
- Fixed up Epic code for the deprecations (at least the majority, some projects that aren't built by Horde presubmit may have some that we will address going forward)
#jira UE-194955
#rb david.harvey and various others

[CL 27731364 by josh adams in ue5-main branch]
2023-09-08 17:58:55 -04:00
paul chipchase
a9e7ca0ec2 Improve the 'PrimeEndPoint' command to run many times faster and add additional options.
#rb Per.Larsson
#rnx

- Moved the priming code to it's own code files.
- Priming no longer uses FOnDemandIoBackend but manages its own requests.
- Bumped up the number of connections to the largest supported by FEventLoop (63) to speed up the priming as much as possible.
- Added additional cmdline options although -PrimeEndPoint is still required:
-- '-PrimeAll' will cause all available CDNs to be primed.
-- '-PrimeUrl=' will override the CDN url with the one provided.
--- '-List' will print all of the available CDN urls to screen along with the average latency to it.
-- '-Help' prints help on the new commands to the screen.
- Fix minor bug where UnrealPak was returning none zero for success and zero for error cases.
- Automatically call ::ResolveDeferredEndpoints as part of FDistributionEndpoints::Flush if needed. Failure to do so can lead to flush waiting forever on work that has never been initiated.

[CL 27514497 by paul chipchase in ue5-main branch]
2023-08-31 04:08:32 -04:00