Instructions on blackbox script
Ok, First things first.
This blackbox script/installer doesn't support internal compression therefore, I will show you how to use the freearc, 7zip, srep, precomp, winrar, diskchange unpacking.
Now here is an example and a few explainations.
if not ISArcExtract (
Component,
Progress,
ArchiveSource,
Destination, '', false,
Password, ExpandConstant('{tmp}\arc.ini'),
True/False) then break;
if not IS7ZipExtract (
Component,
Progress,
ArchiveSource,
Destination,
True/False,
Password) then break;
if not ISRarExtract (
Component,
Progress,
ArchiveSource,
Destination,
True/False,
Password) then break;
if not ISSRepExtract (
Component,
Progress,
ArchiveSource,
Destination,
True/False) then break;
if not ISPrecompExtract(
Component,
Progress,
ArchiveSource,
Destination,
True/False) then break;
e.g.
if not ISArcExtract ( 0, 100, ExpandConstant('{src}\Data1.bin'), ExpandConstant('{app}\'), '', false, '1234', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), False) then break;
Component > Allows unpacking when the component is selected. Ask for more info about this.
e.g
if not ISArcExtract (
0, 100, ExpandConstant('{src}\Data1.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), False) then break;
Progress > The progressbar taken up by the unpacking progress of archive. Take NOTE, 100 is the total, therefore is it's one archive, set 100, if two, set 50 and the other 50
if not ISArcExtract ( 0,
50, ExpandConstant('{src}\Data1.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), False) then break;
if not ISArcExtract ( 0,
50, ExpandConstant('{src}\Data2.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), False) then break;
ArchiveSource > Now as you can see, the example, ExpandConstant('{src}\Data1.bin'). The expandconstant is for the constant expansion for never mind it but you should take it for granted. {src} which means source of the setup, {pf} means the folder program files, for other constants,
click here.
e.g.
if not ISArcExtract ( 0, 100,
ExpandConstant('{src}\Data1.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), False) then break;
Destination > it acts the same way as the source of files but now you are directing the files in the archive to be unpacked in a folder, take note, this can only work if you are unpacking freearc, 7z or rar archive because they can contain a lot of files in one and as for precomp and srep, specify the destination file.
e.g.
if not ISArcExtract ( 0, 100, ExpandConstant('{src}\Data1.bin'),
ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISPrecompExtract( 0, 0, ExpandConstant('{src}\data.pcf'),
ExpandConstant('{app}\data.arc'), true) then break;
Password > The archive password set by you.
e.g.
if not ISArcExtract ( 0, 100, ExpandConstant('{src}\Data1.bin'), ExpandConstant('{app}\'), '', false,
'1234', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), False) then break;
True/False >
aka. notPCFonFLY {PCFonFLY} It's an option to delete file after unpacking process, True means, file must be deleted and False means file mustn't be deleted.
e.g.
if not ISArcExtract ( 0, 100, ExpandConstant('{src}\Data1.bin'), ExpandConstant('{app}\'), '', false,
'1234', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'),
False) then break;
Now, here are a few examples.
The Password feature is only available for 7z, rar and arc.
Freearc
if not ISArcExtract ( 0, 100, ExpandConstant('{src}\Data1.bin'), ExpandConstant('{app}\'), '', false,
'1234', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'),
False) then break;
7zip
if not IS7ZipExtract ( 0, 75, ExpandConstant('{src}\data1.7z'), ExpandConstant('{app}'), false, '1234') then break;
rar
if not ISRarExtract ( 0, 25, ExpandConstant('{src}\data.rar'), ExpandConstant('{app}'), false, '4321') then break;
srep
if not ISSRepExtract ( 0, 10, ExpandConstant('{app}\data.srep'),ExpandConstant(' {app}\data.pcf'), true) then break;
precomp
if not ISPrecompExtract( 0, 90, ExpandConstant('{app}\data.pcf'), ExpandConstant('{app}\data.arc'), true) then break;
Now comes to the diskchange
if not ShowChangeDiskWindow (
Text, ExpandConstant('{src}'),
Archive) then break;
Text > The text which should be written to notify the user of the setup on what to do.
Archive > The archive the setup can use for verification.
e.g.
if not ShowChangeDiskWindow ('Insert the next disk...', ExpandConstant('{src}'),'Data7.cab') then break;