Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

Ветеран


Сообщения: 510
Благодарности: 51

Профиль | Отправить PM | Цитировать


как вставить на первую страничку инсталятора картинку как здесь?

http://screendepo.com/image/109254

если что мой скрипт

читать дальше »
OutputDir=Setup
AppName=Crysis 2
AppVerName=Crysis 2
AppVersion=Crysis 2
AppPublisher=Torrent 4M
AppCopyright=Torrent 4M
DefaultDirName={pf}\Crysis 2
DefaultGroupName=Crysis 2
AllowNoIcons=yes
OutputBaseFilename=setup
WizardImageFile=C:\Documents and Settings\Admin\Рабочий стол\341de00ccb0b6b53d1a2c81e5e0b8e55.bmp
WindowVisible=false
WindowShowCaption=false
WindowResizable=false
Compression=lzma/ultra
SolidCompression=true
DiskSpanning=yes
DiskSliceSize=1048576000
SlicesPerDisk=1
WizardSmallImageFile=C:\Documents and Settings\Admin\Рабочий стол\crysis\Crysis_2.bmp

[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl

[Messages]
DiskSpaceMBLabel=Требуется как минимум 6,20 Гб свободного дискового пространства.

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}

[Files]
Source: C:\Documents and Settings\Admin\Рабочий стол\button.bmp; DestDir: {tmp}; Flags: dontcopy
Source: C:\Documents and Settings\Admin\Рабочий стол\LOGO.bmp; Flags: dontcopy solidbreak
Source: ISSkin.dll; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression solidbreak
Source: steam.cjstyles; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression solidbreak
Source: C:\Documents and Settings\Admin\Рабочий стол\dc.reg; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: C:\Documents and Settings\Admin\Рабочий стол\logo.bmp; DestDir: {tmp}; Flags: dontcopy
Source: D:\Crysis 2\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension

[Icons]
Name: {group}\Crysis 2; Filename: {app}\bin32\Crysis2Launcher.exe; WorkingDir: {app}\bin32
Name: {userdesktop}\Crysis 2; Filename: {app}\bin32\Crysis2Launcher.exe; WorkingDir: {app}\bin32; Tasks: desktopicon
Name: {group}\{cm:UninstallProgram,Crysis 2}; Filename: {uninstallexe}

[Run]
Description: {cm:LaunchProgram, Crysis 2}; Filename: {app}\bin32\Crysis2Launcher.exe; WorkingDir: {app}\bin32; Flags: nowait postinstall skipifsilent unchecked
Filename: {win}\regedit.exe; Parameters: /s {tmp}\dc.reg; StatusMsg: Вносим изменения в реестр ...; Flags: waituntilterminated runasoriginaluser

[UninstallDelete]
Type: filesandordirs; Name: {app}

[code]
var
BitmapImage1: TBitmapImage;

procedure InitializeWizard();
begin
{ BitmapImage1 }
BitmapImage1 := TBitmapImage.Create(WizardForm);
with BitmapImage1 do
begin
Name := 'BitmapImage1';
Parent := WizardForm;
Left := ScaleX(0);
Top := ScaleY(314);
Width := ScaleX(241);
Height := ScaleY(100);
ExtractTemporaryFile('LOGO.bmp');
Bitmap.LoadFromFile(ExpandConstant('{tmp}\LOGO.bmp'));
end;
end;

var
lbl1, lbl2: TLabel;
txt1, txt2: string;
i: Integer;
tmr1: TTimer;

procedure tmr1Timer(Sender: TObject);
begin
tmr1.Enabled:= False;

txt1:= WizardForm.WelcomeLabel1.Caption;
txt2:= WizardForm.WelcomeLabel2.Caption;

lbl1.Caption:= '';
for i:= 1 to Length(txt1) do begin
if Application.Terminated then Break; // контроль закрытия приложения и выход из цикла
lbl1.Caption:= lbl1.Caption + txt1[i];
Application.ProcessMessages;
Sleep(100); // время задержки между показом букв
end;

lbl2.Caption:= '';
for i:= 1 to Length(txt2) do begin
if Application.Terminated then Break; // контроль закрытия приложения и выход из цикла
lbl2.Caption:= lbl2.Caption + txt2[i];
Application.ProcessMessages;
Sleep(60); // время задержки между показом букв
end;
end;

procedure CreateComponents;
begin
// скрываем стандартные Label'ы
WizardForm.WelcomeLabel1.Hide;
WizardForm.WelcomeLabel2.Hide;

// задаём свои Label'ы
lbl1:= TLabel.Create(WizardForm);
with lbl1 do begin
Left:= WizardForm.WelcomeLabel1.Left;
Top:= WizardForm.WelcomeLabel1.Top;
Width:= WizardForm.WelcomeLabel1.Width;
Height:= WizardForm.WelcomeLabel1.Height;
AutoSize:= WizardForm.WelcomeLabel1.AutoSize;
WordWrap:= WizardForm.WelcomeLabel1.WordWrap;
Font.Style:= WizardForm.WelcomeLabel1.Font.Style;
Font.Size:= WizardForm.WelcomeLabel1.Font.Size;
Font.Color:= WizardForm.WelcomeLabel1.Font.Color;
Transparent:= True;
Caption:= '';
Parent:= WizardForm.WelcomePage;
end;

lbl2:=TLabel.Create(WizardForm);
with lbl2 do begin
Left:= WizardForm.WelcomeLabel2.Left;
Top:= WizardForm.WelcomeLabel2.Top;
Width:= WizardForm.WelcomeLabel2.Width;
Height:= WizardForm.WelcomeLabel2.Height;
AutoSize:= WizardForm.WelcomeLabel2.AutoSize;
WordWrap:= WizardForm.WelcomeLabel2.WordWrap;
Font.Style:= WizardForm.WelcomeLabel2.Font.Style;
Font.Size:= WizardForm.WelcomeLabel2.Font.Size;
Font.Color:= WizardForm.WelcomeLabel2.Font.Color;
Transparent:= True;
Caption:= '';
Parent:= WizardForm.WelcomePage;
end;

tmr1:= TTimer.Create(WizardForm);
with tmr1 do begin
Interval:= 500; // время задержки перед началом показа текста
OnTimer:= @tmr1Timer;
end;
end;

procedure LoadSkin(lpszPath: String; lpszIniFileName: String); external 'LoadSkin@files:isskin.dll stdcall';
procedure UnloadSkin(); external 'UnloadSkin@files:isskin.dll stdcall';
function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall';

function InitializeSetup:boolean;
begin
ExtractTemporaryFile('dc.reg');
ExtractTemporaryFile('steam.cjstyles');
LoadSkin(ExpandConstant('{tmp}')+'\steam.cjstyles', '');
Result:=True;
end;

procedure DeinitializeSetup;
begin
ShowWindow(WizardForm.Handle,0);
UnloadSkin();
end;

function GetLogicalDrives: DWORD; external 'GetLogicalDrives@kernel32.dll stdcall';
function GetDriveType(lpRootPathName: PChar): Cardinal; external 'GetDriveTypeA@kernel32.dll stdcall';

const
DRIVE_FIXED = 3;

function NoSD(s: string): string;
var
x, bit, i: Integer;
tp: Cardinal;
sd: string;
begin
sd:= ExpandConstant('{sd}');
Result:= sd;
// Вызываем функцию WinAPI
// Функция возвращает битовую маску установленных логических дисков.
// Бит 0 определяет наличие диска А:, бит 1 - диска B и т.д.
x:= GetLogicalDrives;
if x <> 0 then
// цикл по полученным битам переменной X
for i:= 1 to 64 do
begin
// Накладываем битовую маску для выделения бита с поряковым номером 0
bit:= x and 1;
// нашли логический диск...
if bit = 1 then
begin
// определяем тип логического диска
tp:= GetDriveType(PChar(Chr(64 + i) + ':'));
if tp = DRIVE_FIXED then
// если диск не является системным
if Chr(64 + i) <> Copy(sd, 1, 1) then
begin
Result:= Chr(64 + i) + ':';
Break;
end;
end;
// побитовый сдвиг вправо
x:= x shr 1;
end;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
WizardForm.Font.Name:= 'Georgia';
if CurPageID = wpInfoBefore then WizardForm.Font.Name:= 'Georgia';
if CurPageID = wpLicense then WizardForm.Font.Name:= 'Georgia';
WizardForm.Font.Style:=[fsBold, fsItalic]
end;


и ещё искал но не нашел как сделать чтобы при нажатии на лого открывался сайт?

Последний раз редактировалось insombia, 23-03-2011 в 17:45.


Отправлено: 17:26, 23-03-2011 | #1127