Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Welcome image
- var
- WelcomeBitmap: TBitmapImage;
- procedure CurPageChanged(CurPageId: Integer);
- begin
- if CurPageId = wpWelcome then begin
- WizardForm.WelcomeLabel1.Hide;
- WizardForm.WelcomeLabel2.Hide;
- end;
- end;
- procedure InitializeWizard();
- var
- res: Integer;
- ix, iy: Integer;
- begin
- WelcomeBitmap:= TBitmapImage.Create(WizardForm.WelcomePage);
- with WelcomeBitmap do
- begin
- ix := -100 + (ScaleX(50));
- if ix > 0 then iy := 0;
- Left := ix;
- iy := -100 + (ScaleY(50));
- if iy > 0 then iy := 0;
- Top := iy;
- Width := WizardForm.WelcomePage.ClientWidth - ix;
- Height := ScaleY(315) - iy;
- Parent := WizardForm.WelcomePage;
- end;
- with TLabel.Create(WizardForm.WelcomePage) do begin
- Left := 3;
- Parent := WizardForm.NextButton.Parent;
- Top := WizardForm.Bevel.Top + WizardForm.Bevel.Height + 2;
- Caption := '{#VERSION_STRING}';
- end;
- WizardForm.WizardSmallBitmapImage.Left := WizardForm.WizardSmallBitmapImage.Left - 5;
- WizardForm.WizardSmallBitmapImage.ReplaceColor := clWhite;
- WizardForm.WizardSmallBitmapImage.ReplaceWithColor := clWindow;
- ExtractTemporaryFile('oxygene_setup_welcome.bmp');
- WelcomeBitmap.Bitmap.LoadFromFile( ExpandConstant( '{tmp}\oxygene_setup_welcome.bmp' ) );
- end;
- /// Preq
- var
- prereqpanel: TPanel;
- prereqimage: TBitmapImage;
- procedure ShowPrereq(ImageName: string);
- var
- ix, iy: Integer;
- ctrl: TWinControl;
- begin
- if assigned(prereqimage) then prereqimage.Free;
- if assigned(prereqpanel) then prereqpanel.Free;
- prereqimage := nil;
- prereqpanel := nil;
- if ImageName = '' then exit;
- ctrl := WizardForm.PreparingPage.Parent.Parent;
- prereqpanel := TPanel.Create(ctrl);
- with prereqpanel do begin
- left := 0;
- top := 0;
- width := ctrl.Width;
- height := ctrl.Height;
- parent := ctrl;
- end;
- prereqimage:= TBitmapImage.Create(ctrl);
- with prereqimage do
- begin
- ix := -100 + (ScaleX(50));
- if ix > 0 then iy := 0;
- Left := ix;
- iy := -100 + (ScaleY(50));
- if iy > 0 then iy := 0;
- Top := iy;
- Width := ctrl.ClientWidth - ix;
- Height := ScaleY(315) - iy;
- Parent := prereqpanel;
- end;
- ExtractTemporaryFile(ImageName);
- prereqimage.Bitmap.LoadFromFile( ExpandConstant( '{tmp}\'+ImageName) );
- end;
- function DetectAndInstallPrerequisites: Boolean;
- (*** Place your prerequisite detection and installation code below. ***)
- (*** Return False if missing prerequisites were detected but their installation failed, else return True. ***)
- var
- lDummy: Integer;
- begin
- Result := True;
- ShowPrereq('oxygene_setup_installing_VS2010.bmp');
- if GetNeedsShell and not InstallShell then begin
- ShowPrereq('');
- MsgBox(ExpandConstant('{cm:ShellInstallFailed}'), mbInformation, MB_OK);
- ShellFailed := true;
- result := false;
- end;
- ShowPrereq('');
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement