Код:

[Files]
// Строки после картинок
Source: "D:\Files\*"; DestDir: "{app}"; Flags: ignoreversion; Check: InstallerCheck;
Source: "D:\dll\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: PortableCheck;
[Code*]
function InitializeSetup(): Boolean;
begin
if not FileExists(ExpandConstant('{tmp}\rus.png')) then ExtractTemporaryFile('rus.png');
if not FileExists(ExpandConstant('{tmp}\eng.png')) then ExtractTemporaryFile('eng.png');
if not FileExists(ExpandConstant('{tmp}\b2p.dll')) then ExtractTemporaryFile('b2p.dll');
if not FileExists(ExpandConstant('{tmp}\botva2.dll')) then ExtractTemporaryFile('botva2.dll');
if not FileExists(ExpandConstant('{tmp}\Installer net.png')) then ExtractTemporaryFile('Installer net.png');
if not FileExists(ExpandConstant('{tmp}\Portable.png')) then ExtractTemporaryFile('Portable.png');
if not FileExists(ExpandConstant('{tmp}\port neaktiv.bmp')) then ExtractTemporaryFile('port neaktiv.bmp');
if not FileExists(ExpandConstant('{tmp}\stac.bmp')) then ExtractTemporaryFile('stac.bmp');
Result := True;
end;
function InstallerCheck: Boolean;
begin
Result := Installer.Checked;
end;
function PortableCheck: Boolean;
begin
Result := Portable.Checked;
end;
procedure CopmpClick(Sender: TObject);
begin
case TNewRadioButton(Sender) of
RusLang:
begin
sLang := 'rus';
sLang2 := 'eng';
if Portable.Checked then
Portable.OnClick(Portable);
if Installer.Checked then
Installer.OnClick(Installer);
end;
EngLang:
begin
sLang := 'eng';
sLang2 := 'rus';
if Portable.Checked then
Portable.OnClick(Portable);
if Installer.Checked then
Installer.OnClick(Installer);
end;
Portable:
begin
PortablePanel.Show;
PortableFlagPanel.Show;
InstallerPanel.Show;
ImgLoad(PortableFlagPanel.Handle, ExpandConstant('{tmp}\' + sLang + '.png'), ScaleX(0), ScaleY(0),
ScaleX(40), ScaleY(20), True, True);
ImgApplyChanges(PortableFlagPanel.Handle);
InstallerFlagPanel.Hide;
WizardForm.DirEdit.Text := AddBackslash(ExpandConstant('{src}')) + 'AshampooPhotoCommanderPortable';
WizardForm.Caption:= FmtMessage(ExpandConstant('Распаковка — %1'), [ExpandConstant('{#SetupSetting("AppName")}')]);
end;
Installer:
begin
InstallerPanel.Hide;
PortablePanel.Hide;
InstallerFlagPanel.Show;
ImgLoad(InstallerFlagPanel.Handle, ExpandConstant('{tmp}\' + sLang + '.png'), ScaleX(0), ScaleY(0),
ScaleX(40), ScaleY(20), True, True);
ImgApplyChanges(InstallerFlagPanel.Handle);
PortableFlagPanel.Hide;
WizardForm.DirEdit.Text := AddBackslash(ExpandConstant('{pf}')) + 'Ashampoo Photo Commander 14';
WizardForm.Caption:= FmtMessage(SetupMessage(msgSetupWindowTitle), [ExpandConstant('{#SetupSetting("AppName")}')]);
end;
end;
end;