You can put the pbo.json
file into the PBO content root directory when you pack a PBO via the PBO Manager. The PBO Manager reads the PBO headers and the compression rules from the pbo.json
.
An example pbo.json
:
{
"headers": [{
"name": "prefix",
"value": "my-addon"
}, {
"name": "version",
"value": "1.0.0"
}, {
"name": "product",
"value": "my-mod"
}],
"compress": {
"include": ["\\.txt$", "\\.sqf$", "\\.ext"],
"exclude": ["^description.ext$"]
}
}
The collection of the headers the PBO file should have.
Type: array
Required: no
Default: []
The name of the header.
Type: string
Required: yes
The value of the header.
Type: string
Required: no
Default: ""
The rules of compressing the contents of the PBO file.
Which files to compress.
Type: array
of regular expressions. (The regular expressions will run against the relative file names with forward slashes as separators, e.g. scripts/script1.sqf
)
Required: no
Which of the included files to exclude from compression. Use this to "include all then exclude a couple" scenario.
Type: array
of regular expressions
Required: no
There are lots of the services for regular expression debugging, such as https://regex101.com
What it will match | Example files | RegEx |
---|---|---|
All the .sqf files. |
my-script.sqf or Scripts/script.sqf |
\\.sqf$ |
All the .sqf files in the Scripts root foler. |
Scripts/Client/Alpha/fn_run.sqf |
^scripts\/.+\\.sqf$ |
All the .sqf files in the Alpha subfolders. |
Scripts/Client/Alpha/initClient.sqf or Scripts/Server/Alpha/initServer.sqf |
\/.+\/Alpha\/.+\\.sqf$ |
The decription.ext file in the root. |
description.ext |
^description.ext$ |