Новый участник
Сообщения: 38
Благодарности: 0
|
Профиль
|
Отправить PM
| Цитировать
Что то не хочет у меня работать скрипт от z10y_ded',нет ни прогресс-бара ни распаковки архива.
Вот скрипт:
читать дальше »
Код:
[Setup]
AppName=My Program
AppVerName=My Program v 1.5
DefaultDirName={pf}\My Program
OutputDir=D:\123
Compression=lzma/ultra
SolidCompression=yes
[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl
[Files]
Source: D:\*******\arc.dll; Flags: dontcopy
Source: C:\Program Files\FreeArc\bin\Arc.exe; DestDir: {app}; Flags: ignoreversion
Source: C:\DirectX.arc; DestDir: {app}; Flags: ignoreversion skipifsourcedoesntexist
[UninstallDelete]
Name: {app}; Type: filesandordirs
[_Code]
procedure InitPBarz(wizpbhwnd,pbhwnd:THandle; pbLengt:integer);
external 'InitPBarz@files:arc.dll stdcall';
procedure StartArcExtract(freearc,params:pchar; var ReturnCode:integer);
external 'StartArcExtract@files:arc.dll stdcall';
procedure CancelExtract;
external 'CancelExtract@files:arc.dll stdcall';
procedure RepeatExtract;
external 'RepeatExtract@files:arc.dll stdcall';
procedure SuspendExtract;
external 'SuspendExtract@files:arc.dll stdcall';
procedure ResumeExtract;
external 'ResumeExtract@files:arc.dll stdcall';
procedure UpdateWizGauge;
external 'UpdateWizGauge@files:arc.dll stdcall';
procedure SkipError;
external 'SkipError@files:arc.dll stdcall';
function MessageBox(hWnd: Integer; lpText, lpCaption: String; uType: Cardinal): Integer;
external 'MessageBoxA@user32.dll stdcall';
const
MB_ICONQUESTION = $20;
var
SecondProgressBar: TNewProgressBar;
procedure InitializeWizard();
begin
SecondProgressBar := TNewProgressBar.Create(WizardForm);
with SecondProgressBar do
begin
Parent := wizardform.InstallingPage;
Left := ScaleX(wizardform.progressgauge.left);
Top := ScaleY(wizardform.progressgauge.top);
Width := ScaleX(wizardform.progressgauge.Width);
Height := ScaleY(wizardform.progressgauge.Height);
end;
end;
procedure CancelButtonClick(CurPage: Integer; var Cancel, Confirm: Boolean);
begin
if curpage=wpInstalling then begin
Cancel:=False;
Confirm:=False;
SuspendExtract;
case MessageBox(StrToInt(ExpandConstant('{wizardhwnd}')), setupmessage(msgExitSetupMessage), setupmessage(msgExitSetupTitle), MB_YESNO or MB_defbutton2 or MB_ICONQUESTION) of
idyes: begin CancelExtract Cancel:=true end;
idno: ResumeExtract;
end
end
end;
procedure CurStepChanged(CurStep: TSetupStep);
var returnCode:integer;
begin
if CurStep = ssInstall then
begin
WizardForm.StatusLabel.Caption:=SetupMessage(msgStatusExtractFiles);
ExtractTemporaryFile('arc.exe');
InitPBarz(wizardform.progressgauge.handle,secondprogressbar.Handle,200) //Последнее значение задается в зависимости от кол-ва архивов + 100. То есть - если их 3, то пишем 400, если 1, то 200.
StartArcExtract(ExpandConstant('{tmp}\Arc.exe'), 'x '+AddQuotes(AddBackslash(ExpandConstant('{src}'))+'data-a.bin')+' -y -dp'+AddQuotes(ExpandConstant('{app}')), ReturnCode)
UpdateWizGauge;
end;
end;
|
Отправлено: 02:15, 12-06-2009
| #927
|