lol2xD
Junior Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору #include "ExecAndWait.iss" [Setup] OutputDir=. AppName=TST AppVerName=TST AppVersion=TST DefaultDirName={pf}\TST DefaultGroupName=TST AllowNoIcons=true OutputBaseFilename=setup WindowVisible=false WindowShowCaption=false WindowResizable=false Compression=lzma/ultra64 DiskSpanning=false DiskSliceSize=1560000000 SlicesPerDisk=3 AppID={{55F10032-CEF5-446F-8EE3-80910E25DE8E} UsePreviousAppDir=false UsePreviousGroup=false UsePreviousSetupType=false UsePreviousTasks=false InternalCompressLevel=ultra64 [Languages] Name: rus; MessagesFile: compiler:Languages\Russian.isl [CustomMessages] rus.unpack=Распаковка файлов... [Files] ;Source: *.arc; DestDir: {app}; Flags: nocompression Source: Unpack.dll; DestDir: {tmp} [UninstallDelete] Type: filesandordirs; Name: {app} [Tasks] Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons} Name: rustext; Description: Русский; GroupDescription: Язык интерфейса:; Flags: exclusive Name: engtext; Description: Англиский; GroupDescription: Язык интерфейса:; Flags: exclusive Name: rusSound; Description: Русский; GroupDescription: Язык озвучки:; Flags: exclusive Name: engSound; Description: Англиский; GroupDescription: Язык озвучки:; Flags: exclusive [Code ] var ProgressBar1: TNewProgressBar; procedure InitializeWizard(); begin WizardForm.StatusLabel.Caption:= ExpandConstant('{cm:unpack} '); WizardForm.FileNameLabel.Visible:=False; WizardForm.ProgressGauge.Top:=ScaleY(100); WizardForm.ProgressGauge.Width:=262; WizardForm.ProgressGauge.Left:=155; WizardForm.StatusLabel.Top:=ScaleY(81); WizardForm.WelcomeLabel2.Top:=ScaleY(90); ProgressBar1 := TNewProgressBar.Create(wizardform); with ProgressBar1 do begin Parent := wizardform.installingpage; Top := 100; Width := 150; Height := wizardform.progressgauge.height; Max :=16; end; end; procedure CurStepChanged(CurStep: TSetupStep); var ResultCode:Integer; begin if CurStep = ssInstall then //Перед установкой begin ExtractTemporaryFile('Unpack.dll'); ProgressBar1.Position := ProgressBar1.Position+1 //Извлечение Unpack.dll в Temp begin WizardForm.StatusLabel.Caption:= ExpandConstant('{cm:unpack} '); ExtractTemporaryFile('Unpack.dll'); //Извлечение из 1-го архива ExecAndWait(ExpandConstant('{tmp}\Unpack.dll'), 'x '+AddQuotes(ExpandConstant('{src}\setup1.bin'))+' -y -dp'+AddQuotes(ExpandConstant('{app}')), '', SW_HIDE, True); ProgressBar1.Position := ProgressBar1.Position+1 //rusSound begin if IsTaskSelected('rusSound') then WizardForm.StatusLabel.Caption:= ExpandConstant('{cm:unpack} '); ExecAndWait(ExpandConstant('{tmp}\Unpack.dll'), 'x '+AddQuotes(ExpandConstant('{src}\data-1b.bin'))+' -y -dp'+AddQuotes(ExpandConstant('{app}')), '', SW_HIDE, True); ExecAndWait(ExpandConstant('{app}\main\decode.dll'), '', ExpandConstant('{app}\main'), SW_HIDE,true); ExecAndWait(ExpandConstant('{app}\main\video\mix.dll'), '', ExpandConstant('{app}'), SW_HIDE,true); ProgressBar1.Position := ProgressBar1.Position+1 end; //ENGSound begin if IsTaskSelected('engSound') then WizardForm.StatusLabel.Caption:= ExpandConstant('{cm:unpack} '); ExecAndWait(ExpandConstant('{tmp}\Unpack.dll'), 'x '+AddQuotes(ExpandConstant('{src}\data-1c.bin'))+' -y -dp'+AddQuotes(ExpandConstant('{app}')), '', SW_HIDE, True); ExecAndWait(ExpandConstant('{app}\main\decode.dll'), '', ExpandConstant('{app}\main'), SW_HIDE,true); ProgressBar1.Position := ProgressBar1.Position+1 end; //RUStext begin if IsTaskSelected('rustext') then WizardForm.StatusLabel.Caption:= ExpandConstant('{cm:unpack} '); ExecAndWait(ExpandConstant('{tmp}\Unpack.dll'), 'x '+AddQuotes(ExpandConstant('{src}\data-2b.bin'))+' -y -dp'+AddQuotes(ExpandConstant('{app}')), '', SW_HIDE, True); ProgressBar1.Position := ProgressBar1.Position+1 end; //engText begin if IsTaskSelected('engtext') then WizardForm.StatusLabel.Caption:= ExpandConstant('{cm:unpack} '); ExecAndWait(ExpandConstant('{tmp}\Unpack.dll'), 'x '+AddQuotes(ExpandConstant('{src}\data-2c.bin'))+' -y -dp'+AddQuotes(ExpandConstant('{app}')), '', SW_HIDE, True); ProgressBar1.Position := ProgressBar1.Position+1 end; end; end; end; |