PAK blacklist file deprecated in favor of DefaultPakFileRules.ini

Thanks for the information. After first trying the PakBlacklist rules without realizing they are deprecated and ignored during packaging, and then after a couple more hours of trial and error, I finally managed to get the exclusion list working.

Results: Saved about 3MB in final shipping package size, mostly from the excluded Slate image files. Not too significant, but at least it works.

How to get it to work:

  1. Create the file DefaultPakFileRules.ini in your [Project]/Config directory.

  2. Paste the following contents into the file (customize as necessary):

; These rules are applied in order, the first rule that applies per file is taken and no others are evaluated
; [SectionName]
; bOverrideChunkManifest=false 		; If true this allows overriding assignments from the cooker
; bExcludeFromPaks=false 			; If true this removes entirely, cannot coexist with overridepaks
; OverridePaks="pakchunk1" 			; If set this will override pak list, comma separated
; Platforms="iOS,Android"			; If set this rule will only apply to these platforms
; Targets="Shipping,Test"			; If set this rule will only apply to these configurations
; bOnlyChunkedBuilds=true			; If set this rule will only apply to chunked builds
; bOnlyNonChunkedBuilds=true		; If set this rule will only apply to non-chunked builds
; +Files=".../*FileMask*.*"			; List of file masks to apply to, using the C# FileFilter class

[ExcludeDefault]
;Platforms="Windows,Win64" ; Note: Win64 doesn't seem to be recognized in UE5.1.1
;Platforms="Windows"
;For now commenting out above Platform designation so that exclusion rules apply to all platforms
Targets="Shipping,Development,Debug"
bExcludeFromPaks=true
bOverrideChunkManifest=true
+Files=".../Engine/Content/ArtTools/*"
+Files=".../Engine/Content/EditorLandscapeResources/*"
+Files=".../Engine/Content/EditorMeshes/ColorCalibrator/*"
+Files=".../Engine/Content/EngineSounds/*"
+Files=".../Engine/Content/Maps/*"
+Files=".../Engine/Content/MobileResources/*"
+Files=".../Engine/Content/Slate/Automation/*"
+Files=".../Engine/Content/Slate/Common/*"
+Files=".../Engine/Content/Slate/CrashTracker/*"
+Files=".../Engine/Content/Slate/Docking/*"
+Files=".../Engine/Content/Slate/Fonts/DroidSansFallback.ttf"
+Files=".../Engine/Content/Slate/Icons/*"
+Files=".../Engine/Content/Slate/MessageLog/*"
+Files=".../Engine/Content/Slate/Old/*"
+Files=".../Engine/Content/Slate/Testing/*"
+Files=".../Engine/Content/Slate/Tutorials/*"
;+Files=".../Engine/Content/Slate/Checkerboard.png" ; don't exclude - used in the default slate brush. excluding this turned one of my UI transition screens white instead of black in packaged version
+Files=".../Engine/Content/Tutorial/*"
+Files=".../Engine/Content/VREditor/*"
+Files=".../Engine/Content/EditorMeshes/Camera/SM_CraneRig_Arm.*"
+Files=".../Engine/Content/EditorMeshes/Camera/SM_CraneRig_Base.*"
+Files=".../Engine/Content/EditorMeshes/Camera/SM_CraneRig_Body.*"
+Files=".../Engine/Content/EditorMeshes/Camera/SM_CraneRig_Mount.*"
+Files=".../Engine/Content/EditorMeshes/Camera/SM_RailRig_Mount.*"
+Files=".../Engine/Content/EditorMeshes/Camera/SM_RailRig_Track.*"
+Files=".../Engine/Content/EditorMaterials/MAT_Groups_Toggle.*"
+Files=".../Engine/Content/EditorMaterials/MAT_Groups_Visibility.*"
+Files=".../Engine/Content/EditorMaterials/PreviewShadowIndicator.*"
+Files=".../Engine/Content/EditorMaterials/PreviewShadowIndicatorMaterial.*"
+Files=".../Engine/Content/EditorMaterials/MatineeGroups/MAT_ColorTrack.*"
+Files=".../Engine/Content/EditorMaterials/MatineeGroups/MAT_Groups_Anim.*"
+Files=".../Engine/Content/EditorMaterials/MatineeGroups/MAT_Groups_AudioMaster.*"
+Files=".../Engine/Content/EditorMaterials/MatineeGroups/MAT_Groups_Director.*"
+Files=".../Engine/Content/EditorMaterials/MatineeGroups/MAT_Groups_Event.*"
+Files=".../Engine/Content/EditorMaterials/MatineeGroups/MAT_Groups_Fade.*"
+Files=".../Engine/Content/EditorMaterials/MatineeGroups/MAT_Groups_Float.*"
+Files=".../Engine/Content/EditorMaterials/MatineeGroups/MAT_Groups_Move.*"
+Files=".../Engine/Content/EditorMaterials/MatineeGroups/MAT_Groups_Slomo.*"
+Files=".../Engine/Content/EditorMaterials/MatineeGroups/MAT_Groups_Sound.*"
+Files=".../Engine/Content/EditorMaterials/MatineeGroups/MAT_Groups_Vector.*"
+Files=".../Engine/Content/EditorMaterials/ParticleSystems/PSysThumbnail_NoImage.*"
+Files=".../Engine/Content/EditorMaterials/ParticleSystems/PSysThumbnail_OOD.*"
+Files=".../Engine/Content/EditorMaterials/Camera/CineMat.*"
+Files=".../Engine/Content/EditorMaterials/Camera/MI_CineMat_Rig.*"
  1. Package your project and it should apply. A lot of rows of “UATHelper: Packaging (Windows): Excluding …(file)…” should appear in your Output Log window if it was successful.

Other Notes:

  • The Platform identifier “Win64” doesn’t seem to work in UE5.1.1, but “Windows” works. I commented out the Platforms row so that the exclusion rules will apply to all platforms.
  • The Section name (ExcludeDefault above) is arbitrary and can be changed to anything.
4 Likes