PAK blacklist file deprecated in favor of DefaultPakFileRules.ini

Hello,

I have been using PakBlacklist-Shipping.txt file for excluding folders during cooking, for some time.

Today, I have noticed the following message during cooking. (Using Unreal Editor v4.25.4)


Applying PAK blacklist file [Project]\Build\Win64\PakBlacklist-Shipping.txt. This is deprecated in favor of DefaultPakFileRules.ini

I am afraid, there seems to be no official documentation for **DefaultPakFileRules.ini **file.

What is the proper way of including/excluding folders during cooking using this method? Is there any information about DefaultPakFileRules.ini file format and how to use it?

Hi,

I suppose this is too late for you to help, but maybe this will help others.

There is a documentation about “DefaultPakFileRules.ini” inside “BasePakFileRules.ini” file.

“BasePakFileRules.ini” is located inside your UE4 Engine folder (“Engine\Config\BasePakFileRules.ini”).

It contains a basic explanation on how to use it.

In order to use it in your project you need to do several steps:

  • Create the “DefaultPakFileRules.ini” config file in you project Config folder (you can just copy and rename “BasePakFileRules.ini”)

  • Keep the [ExcludeContentForMobile] section (I do not know about any other section names for this config file, I suppose you will need to dig into the source code, maybe CopyBuildToStagingDirectory.cs will help you)

  • Specify the “Platforms” key (even “Win64” have worked so far)

  • Specify the “Targets” key (Shipping, Debug, Development, etc)

  • I suppose you should keep “bExcludeFromPaks=true” (it depends on your setup. The “Pak” containter is the one you specify in the package settings)

  • Add +Files to exclude files. It’s using Regex, so for example :

    • +Files=“…/Content/Blueprints/Debug/*” will exclude all files with “<anything>/Content/Blueprints/Debug/<anything>” in their filepath (… and * means any symbol)

5 Likes

Hi @Araxnid,

Thank you very much for pointing out the “BasePakFileRules.ini” file inside the engine folder. I’ll certainly check that out.

@Araxnid @matahari
hi, can you please have a look at my application and see if i’m doing this correctly?
When I use this, it comes with the message of
UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Excluding config file [drive]:\[folder]\[folder]\Unreal\[project]\Config\DefaultPakFileRules.ini and UATHelper: Packaging (Android (Multi:ASTC,DXT,ETC2)): Staging with more than one target, PakFileRules may apply too many rules!

Also, should i be doing something like

[ExcludeContentForMobile]
; Exclude specific large textures on mobile platforms, this was moved from CopyBuildToStagingDirectory.cs
; This can be added to in a game's DefaultPakFileRules.ini by using the same sections, and new sections can be added
; To remove this rule, use !Files to clear the list of file paths
Platforms="Android,iOS,tvOS"
Targets="Shipping,Debug,Development"
bExcludeFromPaks=true
bOverrideChunkManifest=true
:[LIST=1]
+Files=".../Engine/Content/EngineMaterials/DefaultBloomKernel.*"
+Files=".../Engine/Content/Fonts/*"
+Files=".../Engine/Content/Common/*"
[/LIST]

OR

[ExcludeContentForMobile]
; Exclude specific large textures on mobile platforms, this was moved from CopyBuildToStagingDirectory.cs
; This can be added to in a game's DefaultPakFileRules.ini by using the same sections, and new sections can be added
; To remove this rule, use !Files to clear the list of file paths
Platforms="Android,iOS,tvOS"
Targets="Shipping,Debug,Development"
bExcludeFromPaks=true
bOverrideChunkManifest=true
+Files=".../Engine/Content/EngineMaterials/DefaultBloomKernel.*"
+Files=".../Engine/Content/Fonts/*"
+Files=".../Engine/Content/Common/*"

If you could please reply, that would help me out of this problem with which I’ve been stuck for almost 2 weeks now.

Thanks!