Prince4 ISDone0.6final Script ISDone_Example
Code:
[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
[Types]
Name: full; Description: Full installation; Flags: iscustom
[Components]
Name: Component; Description: Component Selection; Types: full; Flags: fixed // Component 0
Name: Component\a; Description: Component - A; Flags: exclusive; // Component 1
Name: Component\b; Description: Component - B; Flags: exclusive; // Component 2
Name: Component\c; Description: Component - C; Flags: exclusive; // Component 3
[ code]
Comps1:=0; Comps2:=0; Comps3:=0;
#ifdef Components
TmpValue:=1;
if IsComponentSelected('Component\a') then Comps1:=Comps1+TmpValue; //Component 1
TmpValue:=TmpValue*2;
if IsComponentSelected('Component\b') then Comps1:=Comps1+TmpValue; //Component 2
TmpValue:=TmpValue*2;
if IsComponentSelected('Component\c') then Comps1:=Comps1+TmpValue; //Component 3
TmpValue:=TmpValue*2;
if IsComponentSelected('Component\d') then Comps1:=Comps1+TmpValue; //Component 4
#endif
If IsComponentSelected('Component\a') then
begin
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\Setup-1.Rpk'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
end;
If IsComponentSelected('Component\b') then
begin
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\Setup-2.Rpk'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
end;
If IsComponentSelected('Component\c') then
begin
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\Setup-1.Rpk'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\Setup-2.Rpk'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
end;