User Tools

Site Tools


arma2:tools:setversion

SetVersion

SerVersion changes the RequiredVersion= of any config.cpp/bin within an addon.pbo file.

It is specifically targeted at (but not limited to) making ArmA addons compatible with ArmA 2.

For the most part this will work, because. for the most part, the engine 'understands' the alternate p3d compressions (lzss) inside ArmA (1). And / Or, the p3d models and classes are largely in the same /ca/folder/ network.

As an aside, but, for the removal of some half dozen objects in the ArmA 2 addons, sara, and most missions would have been compatible with ArmA 2. There is no readily available upgrade path, rendering all previous efforts and mission creation, redundant.

Usage

SetVersion [-options] 1.03(eg) SomePbo[.pbo] [AnotherPbo[.pbo]]

options

-x  Exclude config.cpp(s) from revision. only revise bin

Note that SetVersion is recursive. It will change ALL config.cpp/bins's encountered in the pbo file.

Return Values
--------------
for Dos usage it is useful to 'know' (via ERRORLEVEL) what operation was performed

0 VERSION_CHANGED: a change took place
1 VERSION_SAME:    the RequiredVersion(s) are identical to what was wanted no change to pbo
2 VERSION_NONE:    no config(s) (or no RequiredVersion= in those configs) found. no change to pbo
3 VERSION_ERROR:   file could not be processed in some way

Config.cpp is normally a text file. It can, alternatively be encountered in a binarised form, and to all intents is a config.bin file.

When config.cpp IS a text file, SetVersion attempts to convert it 'on the fly' to a binarised form.

This conversion will fail if paths are incorrect for #include statements (eg). Generally, any binarisation of a config requires that you set up a P: drive.

You also may not wish to do this for several reasons. You can use the -x option to prevent SetVersion changing config.cpp files.

However

If allowed, and IF encountered, and IF successful, the original 'file' is renamed to config.cpp.txt, and a new text file replaces it. THIS, NEW text file will be stripped of all comments and #includes (because they are unnecessary at this point).

Note finally, that this is a kludge. Redundant hpp files and included cpp text files will remain in the pbo, where, normally, these too would be removed during the rapification process.

Requires DePbo.dll - Check Mikero tools homepage in Dev-Heaven.

arma2/tools/setversion.txt · Last modified: 2017-02-28 07:04 by snakeman