Despofix
Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору [Setup] AppName=My Program AppVersion=1.5 AppVerName=My Program 1.5 DefaultDirName={pf}\My Program DefaultGroupName=My Program AppPublisher=YURSHAT [Languages] Name: russian; MessagesFile: compiler:Languages\Russian.isl [Icons] Name: {group}\My Program; Filename: {app}\MyProg.exe [Files] Source: botva2.dll; Flags: dontcopy Source: WizardImage.png; Flags: dontcopy Source: WizardSmalImage.png; Flags: dontcopy [Code] var SmallImage, WizardImage: Longint; PageNameLabel, PageDescriptionLabel: TLabel; function ImgLoad(Wnd :HWND; FileName: PAnsiChar; Left, Top, Width, Height :integer; Stretch, IsBkg :boolean) :Longint; external 'ImgLoad@{tmp}\botva2.dll stdcall delayload'; procedure ImgSetVisibility(img :Longint; Visible :boolean); external 'ImgSetVisibility@{tmp}\botva2.dll stdcall delayload'; procedure ImgApplyChanges(h:HWND); external 'ImgApplyChanges@{tmp}\botva2.dll stdcall delayload'; procedure gdipShutdown; external 'gdipShutdown@{tmp}\botva2.dll stdcall delayload'; function InitializeSetup: Boolean; begin if not FileExists(ExpandConstant('{tmp}\botva2.dll')) then ExtractTemporaryFile('botva2.dll'); Result:=True; end; procedure InitializeWizard; begin ExtractTemporaryFile('WizardImage.png'); ExtractTemporaryFile('WizardSmalImage.png'); WizardForm.WizardBitmapImage.Hide; WizardForm.WizardBitmapImage2.Hide; WizardForm.WizardSmallBitmapImage.Hide; WizardForm.PageNameLabel.Hide; WizardForm.PageDescriptionLabel.Hide; PageNameLabel := TLabel.Create(WizardForm); with PageNameLabel do begin SetBounds(ScaleX(24), ScaleY(10), ScaleX(405), ScaleY(14)); AutoSize := False; WordWrap := False; Font.Style := [fsBold]; Transparent := True; Parent := WizardForm.MainPanel; end; PageDescriptionLabel := TLabel.Create(WizardForm); with PageDescriptionLabel do begin SetBounds(ScaleX(40), ScaleY(26), ScaleX(389), ScaleY(25)); AutoSize := False; WordWrap := True; Transparent := True; Parent := WizardForm.MainPanel; end; WizardImage:=ImgLoad(WizardForm.WelcomePage.Handle,ExpandConstant('{tmp}\WizardImage.png'),ScaleX(0), ScaleY(0),ScaleX(164),ScaleY(314),True,True); WizardImage:=ImgLoad(WizardForm.FinishedPage.Handle,ExpandConstant('{tmp}\WizardImage.png'),ScaleX(0), ScaleY(0),ScaleX(164),ScaleY(314),True,True); SmallImage:=ImgLoad(WizardForm.MainPanel.Handle,ExpandConstant('{tmp}\WizardSmalImage.png'),ScaleX(0), ScaleY(0),ScaleX(497),ScaleY(58),True,True); ImgApplyChanges(WizardForm.WelcomePage.Handle); ImgApplyChanges(WizardForm.FinishedPage.Handle); ImgApplyChanges(WizardForm.MainPanel.Handle); end; procedure CurPageChanged(CurPageID: Integer); begin PageNameLabel.Caption := WizardForm.PageNameLabel.Caption; PageDescriptionLabel.Caption := WizardForm.PageDescriptionLabel.Caption; ImgSetVisibility(WizardImage,False); if CurPageID = wpWelcome then ImgSetVisibility(WizardImage,True); if CurPageID = wpFinished then ImgSetVisibility(WizardImage,True); end; procedure DeInitializeSetup(); begin gdipShutdown; end;] | Всего записей: 278 | Зарегистр. 22-04-2010 | Отправлено: 20:00 16-06-2011 | Исправлено: Despofix, 20:01 16-06-2011 |
|