특정 파일의 조건부 설치를 위해 Check
함수를 작성할 수 있습니다. 이 함수에서는 라디오 버튼의 상태에 따라 파일을 설치할지 여부를 결정할 수 있습니다. 여기에 첫 번째 라디오 버튼은 사용자 옵션 페이지에서 선택한 경우 조건부 아이콘을 만드는 방법을 보여줍니다 예제 스크립트는 다음과 같습니다
[Setup]
AppName=My Program
AppVersion=1.5
DefaultGroupName=My Program
DefaultDirName={pf}\My Program
[Icons]
Name: "{group}\My Program"; Filename: "calc.exe"; WorkingDir: "{app}"; Check: ShouldInstallIcon
[Code]
var
MyOptionsPage: TInputOptionWizardPage;
procedure InitializeWizard;
begin
MyOptionsPage := CreateInputOptionPage(wpWelcome, 'Caption', 'Description',
'SubCaption', True, False);
MyOptionsPage.Add('Install icon');
MyOptionsPage.Add('Do not install icon');
MyOptionsPage.Values[0] := True;
end;
function ShouldInstallIcon: Boolean;
begin
// here write a condition, which if you return True will process an entry;
// in this example the setup creates the icon if the first radio button is
// selected
Result := MyOptionsPage.Values[0];
end;
이 있다는 것을 언급 할 가치가 내장 된 페이지가 만든 무엇을 관습 하나. '[Types]'섹션을 사용하여 설치 유형을 정의 할 수 있으며 선택된 유형을 지정한'[Components]'만 설치합니다. 사용법에 대해서는 ['Components.iss'] (https://github.com/jrsoftware/issrc/blob/is-5_5_4/Examples/Components.iss) 예제 스크립트를 참조 할 것입니다. – TLama