Ветеран
Сообщения: 978
Благодарности: 564
|
Профиль
|
Сайт
|
Отправить PM
| Цитировать
my-94, Лови
читать дальше »
Код: 
[Setup]
AppId={{4E7C4AAA-6115-4228-B387-707B52DDCD89}
AppName=My Program
AppVerName=My Program 1.5
AppPublisher=My Company, Inc.
AppPublisherURL=http://www.example.com/
AppSupportURL=http://www.example.com/
AppUpdatesURL=http://www.example.com/
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
OutputBaseFilename=setup
Compression=lzma
SolidCompression=no
disablereadypage=true
[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl
[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
[Files]
Source: Office2007.cjstyles; DestDir: {tmp}; Flags: dontcopy nocompression
Source: ISSkin.dll; DestDir: {tmp}; Flags: dontcopy nocompression
source: 1.bmp; DestDir: {tmp}; Flags: dontcopy nocompression
Source: isgsg.dll; DestDir: {tmp}; Flags: dontcopy nocompression
Source: splash.png; DestDir: {tmp}; Flags: dontcopy nocompression
[_Code]// ибрать *_* перед [
procedure LoadSkin(lpszPath: String; lpszIniFileName: String);
external 'LoadSkin@files:isskin.dll stdcall';
procedure UnloadSkin();
external 'UnloadSkin@files:isskin.dll stdcall';
procedure ShowSplashScreen(p1:HWND;p2:string;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10:integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';
function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('Office2007.cjstyles');
LoadSkin(ExpandConstant('{tmp}\Office2007.cjstyles'), '');
Result := True;
end;
procedure DeinitializeSetup();
begin
UnloadSkin();
end;
procedure AboutButtonOnClick(Sender: TObject);
begin
MsgBox('Это демо версия программы.', mbInformation, mb_Ok);
end;
procedure URLLabelOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
end;
procedure InitializeWizard();
var
AboutButton, CancelButton: TButton;
URLLabel: TNewStaticText;
BackgroundBitmapImage: TBitmapImage;
BackgroundBitmapText: TNewStaticText;
b:string;
BmpFile: TBitmapImage;
begin
ExtractTemporaryFile('1.bmp'); //Извлекаем файл, который пойдет в окно инсталлятора
//Вставляем изображение в окно инсталлятора, для каждой страницы нужно добвлять изображение заново
ExtractTemporaryFile('splash.png');
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\1.bmp'));
BmpFile.SetBounds(0, 0, 497, 313);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.WelcomePage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\1.bmp'));
BmpFile.SetBounds(0, 0, 497, 313);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.FinishedPage;
ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}')+'\splash.png',1000,3000,1000,0,255,False, $FFFFFF,10);
with WizardForm do
begin
WelcomeLabel1.Hide;
WelcomeLabel2.Hide;
FinishedHeadingLabel.Hide;
FinishedLabel.Hide;
end;
CancelButton := WizardForm.CancelButton;
AboutButton := TButton.Create(WizardForm);
AboutButton.Left := WizardForm.ClientWidth - CancelButton.Left - CancelButton.Width;
AboutButton.Top := CancelButton.Top;
AboutButton.Width := CancelButton.Width;
AboutButton.Height := CancelButton.Height;
AboutButton.Caption := '&Repack info';
AboutButton.OnClick := @AboutButtonOnClick;
AboutButton.Parent := WizardForm;
URLLabel := TNewStaticText.Create(WizardForm);
URLLabel.Cursor := crHand;
URLLabel.OnClick := @URLLabelOnClick;
URLLabel.Parent := WizardForm;
{ Alter Font *after* setting Parent so the correct defaults are inherited first }
URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
URLLabel.Font.Color := clBlue;
URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;
URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20);
BackgroundBitmapImage := TBitmapImage.Create(MainForm);
BackgroundBitmapImage.Left := 50;
BackgroundBitmapImage.Top := 100;
BackgroundBitmapImage.AutoSize := True;
BackgroundBitmapImage.Bitmap := WizardForm.WizardBitmapImage.Bitmap;
BackgroundBitmapImage.Parent := MainForm;
BackgroundBitmapText := TNewStaticText.Create(MainForm);
BackgroundBitmapText.Left := BackgroundBitmapImage.Left;
BackgroundBitmapText.Top := BackgroundBitmapImage.Top + BackgroundBitmapImage.Height + ScaleY(8);
BackgroundBitmapText.Caption := 'TBitmapImage';
BackgroundBitmapText.Parent := MainForm;
end;
[Messages]
BeveledLabel=111
|
-------
Я люблю помогать. Но не путайте: "Помогите мне" и "Сделайте за меня" - это совершенно разные понятия.
Отправлено: 10:23, 22-02-2011
| #841
|