Commit Graph

155 Commits

Author SHA1 Message Date
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
paul chipchase
935b554612 Add a new cmdline option to UnrealPak allowing all IAS content to be primed on an endpoint, so that testers can have the same experience as an end users.
#rb Per.Larsson
#rnx

### New Command
- Run UnrealPak.exe with the commandline "-PrimeEndPoint=ABC" where ABC is a path to a IoStoreOnDemand.ini containing the info about the end point to prime.
- The command will mount the correct backend, connect to the end point, download the utoc files there and then attempt to download each chunk present so that they will be cached by the CDN endpoint.
- The command does not use the IAS filecache and should not affect the state of the local machine.
- We also make use of the existing IAS code, so this path can also be used for profiling when the IAS requests are saturated etc.

### Code Changes

- The code for parsing the ini file in FIoStoreOnDemandModule::StartupModule has been moved to common utility code so that it can be reused.

[CL 27026561 by paul chipchase in ue5-main branch]
2023-08-11 09:49:46 -04:00
per larsson
24d9d8349c IAS - support for downloading on demand container file(s) with UnrealPak
Usage: UnrealPak.exe -Download=<RemoteTocPath> -Directory=<LocalPath> -ServiceUrl=<URL> -Bucket=<BucketName>

#rb none
#rnx

[CL 26307209 by per larsson in ue5-main branch]
2023-06-29 05:28:06 -04:00
per larsson
3bed8ef537 I/O - support for uploading on demand I/O store containers to S3 with UnrealPak
- added support for uploading containers marked as on demand directly from UnrealPak.exe
- removed C# based upload logic from automation scripts
- removed on demand I/O store writer since this change reads chunks directly from container files instead of loose files

Example usage:
UnrealPak.exe -Upload=<ContainerPathOrWildcard> -ServiceUrl=<URL> -Bucket=<BucketName> -AccessKey=<Key> -SecretKey=<Key>

Read credentials from an AWS key chain file with the following command line:
-CredentialsFile=<Path> -CredentialsFileKeyName=<EntryName>

Specify -KeepUploadedContainers to prevent UnrealPak to delete on demand containers after the upload has been completed.
Specify -BucketPrefix=<Path> to upload chunks to a specific sub directory within the bucket.

#rb none

[CL 26115169 by per larsson in ue5-main branch]
2023-06-20 04:21:22 -04:00
paul chipchase
735fef839d Fix potential threading crash in UnrealPak
#rb Per.Larsson
#jira UE-186965
#preflight 6470b4a9f3773f755083fa2c

- The compressor stat arrays belonging to FOutputPakFile were being initialized right after async pakfile work has been scheduled. In rare cases the scheduled work could run before the initialization was completed and we would attempt to write out stats into uninitialized memory.
- We now make sure that the stat arrays are initialized before any work can be scheduled.
- I did a quick pass to check for similar patterns but couldn't find any.

[CL 25661995 by paul chipchase in ue5-main branch]
2023-05-29 02:46:04 -04:00
Per Larsson
2366c567d6 PAK - flush pending file writers before exiting UnrealPak
#jira UE-179925
#rb CarlMagnus.Nordin
#preflight 642bbaf8da7f95837033d7c6

[CL 24907513 by Per Larsson in ue5-main branch]
2023-04-04 04:15:55 -04:00
justin marcus
29f370f3b8 Check for IO errors when signing paks.
Fix pak files not being signed.


[REVIEW] [at]Graeme.Thornton [at]Bart.Hawthorne

[CL 24906547 by justin marcus in ue5-main branch]
2023-04-03 23:31:44 -04:00
Andriy Tylychko
321c94194f removed core delegates deprecated in 5.2. while it's a bit too early for a normal deprecation removal, these delegates are known race conditions so it's rather an urgency
#preflight 641ddae9973e609670e2f347
#rb francis.hurteau

[CL 24805272 by Andriy Tylychko in ue5-main branch]
2023-03-27 13:25:52 -04:00
pj kack
eb2c730a89 UnrealPak: Add -csv parameter to create pak and create ucas commands to list all the chunks.
Output is the same as when executing the -list command separately.
Running with -csv=<dir> will create one <pakchunkfilename>.pak.csv file per generated pak and one <pakchunkfilename>.utoc.csv file per generated container.
Running with -csv=<file> will create one single <file>.pak.csv for all paks and one <file>.utoc.csv for all containers.

Details:
The container output (the big set of data) is generated based on in-memory writer TOC data once the IoStoreWriters have been finalized.
The pak output (smaller set of data) is generated using the existing list command and loads the newly generated files from disk.
Cleanup the remains of three obsolete csv output features for containers (-csvoutput, -writefinalorder and OUTPUT_CHUNKID_DIRECTORY).
Optimize container output generation by extending FIoStoreTocChunkInfo with OffsetOnDisk and NumCompressedBlocks filled directly by EnumerateChunks.
Add a ChunkIdToFileNameMap to FCookedPackageStore.
Use the FCookedPackageStore to output the actual package ids and package names (this is currently broken when running -list as a separate command).

#rb carlmagnus.nordin
#rnx
#preflight 63e5eacb98775169f8dea431

[CL 24118941 by pj kack in ue5-main branch]
2023-02-10 10:13:22 -05:00
dan thompson
fbd5b69cbc Tidy up pak log spam a bit when making 1000s of pak files.
#preflight 63e2c7a8c11233cdcaaa8e4a
#rb pj.kack

[CL 24066993 by dan thompson in ue5-main branch]
2023-02-08 00:25:30 -05:00
pj kack
5450132470 UnrealPak: Improve diffutils
Add support for diffing pak directories for pak diff.
Add support for different cryptokeys for pak diff and legacy iostore diff.

#jira UE-175144
#rb carlmagnus.nordin
#rnx
#preflight 63d9259e7a39a18021d4f997

[CL 23945218 by pj kack in ue5-main branch]
2023-02-01 03:39:07 -05:00
Francis Hurteau
9dfe27ab41 Truncation warning fixes for multiple core modules:
CookOnTheFly, CookOnTheFlyNetServer, PakFileUtilities, PakFile

#jira UE-166274
#rb PJ.Kack
#preflight 63c041f01a06fc61057115b7

[CL 23666183 by Francis Hurteau in ue5-main branch]
2023-01-12 13:17:30 -05:00
carlmagnus nordin
434141b1f8 UnrealPak: Fix check triggering for modifying compression tasks array while iterating over it
#jira UE-172561
#preflight 6398867d2960b73220f611d5
#rb paul.chipchase

[CL 23514303 by carlmagnus nordin in ue5-main branch]
2022-12-14 13:19:01 -05:00
pj kack
8c69b411f5 UnrealPak: Fix unavoidable crash when using -repack (fallout from cl 18836432).
Let CollectFilesToAdd fallback to the old logic of using the source file name when the FPakInputPair.Dest specifies a directory, i.e. is ending with a "/".
Let ExtractFilesFromPak start using destination file names just as ProcessCommandLine reading from response files is doing so that -Extract with -responsefile will generate the same format as UAT with file names.
Remove dead code in ProcessPakFileSpecificCommandLine.

#jira UE-171678
#rb carlmagnus.nordin
#lockdown mark.lintott
#preflight 6390679d1776b8c21cf42bac

[CL 23427029 by pj kack in ue5-main branch]
2022-12-07 07:17:57 -05:00