Author: Mikero
All Mikero tools 'behave', install, and operate in an identical manner. You are strongly advised to read the General Readme once.
MakePbo is a venerable program that dates back to the origins of OFP's cwc. It maintains full compatibility with those products while creating pbo's for Arma3 (and beyond).
As such, be a little kind when reading the documentation (and some of the idiosyncratic -options). Some of it will not make sense to the context you are trying to achieve, eg making an arma mission or addon.
Makepbo is by no means difficult to use, often simply requiring nothing more than MakePbo NameOfFolder.
Makepbo uses heuristics in examining the folder contents to 'understand' what you're trying to achieve. This makes it easy for both mission makers and addon makers to use Makepbo without having to remember -options. It figures most of it out dependent on context of the folder and what it contains.
But, you can fine tune this simplicity with a wealth of -option over-rides dependent on what you are trying to achieve (compressed files, altered prefix, un-included files, date-stamps, auto conversion of wav), the list goes on... There's chemistry involved, and you are in control.
ALL pbo types are supported by MakePbo: Ranging from ofp-cwc thru to arma3 & vbs lite. Genuine vbs product is only available to vbs employees.
Be aware, immediately that a 'pbo' can have several different extensions. Specifically:
The general case is that MakePbo will decide what extension to use.
A no nonsense auto installer saving you sweat and tears.
Do not run this, or any tool from bis, as administrator.
'Admin' is not what you think it is, it is an alias for 'Microsoft Office Use only'.
Consider yourself warned.
Grab the self installers for these here
MakePbo [+|-options] Full\Path\To\Foldername [destpath and/or pboname[.pbo|ebo|xbo|ifa]]
Options are case insensitive.
Despite the wealth of options available, the most common and generally accurate syntax is
makepbo Full\Path\To\Foldername
Foldername.pbo will be produced in the parent folder of foldername
A
Make an ArmA or ifa, toh, or dayz pbo (default)B
Do not binarise mission.sqm or config.cpp files.(see below)C
Make a CWC pboD
Make a Dayz pbo (currently same as Arma)E
Make an elite Xbox pboR
Make a Resistance pboV
Make a vbs pbo@
Prefix name$
Potentially unprefixed addonsP
Don't pause (bad status still reported and up to the controlling program to do something about it)F
Rebuild requiredAddons (disabled)S
Show rap text while crunching (very noisy)W
Warnings are errorsO
Obfuscate (same as !)!
ObfuscateX
Exclude files from pboZ
Exclude from compressionUnbinarised mission.sqm or config.cpp
Makepbo will still check either of these files for errors, but the unbinarised file is saved in the pbo instead.
This option has become necessary for some uses of exec/eval where the code can only be known after the engine has started.
Caveat. Bis unbinarised
Makepbo does not accept unbinarised p3d's, wrp, or rtm files.
You need pboProject for that.
Options with arguments
Can be stated as:
The latter allows proper detection of the first genuine non-option file reference:
Compress files (see below)
[.lst|.txt|<.ext>] can be either of the defaults, or an explicit extension.
Exclude files (see below)
EXTERNAL REFERENCES
This ALWAYS checks that file\references in any file of the pbo that could contain them are present on the p: drive. Any file means p3d's, wrps', rvmats, mission.sqm, sqf, configs, ...
This is a confidence check that you haven't created typos.
SHA/CRC SIGNATURES
Sha key signatures (Arma) or crc checks (elite) are automatically appended to end of file, when appropriate.
This section does not apply to ofp.
Prefixes apply to addons, not mission or campaign pbo's. If mission/campaign pbos have prefixes, they are ignored by the engine. Be careful with this terminology. An addon, can contain missions.
Either a genuine prefix or a presumed prefix is embedded in the header of all addons.
A prefix will be embedded in a pbo by makepbo under the following cascading rules:
CAUTION: '$PBOPREFIX$' and 'PboPrefix.txt' '$PBOPREFIX$.txt'
'$PBOPREFIX$' and 'PboPrefix.txt' are the unfortunate historical names for adjusting the header of a pbo.They are ignored. Use'.txt' instead.
The dll adds additional lines to the pbo header using one of the above files. The file itself is never included in a pbo.
The most notable use of above is to specifically state THIS pbo's intended engine
Product=Arma3;
author=I am Famous;
prefix= ANYTHING is ALWAYS ignored;
Any pbo can be compressed for ANY engine. Since many low grade pbo extractors 'out there' don't understand compression, this can be used as a mild form of obfuscation.
The results of compressing mission pbos can achieve better than 75% reduction in payload.
For addons, the results are less spectacular (between 5..10%) because pax's (which form the majority of files in an addon) are generally the largest in size and are (mostly) pre-compressed anyway.
Obfuscation automatically implies compression. If no specific compression is specified, it will use the defaults.
Default is no compression. (no -z option)
MakePbo -Z="Comma,Separated,Ignore,List" [ otheroptions...] folder...
MakePbo -Z=IgnoreList[<.ext>|.lst|.txt] [ otheroptions...] folder...
Makepbo -Z=default // use the dll's internal context-algorithm
The 1st method uses parameters directly from the commandline. This list MUST be enclosed in quotes. (if ,,, or spaced args)
The 2nd method utilises (an often common) ignore list. The content of which should be same as a commandline entry (obviously), except quotes in this case are optional.
.lst or .txt extension is optional for the 2nd method. You can alternatively specify a different .extension
Compression will only occur to each 'file' if resulting output is smaller than the original.
YOU MUST SPECIFY A LIST if using the Z option
If you want DEFAULT files to be compressed use "default".
If you want no files to be compressed, don't specify Z!!!
At time of writing the doc, the dll defaults to ignore are:
"thumbs.db,*.txt,*.h,*.dep,*.cpp,*.bak,*.png,*.log,*.pew, *.hpp, init*.*"
To get the ignore list actually used, look in setup-> of pboProject.
If you want ALL files compressed use "all" (the dll will not 'see' .all extensions, and hence compress all files).
However, note that, under no circumstances will the dll compress a file to make it LARGER.
This frequently occurs for pax files. The result is, that pax will be stored untouched.
"Comma, Separated, .Ignore, *.List"
The format is pretty much free form. Spacing between args is permitted any of the following forms are mutually equivalent.
Note that compression can take considerable time to achieve. It is 'safe' however to simply allow the dll to attempt to compress it is internal, default, file list.
NOTE for vbs2
Encrypted AND compressed files cannot co-exist. If compression is specified, the pbo is encrypted along with any uncompressed files. The compressed files (if any) remain unencrypted.
Can take several forms
// ->output to [MyPath\]MyAddon.pbo
*MakePbo [MyPath\]MyAddon
// ->output to CurrentDir\ThisAddon.pbo
MakePbo [MyPath\]MyAddon ThisAddon
// ->output to CurrentDir\ThisAddon\MyAddon.pbo
*MakePbo [MyPath\]MyAddon ThisAddon\
// ->output to CurrentDir\ThisAddon\ThisPbo.pbo
MakePbo [MyPath\]MyAddon ThisAddon\ThisPbo
// ->output to \ThisAddon.pbo
MakePbo [MyPath\]MyAddon \ThisAddon
// ->output to \ThisAddon\MyAddon.pbo
*MakePbo [MyPath\]MyAddon \ThisAddon\
// ->output to \ThisAddon\ThisPbo.pbo
MakePbo [MyPath\]MyAddon \ThisAddon\ThisPbo
Note that, under ALL circumstances, if 'ThisAddon' happens to be the name of a folder, it is equivalent to stating 'ThisAddon'
Note: extension type is not required and has consequence for users specifying an XBO target but, in fact, the dll discovers it is a vbs2 lite mission.
Under that, special, unique circumstance, the intended.xbo is renamed to .pbo (a vbs 2 lite quirk)
Rules (in order of precedence):
This default list is likely to change in the future as bis keep moving goalposts.
There is an unfortunate but popular use of hpp files as included sqf files. Bis in their wisdom call files not intended to be in the pbo, (dot)hpp. To accommodate users of popular and well respected addons such as cba use the following syntax:
-X=thumbs.db,*.txt,*.h,*.dep,*.cpp,*.bak,*.png,*.log,*.pew
Command line options
Obfuscation is not encryption.
Obfuscation has been introduced to protect people from thievery with arma3 life servers (among others). The weak spot in encryption is once you crack the key, the door is open. Obfuscation uses a different cipher (key) each time the pbo is made. So, unlike encryption, the purpose is not to prevent extraction but make it a frustrating experience to the thief. One of the ciphers is to leave the door half open to let the thief think he's figured it out (and embarrass himself by publishing a how to). That said, obfuscation also attempts to prevent extraction but only as it's first line of defence.
The results range from very difficult to impossible to extract meaningful files. The consequent data is either intentionally misleading,. deliberate garbage, corrupted, 'apparently' corrupted, or simply missing (depends on the cipher sequence employed at the time).
ALL major players writing extractors (including bis) detect an obfuscated pbo and refuse to continue. The intent behind this is to protect the innocent who would otherwise have no indication that they are about to flood their file system with hundreds x hundreds of garbage files. That's a fair enough warning, and won't stop a thief from (hopefully) damaging his file system if he persists.
The dll uses a one time cipher each time a pbo is obfuscated. The same pbo folder obfuscated again will produce a different result making any knowledge gained extracting one pbo can't be applied to another one, even the same one, republished. Obfuscated pbos are approximately 15% larger.
In addition, obfuscated pbos automatically use compression so that plain text data is not immediately visible in a hex editor. If you don't like the defaults, change them with the -Z= option. The defaults for the current dll are visible in the setup page of pboProject (as are files to be excluded).
sqf files
Control of this process is in your hands. Be particularly wary of compressed sqf files. Most can be. Some can't.
Any easy, but not always practical method is to call any invoked file initxxxxx.xxx
. The dll will not compress init*.*
Avoid the temptation to disallow compression for *.sqf. You are exposing your text to the thieves when you do, Take the time and trouble to protect yourself.
rvmat files
All rvmats can be compressed (whether binarised or plain text) except damage.rvmats used in a config.cpp. Not the cpp itself, that can be compressed, the rvmat cannot. If you wonder why this stupidity, ask bis.
What also enhances your protection is calling your files by very strange names. Using Cyrillic rather than English is an excellent choice, so too are any of the European characters, as are simply writing a089s3454.sqf (gibberish)
The dll will mimic your gibberish. If you encode in Cyrillic, it will obfuscate in Cyrillic, if you use numbers, it will use numbers. This makes distinguishing garbage files from real ones an interesting exercise, let alone hiding myGreatElephant.sqf so no one knows it's an elephant.