Новый участник
Сообщения: 44
Благодарности: 4
|
Профиль
|
Отправить PM
| Цитировать
Serega,
Спасибо, вот только я не могу догадаться что надо добавить там где я отметил жирным и подчеркнул
Цитата:
FileName: {src}\Redistributables\gfwlivesetup.exe; WorkingDir: {src}\Redistributables; Check:
|
чтобы при отмеченном чекбоксе началась установка программы.
Можете еще помочь вставить этот код в мой, а то я все вставил и при при компиляции, запуске, установке ошибок нет, но в конце чекбокс всеравно не отображается.
код
Цитата:
[Setup]
SourceDir=.
OutputDir=Setup
AppName=FUEL
AppVerName=FUEL
AppVersion=FUEL
DefaultDirName={pf}\FUEL
DefaultGroupName=FUEL
AllowNoIcons=yes
OutputBaseFilename=setup
UninstallFilesDir={app}\Uninstall
WizardImageFile=C:\Users\p3rf3ct1c\Desktop\big.bmp
WizardSmallImageFile=C:\Users\p3rf3ct1c\Desktop\small.bmp
SetupIconFile=C:\Users\p3rf3ct1c\Desktop\icon.ico
WindowVisible=no
WindowShowCaption=no
WindowResizable=no
Compression=lzma/ultra
DiskSpanning=yes
DiskSliceSize=692060160
SlicesPerDisk=1
DisableProgramGroupPage=true
DisableReadyPage=true
[Messages]
WelcomeLabel1=
WelcomeLabel2=
ClickNext=
WizardSelectDir=
SelectDirDesc=
WizardInstalling=
InstallingLabel=
FinishedHeadingLabel=
SelectDirBrowseLabel=Íàæìèòå «Óñòàíîâèòü», ÷òîáû íà÷àòü óñòàíîâêó. Åñëè Âû õîòèòå âûáðàòü äðóãóþ ïàïêó, íàæìèòå «Îáçîð».
[CustomMessages]
rus.ArcCancel=Îòìåíèòü ðàñïàêîâêó
rus.ArcBreak=Óñòàíîâêà ïðåðâàíà!
rus.ArcInfo=Ðàñïàêîâàíî %1 Ìá èç %2 Ìá (%3%%). Àðõèâ: %4 èç %5.
rus.ArcTitle=Ðàñïàêîâêà àðõèâîâ FreeArc
rus.ArcError=Ðàñïàêîâùèê FreeArc âåðíóë êîä îøèáêè: %1
rus.ArcFail=Ðàñïàêîâêà íå çàâåðøåíà!
rus.AllProgress=Îáùèé ïðîãðåññ ðàñïàêîâêè: %1%%
rus.ArcBroken=Âîçìîæíî, àðõèâ %1 ïîâðåæä¸í%nèëè íåäîñòàòî÷íî ìåñòà íà äèñêå íàçíà÷åíèÿ.
rus.Extracting=Ðàñïàêîâûâàåòñÿ: %1
rus.remains=%1%%, æäè %2
rus.LongTime=âå÷íî
rus.ending=çàâåðøåíèå
[Languages]
Name: "rus"; MessagesFile: "compiler:Languages\Russian.isl"
[Files]
Source: C:\Program Files\Codejock Software\ISSkin\ISSkin.dll; DestDir: {tmp}; Flags: dontcopy
Source: C:\Program Files\Codejock Software\ISSkin\Styles\GuiStyle.msstyles; DestDir: {tmp}; Flags: dontcopy
Source: unarc.dll; DestDir: {tmp}; Flags: dontcopy deleteafterinstall
Source: InnoCallback.dll; DestDir: {tmp}; Flags: dontcopy
Source: "C:\Users\p3rf3ct1c\Desktop\unp\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension
[Icons]
Name: {group}\Óäàëèòü èãðó; Filename: {uninstallexe}
Name: {group}\FUEL; Filename: {app}\GameSetup.exe; WorkingDir: {app};
Name: {commondesktop}\FUEL; Filename: {app}\GameSetup.exe; WorkingDir: {app}; Check: MakeDesktopIcon;
[Registry]
Root: HKLM; Subkey: "SOFTWARE\FUEL"; ValueType: string; ValueName: "Uninstall"; ValueData: "\""{pf}\InstallShield Installation Information\{{F51FF206-2273-4B3E-A90A-4752AE288C12}\setup.exe\"""
Root: HKLM; Subkey: "SOFTWARE\FUEL"; ValueType: string; ValueName: "GamePath"; ValueData: "{app}"
Root: HKLM; Subkey: "SOFTWARE\FUEL"; ValueType: string; ValueName: "UserLanguageID"; ValueData: "1033"
Root: HKLM; Subkey: "SOFTWARE\FUEL"; ValueType: string; ValueName: "InstanceGUID"; ValueData: "{{7D50D94D-1DCA-4951-A73A-3B25B1425345}"
[UninstallDelete]
Type: filesandordirs; Name: "{app}"
[code]
const
Archives = '{src}\*.arc'; // óêàæèòå ðàñïîëîæåíèå àðõèâîâ FreeArc; äëÿ âíåøíèõ ôàéëîâ ñòðîêó â [Files] äîáàâëÿòü íåîáÿçàòåëüíî
PM_REMOVE = 1;
CP_ACP = 0; CP_UTF8 = 65001;
HALIGN_CENTER = 0;
HALIGN_LEFT = 1;
HALIGN_RIGHT = 2;
VALIGN_CENTER = 0;
VALIGN_TOP = 1;
VALIGN_BOTTOM = 2;
FIT_NONE = 0;
FIT_WIDTH = 1;
FIT_HEIGHT = 2;
FIT_BOTH = 3;
CLR_INVALID = $FFFFFFFF;
procedure LoadSkin(lpszPath: String; lpszIniFileName: String);
external 'LoadSkin@files:isskin.dll stdcall';
// Importing UnloadSkin API from ISSkin.DLL
procedure UnloadSkin();
external 'UnloadSkin@files:isskin.dll stdcall';
// Importing ShowWindow Windows API from User32.DLL
function ShowWindow(hWnd: Integer; uType: Integer): Integer;
external 'ShowWindow@user32.dll stdcall';
function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('GuiStyle.msstyles');
LoadSkin(ExpandConstant('{tmp}\GuiStyle.msstyles'), '');
Result := True;
end;
procedure DeinitializeSetup();
begin
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
UnloadSkin();
end;
type
#ifdef UNICODE ; åñëè ó âàñ îøèáêà íà ýòîé ñòðîêå, òî óñòàíîâèòå ïðåïðîöåññîð èëè èñïðàâüòå ñêðèïò äëÿ âàøåé âåðñèè Inno Setup
#define A "W"
#else
#define A "A" ; òî÷êà âõîäà â SetWindowText, {#A} ìåíÿåòñÿ íà A èëè W â çàâèñèìîñòè îò âåðñèè
PAnsiChar = PChar; // Required for Inno Setup 5.3.0 and higher. (òðåáóåòñÿ äëÿ Inno Setup âåðñèè 5.3.0 è íèæå)
#endif
#if Ver < 84018176
AnsiString = String; // There is no need for this line in Inno Setup 5.2.4 and below (äëÿ Inno Setup âåðñèé 5.2.4 è âûøå ýòà ñòðîêà íå íóæíà)
#endif
TMyMsg = record
hwnd: HWND;
message: UINT;
wParam: Longint;
lParam: Longint;
time: DWORD;
pt: TPoint;
end;
TFreeArcCallback = function (what: PAnsiChar; int1, int2: Integer; str: PAnsiChar): Integer;
TArc = record Path: string; Size: Extended; end;
var
FreeMB, TotalMB: Cardinal;
DesktopIcon,Dop: TCheckBox;
ProgressBar: TNewProgressBar;
ExtractFile: TNewStaticText;
PageNameLabel, PageDescriptionLabel,NeedSpaceLabel,FreeSpaceLabel,lblExtractFileName: TLabel;
btnCancelUnpacking: TButton;
NeedSize,CancelCode, n, UnPackError, StartInstall: Integer;
Arcs: array of TArc;
msgError: string;
m: Extended;
procedure GetFreeSpaceCaption(Sender: TObject);
var
Path: String;
begin
Path := ExtractFileDrive(WizardForm.DirEdit.Text);
GetSpaceOnDisk(Path, True, FreeMB, TotalMB);
if FreeMB > 1024 then
FreeSpaceLabel.Caption := 'Äîñòóïíî ìåñòà íà äèñêå: '+ FloatToStr(round(FreeMB/1024*100)/100) + ' GB' else
FreeSpaceLabel.Caption := 'Äîñòóïíî ìåñòà íà äèñêå: '+ IntToStr(FreeMB)+ ' MB';
if FreeMB < NeedSize then
WizardForm.NextButton.Enabled := False else
WizardForm.NextButton.Enabled := True; end;
procedure GetNeedSpaceCaption;
begin
if NeedSize > 1024 then
NeedSpaceLabel.Caption := 'Òðåáóåòñÿ ìåñòà íà äèñêå: '+ FloatToStr(round(NeedSize/1024*100)/100) + ' GB' else
NeedSpaceLabel.Caption := 'Òðåáóåòñÿ ìåñòà íà äèñêå: '+ IntToStr(NeedSize)+ ' MB';
end;
function MakeDesktopIcon: Boolean;
begin
Result:=DesktopIcon.Checked;
end;
Function InstallDop:Boolean;
begin
Result:=Dop.Checked;
end;
Function MultiByteToWideChar(CodePage: UINT; dwFlags: DWORD; lpMultiByteStr: string; cbMultiByte: integer; lpWideCharStr: string; cchWideChar: integer): longint; external 'MultiByteToWideChar@kernel32.dll stdcall';
Function WideCharToMultiByte(CodePage: UINT; dwFlags: DWORD; lpWideCharStr: string; cchWideChar: integer; lpMultiByteStr: string; cbMultiByte: integer; lpDefaultChar: integer; lpUsedDefaultChar: integer): longint; external 'WideCharToMultiByte@kernel32.dll stdcall';
function PeekMessage(var lpMsg: TMyMsg; hWnd: HWND; wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; external 'PeekMessageA@user32.dll stdcall';
function TranslateMessage(const lpMsg: TMyMsg): BOOL; external 'TranslateMessage@user32.dll stdcall';
function DispatchMessage(const lpMsg: TMyMsg): Longint; external 'DispatchMessageA@user32.dll stdcall';
Function OemToChar(lpszSrc, lpszDst: AnsiString): longint; external 'OemToCharA@user32.dll stdcall';
function GetWindowLong(hWnd, nIndex: Integer): Longint; external 'GetWindowLongA@user32 stdcall delayload';
function SetWindowText(hWnd: Longint; lpString: String): Longint; external 'SetWindowText{#A}@user32 stdcall delayload';
function GetTickCount: DWord; external 'GetTickCount@kernel32';
function WrapFreeArcCallback (callback: TFreeArcCallback; paramcount: integer):longword; external 'wrapcallback@files:innocallback.dll stdcall';
function FreeArcExtract (callback: longword; cmd1,cmd2,cmd3,cmd4,cmd5,cmd6,cmd7,cmd8,cmd9,cmd10: PAnsiChar): integer; external 'FreeArcExtract@files:unarc.dll cdecl';
procedure AppProcessMessage;
var
Msg: TMyMsg;
begin
while PeekMessage(Msg, WizardForm.Handle, 0, 0, PM_REMOVE) do begin
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
end;
Function NumToStr(Float: Extended): String; {Ïåðåâîä ÷èñëà â ñòðîêó ñ òî÷íîñòüþ 3 çíàêà (%.3n) ñ îêðóãëåíèåì äðîáíîé ÷àñòè, åñëè îíà åñòü}
Begin
Result:= Format('%.3n', [Float]); StringChange(Result, ',', '.'); while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Length(Result) > 1) do SetLength(Result, Length(Result)-1);
End;
function cm(Message: String): String; Begin Result:= ExpandConstant('{cm:'+ Message +'}') End;
Function Size64(Hi, Lo: Integer): Extended;
Begin
Result:= Lo; if Lo< 0 then Result:= Result + $7FFFFFFF + $7FFFFFFF + 2; for Hi:= Hi-1 Downto 0 do Result:= Result + $7FFFFFFF + $7FFFFFFF + 2;
End;
// OnClick event function for btnCancel
procedure btnCancelUnpackingOnClick(Sender: TObject);
begin
if MsgBox( SetupMessage( msgExitSetupMessage ), mbInformation, MB_YESNO ) = IDYES then
CancelCode:= -127;
end;
// Scans the specified folders for archives and add them to list
function FindArcs(dir: string): Extended;
var
FSR: TFindRec;
Begin
if FindFirst(ExpandConstant(dir), FSR) then
try
repeat
// Skip everything but the folders
if FSR.Attributes and FILE_ATTRIBUTE_DIRECTORY > 0 then CONTINUE;
n:= GetArrayLength(Arcs);
// Expand the folder list
SetArrayLength(Arcs, n +1);
Arcs[n].Path:= ExtractFilePath(ExpandConstant(Archives)) + FSR.Name;
Arcs[n].Size:= Size64(FSR.SizeHigh, FSR.SizeLow);
Result:= Result + Arcs[n].Size;
until not FindNext(FSR);
finally
FindClose(FSR);
end;
End;
// Converts OEM encoded string into ANSI
// Ïðåîáðàçóåò OEM ñòðîêó â ANSI êîäèðîâêó
function OemToAnsiStr( strSource: AnsiString): AnsiString;
var
nRet : longint;
begin
SetLength( Result, Length( strSource ) );
nRet:= OemToChar( strSource, Result );
end;
// Converts ANSI encoded string into UTF-8
// Ïðåîáðàçóåò ñòðîêó èç ANSI â UTF-8 êîäèðîâêó
function AnsiToUtf8( strSource: string ): string;
var
nRet : integer;
WideCharBuf: string;
MultiByteBuf: string;
begin
strSource:= strSource + chr(0);
SetLength( WideCharBuf, Length( strSource ) * 2 );
SetLength( MultiByteBuf, Length( strSource ) * 2 );
nRet:= MultiByteToWideChar( CP_ACP, 0, strSource, -1, WideCharBuf, Length(WideCharBuf) );
nRet:= WideCharToMultiByte( CP_UTF8, 0, WideCharBuf, -1, MultiByteBuf, Length(MultiByteBuf), 0, 0);
Result:= MultiByteBuf;
end;
// Sets the TaskBar title
Procedure SetTaskBarTitle(Title: String); var h: Integer;
Begin
h:= GetWindowLong(MainForm.Handle, -8); if h <> 0 then SetWindowText(h, Title);
End;
// Converts milliseconds to standart time
Function TicksToTime(Ticks: DWord; detail: Boolean): String; Begin {ìèëèñåêóíäû â ñòàíäàðòíîå âðåìÿ}
if detail or (Ticks/3600 >= 1000) {hour} then if Ticks/3600000 > 23 then Result:= cm('LongTime') else Result:= PADZ(IntToStr(Ticks/3600000), 2) +':'+ PADZ(IntToStr((Ticks/1000 - Ticks/1000/3600*3600)/60), 2) +':'+ PADZ(IntToStr(Ticks/1000 - Ticks/1000/60*60), 2) else if Ticks/60 < 1000 {min} then Result:= IntToStr(Ticks/1000) +'.'+ NumToStr(trunc((Ticks/1000 - trunc(Ticks/1000))*10)) +'s' else Result:= IntToStr(Ticks/60000) +'m '+ PADZ(IntToStr(Ticks/1000 - Ticks/1000/60*60), 2) +'s';
End;
// The main callback function for unpacking FreeArc archives
function FreeArcCallback (what: PAnsiChar; Mb, sizeArc: Integer; str: PAnsiChar): Integer;
var
percents, Elapsed: Integer;
begin
if string(what)='filename' then
else
if (string(what)='progress') and (sizeArc>0) then
// Update progress bar with additional info
with WizardForm.ProgressGauge do
begin
// Calculate current percents
percents:= (Mb*1000) div sizeArc;
ProgressBar.Position:= percents;
ExtractFile.Caption:= FmtMessage(cm('ArcInfo'), [IntToStr(Mb), IntToStr(sizeArc), Format('%.1n', [Abs(percents/10)]), IntToStr(n+1), IntToStr(GetArrayLength(Arcs)) ]);
Position:= Tag + round(ProgressBar.Position * m)
percents:= (Position-Min)/((Max - Min)/1000)
WizardForm.FileNameLabel.Caption:= FmtMessage(cm('AllProgress'), [Format('%.1n', [Abs(percents/10)])]);
if position > 0 then Elapsed:= trunc((GetTickCount - StartInstall) * Abs((max - position)/position)) else Elapsed:= 0;
// Update the taskbar title
if Elapsed = 0 then SetTaskBarTitle(cm('ending')) else SetTaskBarTitle(FmtMessage(cm('remains'), [IntToStr(percents/10), TicksToTime(Elapsed, false)]));
end;
AppProcessMessage;
Result:= CancelCode;
end;
// Extracts all found archives
function UnPack(Archives: string): Integer;
var
allSize: Extended;
callback: longword;
FreeMB, TotalMB: Cardinal;
begin
// Show the 'Cancel unpacking' button and set it as default button
btnCancelUnpacking.Show;
WizardForm.ActiveControl:= btnCancelUnpacking;
WizardForm.ProgressGauge.Position:= 0;
WizardForm.ProgressGauge.Max:= 1000;
// Get the size of all archives
allSize:= FindArcs(Archives);
for n:= 0 to GetArrayLength(Arcs) -1 do
begin
m:= Arcs[n].Size/allSize; // Size of the current archive (îáú¸ì òåêóùåãî àðõèâà)
WizardForm.ProgressGauge.Tag:= WizardForm.ProgressGauge.Position;
CancelCode:= 0;
AppProcessMessage;
callback:= WrapFreeArcCallback(@FreeArcCallback,4); //FreeArcCallback has 4 arguments
try
// Pass the specified arguments to 'unarc.dll'
Result:= FreeArcExtract (callback, 'x', '-o+', '-dp' + AnsiToUtf8( ExpandConstant('{app}') ), '--', Arcs[n].Path, '', '', '', '', '');
if Result = 0 then Result:= CancelCode;
except
Result:= -63; // ArcFail
end;
// Error occured
if Result <> 0 then
begin
msgError:= FmtMessage(cm('ArcError'), [IntToStr(Result)]);
GetSpaceOnDisk(ExtractFileDrive(ExpandConstant('{app}')), True, FreeMB, TotalMB);
case Result of
-1: if FreeMB < 32 {Ìá íà äèñêå} then msgError:= SetupMessage(msgDiskSpaceWarningTitle)
else msgError:= msgError + #13#10 + FmtMessage(cm('ArcBroken'), [ExtractFileName(Arcs[n].Path)]);
-127: msgError:= cm('ArcBreak'); //Cancel button
-63: msgError:= cm('ArcFail');
end;
// MsgBox(msgError, mbInformation, MB_OK); //ñîîáùåíèå ïîêàçûâàåòñÿ íà ñòðàíèöå çàâåðøåíèÿ
Log(msgError);
Break; //ïðåðâàòü öèêë ðàñïàêîâêè
end;
end;
// Hide the button
btnCancelUnpacking.visible:= false;
end;
procedure CurStepChanged(CurStep: TSetupStep);
var
ResultCode:integer;
begin
if CurStep = ssInstall then StartInstall:= GetTickCount; {âðåìÿ íà÷àëà ðàñïàêîâêè}
if CurStep = ssPostInstall then
begin
UnPackError:= UnPack(Archives)
if UnPackError = 0 then begin
{--------------------------------------------------------------------------Äîáàâèë DeKaN(DeKaNszn)--------------------------------------------------------------------------}
{--------------------------------------------------------------------------Äîáàâèë DeKaN(DeKaNszn)--------------------------------------------------------------------------}
SetTaskBarTitle(SetupMessage(msgSetupAppTitle)); end
else
begin
// Error occured, uninstall it then
Exec(ExpandConstant('{uninstallexe}'), '/SILENT','', sw_Hide, ewWaitUntilTerminated, n); //îòêàò óñòàíîâêè èç-çà îøèáêè unarc.dll
SetTaskBarTitle(SetupMessage(msgErrorTitle))
WizardForm.Caption:= SetupMessage(msgErrorTitle) +' — '+ cm('ArcBreak')
end;
end;
end;
// ñòàíäàðòíûé ñïîñîá îòêàòà (íå íóæíà CurPageChanged), íî àðõèâû ðàñïàêîâûâàþòñÿ äî èçâëå÷åíèÿ ôàéëîâ èíñòàëëÿòîðà
// if CurStep = ssInstall then
// if UnPack(Archives) <> 0 then Abort;
Procedure CurPageChanged(CurPageID: Integer);
Begin
PageNameLabel.Caption := WizardForm.PageNameLabel.Caption;
PageDescriptionLabel.Caption := WizardForm.PageDescriptionLabel.Caption;
if (CurPageID = wpFinished) and (UnPackError <> 0) then
begin // ðàñïàêîâùèê âåðíóë îøèáêó
WizardForm.FinishedLabel.Font.Color:= $0000C0; //êðàñíûé
WizardForm.FinishedLabel.Height:= WizardForm.FinishedLabel.Height * 2;
WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) + #13#10#13#10 + msgError;
end;
begin
If CurPageID=wpSelectDir then
begin
WizardForm.BackButton.Enabled := False;
end;
if CurPageID=wpSelectDir then begin
WizardForm.NextButton.Caption:='Óñòàíîâèòü';
GetNeedSpaceCaption;
if FreeMB < NeedSize then
WizardForm.NextButton.Enabled:=False
end;
End;
end;
procedure InitializeWizard();
var
WLabel1, WLabel2,
FLabel1, FLabel2: TLabel;
begin
WizardForm.BorderStyle := bsDialog;
ProgressBar:= TNewProgressBar.Create(WizardForm);
ExtractFile:=TNewStaticText.Create(WizardForm);
lblExtractFileName:= TLabel.Create( WizardForm );
with WizardForm.ProgressGauge do
begin
// Create a label to show current FileName being extracted
lblExtractFileName.parent:=WizardForm.InstallingPage;
lblExtractFileName.autosize:=false;
lblExtractFileName.Width:= Width;
lblExtractFileName.top:=Top + ScaleY(35);
lblExtractFileName.Caption:= '';
// Create a label to show percentage
ExtractFile.parent:=WizardForm.InstallingPage;
ExtractFile.autosize:=false;
ExtractFile.Width:= Width;
ExtractFile.top:=lblExtractFileName.Top + ScaleY(16);
ExtractFile.caption:=cm('ArcTitle');
// Create a separate progress bar
ProgressBar.SetBounds(Left, ExtractFile.Top + ScaleY(16), Width, Height);
ProgressBar.Parent:= WizardForm.InstallingPage;
ProgressBar.max:= 1000;
ProgressBar.Position:= 0;
end;
// Create a 'Cancel unpacking' button and hide it for now.
btnCancelUnpacking:=TButton.create(WizardForm);
btnCancelUnpacking.Parent:= WizardForm;
btnCancelUnpacking.SetBounds(260, WizardForm.cancelbutton.top, 135, WizardForm.cancelbutton.Height);
btnCancelUnpacking.OnClick:= @btnCancelUnpackingOnClick;
btnCancelUnpacking.Caption:= cm('ArcCancel');
btnCancelUnpacking.Hide;
DesktopIcon := TCheckBox.Create(WizardForm);
with DesktopIcon do
begin
Parent := WizardForm.SelectDirPage;
Caption := 'Äîáàâèòü ÿðëûê íà ðàáî÷èé ñòîë';
Left := ScaleX(0);
Top := WizardForm.DirEdit.Top+35;
Width := ScaleX(400);
Height := ScaleY(15);
TabOrder := 0;
Checked := True;
end;
dop := TCheckBox.Create(WizardForm);
with Dop do
begin
Parent := WizardForm.SelectDirPage;
Caption := 'Óñòàíîâèòü Game for Windows -LIVE (òðåáóåòñÿ ïîäêëþ÷åíèå ê èíòåðíåòó)';
Left := ScaleX(0);
Top := WizardForm.DirEdit.Top+55;
Width := ScaleX(400);
Height := ScaleY(15);
TabOrder := 0;
Checked := True;
end;
NeedSize := 3220;
WizardForm.DiskSpaceLabel.Hide;
NeedSpaceLabel := TLabel.Create(WizardForm);
with NeedSpaceLabel do
begin
Parent := WizardForm.SelectDirPage;
Left := ScaleX(0);
Top := ScaleY(202);
Width := ScaleX(209);
Height := ScaleY(13);
end;
FreeSpaceLabel := TLabel.Create(WizardForm);
with FreeSpaceLabel do
begin
Parent := WizardForm.SelectDirPage;
Left := ScaleX(0);
Top := ScaleY(220);
Width := ScaleX(209);
Height := ScaleY(13);
end;
WizardForm.DirEdit.OnChange := @GetFreeSpaceCaption;
WizardForm.DirEdit.Text := WizardForm.DirEdit.Text + #0;
PageNameLabel := TLabel.Create(WizardForm);
with PageNameLabel do
begin
Left := ScaleX(10);
Top := ScaleY(10);
Width := ScaleX(300);
Height := ScaleY(14);
AutoSize := False;
WordWrap := True;
Font.Color := clWhite;
Font.Style := [fsBold];
Transparent := True;
Parent := WizardForm.MainPanel;
end;
PageDescriptionLabel := TLabel.Create(WizardForm);
with PageDescriptionLabel do
begin
Left := ScaleX(15);
Top := ScaleY(25);
Width := ScaleX(475);
Height := ScaleY(30);
AutoSize := False;
WordWrap := True;
Font.Color := clWhite;
Transparent := True;
Parent := WizardForm.MainPanel;
end;
with WizardForm do
begin
PageNameLabel.Hide;
PageDescriptionLabel.Hide;
with MainPanel do
begin
with WizardSmallBitmapImage do
begin
Left := ScaleX(0);
Top := ScaleY(0);
Width := Mainpanel.Width;
Height := MainPanel.Height;
end;
end;
end;
WizardForm.WelcomeLabel1.Hide;
WizardForm.WelcomeLabel2.Hide;
WizardForm.FinishedHeadingLabel.Hide;
WizardForm.FinishedLabel.Hide;
WizardForm.WizardBitmapImage.Width := WizardForm.Width;
WizardForm.WizardBitmapImage.Height := WizardForm.Height;
WizardForm.WizardBitmapImage.Width := 497;
WizardForm.WizardBitmapImage.Height := 313;
WizardForm.WizardSmallBitmapImage.Width:=497;
WizardForm.WizardSmallBitmapImage.Height:=58;
WLabel1 := TLabel.Create(WizardForm);
WLabel1.Left := ScaleX(176);
WLabel1.Top := ScaleY(16);
WLabel1.Width := ScaleX(301);
WLabel1.Height := ScaleY(54);
WLabel1.AutoSize := False;
WLabel1.WordWrap := True;
WLabel1.Font.Size := 12;
WLabel1.Font.Style := [fsBold];
WLabel1.Font.Color:= clBlack;
WLabel1.ShowAccelChar := False;
WLabel1.Caption := WizardForm.WelcomeLabel1.Caption;
WLabel1.Transparent := True;
WLabel1.Parent := WizardForm.WelcomePage;
WLabel2 :=TLabel.Create(WizardForm);
WLabel2.Top := ScaleY(76);
WLabel2.Left := ScaleX(176);
WLabel2.Width := ScaleX(301);
WLabel2.Height := ScaleY(234);
WLabel2.AutoSize := False;
WLabel2.WordWrap := True;
WLabel2.Font.Color:= clBlack;
WLabel2.ShowAccelChar := False;
WLabel2.Caption := WizardForm.WelcomeLabel2.Caption;
WLabel2.Transparent := True;
WLabel2.Parent := WizardForm.WelcomePage;
WizardForm.WizardBitmapImage2.Width := WizardForm.Width;
WizardForm.WizardBitmapImage2.Height := WizardForm.Height;
FLabel1 := TLabel.Create(WizardForm);
FLabel1.Left := ScaleX(176);
FLabel1.Top := ScaleY(16);
FLabel1.Width := ScaleX(301);
FLabel1.Height := ScaleY(54);
FLabel1.AutoSize := False;
FLabel1.WordWrap := True;
FLabel1.Font.Size := 12;
FLabel1.Font.Style := [fsBold];
FLabel1.Font.Color:= clBlack;
FLabel1.ShowAccelChar := False;
FLabel1.Caption := WizardForm.FinishedHeadingLabel.Caption;
FLabel1.Transparent := True;
FLabel1.Parent := WizardForm.FinishedPage;
FLabel2 :=TLabel.Create(WizardForm);
FLabel2.Top := ScaleY(76);
FLabel2.Left := ScaleX(176);
FLabel2.Width := ScaleX(301);
FLabel2.Height := ScaleY(53);
FLabel2.AutoSize := False;
FLabel2.WordWrap := True;
FLabel2.Font.Color:= clBlack;
FLabel2.ShowAccelChar := False;
FLabel2.Caption := '' #13#13
'';
FLabel2.Transparent := True;
FLabel2.Parent := WizardForm.FinishedPage;
FLabel1.Caption := WizardForm.FinishedHeadingLabel.Caption;
FLabel1.Transparent := True;
FLabel1.Parent := WizardForm.FinishedPage;
WizardForm.WizardBitmapImage2.Width := 497;
WizardForm.WizardBitmapImage2.Height := 313;
FLabel2 :=TLabel.Create(WizardForm);
FLabel2.Top := ScaleY(76);
FLabel2.Left := ScaleX(176);
FLabel2.Width := ScaleX(301);
FLabel2.Height := ScaleY(53);
FLabel2.AutoSize := False;
FLabel2.WordWrap := True;
FLabel2.Font.Color:= clWhite;
end;
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
Res: Integer;
begin
case CurUninstallStep of
usPostUninstall:
begin
//Ïðîâåðÿåì ïðèñóòñòâèå ïàïêè ïîñëå óäàëåíèÿ
If DirExists(ExpandConstant('{userappdata}\FUEL')) then
//Ñîçäàåì äèàëîã ñ òðåìÿ êíîïêàìè
case MsgBox('Óäàëèòü ñîõðàíåíèÿ è íàñòðîéêè èãðû ?', mbInformation, MB_YESNO) of
IDYES:
begin
if not DelTree(ExpandConstant('{userappdata}\FUEL'), True, True, True) then
MsgBox('Ïàïêà íå óäàëåíà.' #13#13 'Ïàïêà èëè îäèí èç ôàéëîâ â íåé çàäåéñòâîâàíû äðóãèì ïðèëîæåíèåì.', mbError, MB_OK);
end;
IDCANCEL:
begin
Exit;
end;
end;
end;
end;
end;
|
|