vint56
Advanced Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору #define MyAppName "Call of Duty Modern Warfare 2" [Setup] AppName=Call of Duty Modern Warfare 2 AppVerName=Call of Duty Modern Warfare 2 DefaultDirName={pf}\Call of Duty Modern Warfare 2 DefaultGroupName=Call of Duty Modern Warfare 2 OutputBaseFilename=setup Compression=lzma SolidCompression=yes [Languages] Name: russian; MessagesFile: compiler:Languages\Russian.isl [CustomMessages] russian.Icons=Добавить ярлык на Рабочий стол [Icons] Name: {commondesktop}\Call of Duty Modern Warfare 2; Filename: {app}\iw4sp.exe; Check: CreateIcons; [Code] var Icons, Group: TCheckBox; lblIcons, lblGroup: TLabel; function CreateIcons: Boolean; begin Result:=Icons.Checked; end; procedure IconsOnClick(Sender: TObject); begin if Icons.Checked = False then Icons.Checked:= True else Icons.Checked:= False; end; procedure DeinitializeSetup(); begin if Icons.Checked then CreateShellLink(ExpandConstant('{commondesktop}\{#MyAppName}.lnk'), '', ExpandConstant('{app}\iw4sp.exe'), '', ExpandConstant('{app}\'), '', 0, SW_SHOWNORMAL); end; procedure InitializeWizard(); begin Icons:= TCheckBox.Create(WizardForm); with Icons do begin Parent:= WizardForm.FinishedPage; TabOrder:= 2; Checked:= False; Left:= ScaleX(250); Top:= ScaleY(260); Width:= ScaleX(14); Height:= ScaleY(14); end; lblIcons:= TLabel.Create(WizardForm); with lblIcons do begin Caption:=ExpandConstant('{cm:Icons}'); Width:= ScaleX(150); Height:= ScaleY(13); Transparent := True; Parent:= WizardForm.FinishedPage; OnClick:= @IconsOnClick; Left:= ScaleX(270); Top:= ScaleY(260); end; end; |