У меня есть замечательный скрипт который добавляет зависимость от не дочерних компонентов, но есть в нем одно неудобство: он завязан на номерах компонентов. Собсно можно ли его переделать, чтобы зависимость была от названия компонента?
Т.е. желательно не от "Description", а от "Name".
читать дальше »
Код:
[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
[Components]
Name: "GameDiablo2"; Description: Diablo 2; Flags: fixed; Types: full compact custom;
Name: GameLoD; Description: Lord of Destruction; Types: full;
Name: Version; Description: Версия; Flags: fixed; Types: full compact custom;
Name: Version\107; Description: 1.07; Flags: exclusive;
Name: Version\108; Description: 1.08; Flags: exclusive;
Name: Version\109; Description: 1.09; Flags: exclusive; Types: full;
Name: NoCD; Description: NoCD; Types: full;
[c0de]
var
OldEvent_ComponentsListClickCheck: TNotifyEvent;
procedure ComponentsListClickCheck(Sender: TObject);
begin
If IsComponentSelected('GameLoD') then begin
WizardForm.ComponentsList.ItemEnabled[3]:=True;
WizardForm.ComponentsList.ItemEnabled[4]:=True;
end else begin
WizardForm.ComponentsList.ItemEnabled[3]:=False;
WizardForm.ComponentsList.ItemEnabled[4]:=False;
OldEvent_ComponentsListClickCheck(Sender);
end;
end;
procedure InitializeWizard();
begin
with WizardForm.ComponentsList do
begin
OldEvent_ComponentsListClickCheck := OnClickCheck;
OnClickCheck := @ComponentsListClickCheck;
ItemEnabled[3]:=True;
end;
end;