IV. COMPRESSION
Like our poster said, when lzma is not enough for our needs, external installation enters the business.
INNO's internal compression supports up to lzma2/ultra64. Don't be deceived to it's title, there's a slight difference between lzma and ultra64, in some content. Compression takes longer, however the gain might be couple of megabytes.
To use external compression, first of all you need a setup. But attention, this one's compression system must be disabled. To do this, add semicolon on second line of INNO, which there's game's path lies.
After this, re-compile the script and you got external-ready setup.exe.
Currently, you can use cmd/bat file to automate everything. You only need to edit compression level etc. in bat file and then you're good to go.
Regardless what you're going to do with compression, if you are using external methods, you will need to add, PrecompVer=inside in InstallOptions in setup.ini.
Bamse clearly explained these values;
Code:
-mprecomp:v+srep+lzma:a1:mfbt4:d256m:fb128:mc1000:lc8
means definition of compression method
Code:
-mprecomp:v+srep+lzma:a1:mfbt4:d256m:fb128:mc1000:lc8
means compressing with precomp (with parameters defined in
arc.ini under
[External compressorrecomp] section)
Code:
-mprecomp:v+srep+lzma:a1:mfbt4:d256m:fb128:mc1000:lc8
means additional parameter for precomp (which is not defined in
arc.ini), in this case it's -v parameter
Code:
-mprecomp:v+srep+lzma:a1:mfbt4:d256m:fb128:mc1000:lc8
means compressing with srep (with parameters defined in
arc.ini under
[External compressor:srep] section), also here you can add parameters separated by ":"
Code:
-mprecomp:v+srep+lzma:a1:mfbt4:d256m:fb128:mc1000:lc8
means compression with lzma
Code:
-mprecomp:v+srep+lzma:a1:mfbt4:d256m:fb128:mc1000:lc8
means additional parameters for lzma, in this case -a1 -mfbt4 -d256m -fb128 -mc1000 -lc8
Once you edit these values (or you can leave them unchanged - attention do not use the values above they're just examples) Click the bat file and let the cmd run and do the compressing for you.
Here's the example of Bamse's Prototype 2 conversion (I'm testing something different)
Code:
echo off
arc a -ep1 -r -w.\ .\data1.cab [email protected] -mlzma:a1:mfbt4:d256m:fb128:mc1000:lc8
arc a -ep1 -r -ed -w.\ .\data2.cab [email protected] -x".\audio\*" -x".\movies\*" -mprecomp+srep+lzma:a1:mfbt4:d256m:fb128:mc1000:lc8 ".\*"
arc a -ep1 -r -w.\ .\data3.cab -mlzma:a1:mfbt4:d256m:fb128:mc1000:lc8 ".\movies\#converted\*"
This cmd works with 2 data.txt files which contains which files will be compressed or excluded. '-n' value means cmd will compress files inside .txt and '-x' value means they'll be excluded. '-r' value means, bat file will compress everything in that folder, including sub-folders and their contents.