prosaymon
 
  
  Newbie | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Братцы, помогите прикрутить распаковку free-ark"а в мой скрип    Код:  [Setup]   SourceDir=.   OutputDir=Setup   AppName=Мадагаскар 2   AppVerName=Мадагаскар 2   AppVersion=Мадагаскар 2   AppPublisher=saymon   AppCopyright=saymon   DefaultDirName={pf}\Мадагаскар 2   DefaultGroupName=Мадагаскар 2   AllowNoIcons=yes   OutputBaseFilename=setup   WindowVisible=false   WindowShowCaption=false   WindowResizable=false   Compression=lzma/normal   DiskSpanning=yes   DiskSliceSize=5242880   SlicesPerDisk=1   WizardImageFile=C:\Users\Cемён\Desktop\RePacker\background.bmp   WizardSmallImageFile=C:\Users\Cемён\Desktop\RePacker\small.bmp   SetupIconFile=C:\00000.ico      [Languages]   Name: russian; MessagesFile: compiler:Languages\Russian.isl      [Messages]   BeveledLabel=repack by Avi 2010 © al'akir - nk   [Messages]   DiskSpaceMBLabel=Требуется как минимум 4,02 Гб свободного дискового пространства.   [CustomMessages]   russian.Space_1=Требуется места на винчестере:   russian.Space_2=Доступно места на винчестере:      [Code]   var   SelectDirText_1: TLabel;   FreeMB, TotalMB: Cardinal;   NeedSize: Integer;      Function NumToStr(Float: Extended): String;   Begin   Result:= Format('%.2n', [Float]); StringChange(Result, ',', '.');   while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Pos('.', Result) > 0) do   SetLength(Result, Length(Result)-1);   End;      procedure GetFreeSpaceCaption(Sender: TObject);   var   Path: String;   begin   Path := ExtractFileDrive(WizardForm.DirEdit.Text);   GetSpaceOnDisk(Path, True, FreeMB, TotalMB);   if FreeMB > 1024 then   SelectDirText_1.Caption := ExpandConstant('{cm:SPACE_2} ')+ NumToStr(round(FreeMB/1024*100)/100) + ' GB'   else   SelectDirText_1.Caption := ExpandConstant('{cm:SPACE_2} ')+ NumToStr(FreeMB)+ ' MB';      if FreeMB < NeedSize then   begin   SelectDirText_1.Font.Color:= ClRed;   WizardForm.NextButton.Enabled := False;   end else   begin   SelectDirText_1.Font.Color:= ClRed;   WizardForm.NextButton.Enabled := True;   end   end;      procedure GetNeedSpaceCaption;   begin   if NeedSize > 1024 then   WizardForm.DiskSpaceLabel.Caption := ExpandConstant('{cm:SPACE_1} ')+ NumToStr(round(NeedSize/1024*100)/100) + ' GB' else   WizardForm.DiskSpaceLabel.Caption := ExpandConstant('{cm:SPACE_1} ')+ NumToStr(NeedSize)+ ' MB';      if FreeMB < NeedSize then   begin   SelectDirText_1.Font.Color:= Clgray;   WizardForm.NextButton.Enabled := False;   end else   begin   SelectDirText_1.Font.Color:= clgray;   WizardForm.NextButton.Enabled := True;   end   end;      procedure CurPageChanged(CurPageID: Integer);   begin   If CurPageID=wpSelectDir then   begin   NeedSize:= 4500; //тут указываем размер (вписывать разные значения в мБ)      SelectDirText_1:= TLabel.Create(WizardForm);   with SelectDirText_1 do   begin   Parent:= WizardForm.SelectDirPage;   Top:= ScaleY(220);   Width:= ScaleX(209);   Height:= ScaleY(13);   Font.Size:= 8;   Font.Color:= Clgray;   Transparent:= True;   end;      WizardForm.DiskSpaceLabel.Top:= ScaleY(200);   WizardForm.DirEdit.OnChange:= @GetFreeSpaceCaption;   WizardForm.DirEdit.Text:= WizardForm.DirEdit.Text + #0;   GetNeedSpaceCaption;   end;   end;   [Tasks]   Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}      Name: dop; Description: Обновить DirectX; GroupDescription: Системные задачи:   [Files]   Source: ISSkin.dll; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression   Source: steam.cjstyles; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression   Source: isgsg.dll; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression   Source: bass.dll; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression   Source: C:\Users\Cемён\Desktop\RePacker\doroga.mp3; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression      Source: D:\games\1\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension     ; [Files]:   Source: logo.bmp; DestDir: {tmp}; Flags: dontcopy nocompression solidbreak   [Code]   var   LogoImage:TBitmapImage;   LogoLabel: TLabel;   procedure LogoOnClick(Sender: TObject);   var ReturnCode: Integer;   begin   ShellExec('open', 'http://vkontakte.ru/id72003761', '', '', SW_SHOWNORMAL, ewNoWait, ReturnCode)   end;   procedure InitializeWizard();   var   LogoPanel : TPanel;   begin   ExtractTemporaryFile('logo.bmp');   LogoPanel := TPanel.Create(WizardForm);   with LogoPanel do   begin   Parent := WizardForm;   Left := ScaleX(5);   Top := ScaleY(320);   Width := ScaleX(165);   Height := ScaleY(35);   BevelOuter := bvNone;   end;   begin   with WizardForm do begin   with MainPanel do   Height := Height - 1;   with WizardSmallBitmapImage do begin   Left := 0;   Top := 0;   Height := 58; //Размер рисунка   Width := 497; //   end;   with PageNameLabel do begin   Width := Width - 1002; //Поставьте здесь значения на 0, если хотите вернуть текст   Left := Left + 1002; //   end;   with PageDescriptionLabel do begin   Width := Width - 1002; //Поставьте здесь значения на 0, если хотите вернуть текст   Left := Left + 1002; //   end;   end;   end   LogoImage := TBitmapImage.Create(WizardForm);   with LogoImage do   begin   Parent := LogoPanel;   Left := ScaleX(0);   Top := ScaleY(0);   AutoSize:=true;   ReplaceColor:=clFuchsia;   ReplaceWithColor:=clBtnFace;   Bitmap.LoadFromFile(ExpandConstant('{tmp}\logo.bmp'));   end;   LogoLabel := TLabel.Create(WizardForm);   with LogoLabel do   begin   Parent := LogoPanel;   Width := LogoPanel.Width;   Height := LogoPanel.Height;   Transparent:=True;   Cursor := crHand;   OnClick:=@LogoOnClick;   end;   end;   const     Indent=10;      procedure ShowMP3Panel(hMainFrm:HWND;StartVolume:integer;DefMP3Dir,BASSDir,MLabel:PChar;IsShowMP3Info,IsBkgFrmVisible:boolean;ShowTimeMP3Info:integer;dBottom:integer);external 'ShowMP3Panel@files:isgsg.dll stdcall';   procedure KillMP3Panel;external 'KillMP3Panel@files:isgsg.dll stdcall';   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('doroga.mp3');     ExtractTemporaryFile('bass.dll');     ExtractTemporaryFile('steam.cjstyles');     LoadSkin(ExpandConstant('{tmp}')+'\steam.cjstyles', '');     Result:=True;   end;         procedure DeinitializeSetup;   begin     KillMP3Panel;     ShowWindow(WizardForm.Handle,0);     UnloadSkin();   end;   [Icons]   Name: {group}\Мадагаскар 2; Filename: {app}\Mad2.exe; WorkingDir: {app}   Name: {userdesktop}\Мадагаскар 2; Filename: {app}\Mad2.exe; WorkingDir: {app}; Tasks: desktopicon   Name: {group}\{cm:UninstallProgram,Мадагаскар 2}; Filename: {uninstallexe}   [Run]   Description: {cm:LaunchProgram, Мадагаскар 2}; Filename: {app}\Mad2.exe; WorkingDir: {app}; Flags: nowait postinstall skipifsilent unchecked   Filename: {src}\DirectX\DXSETUP.exe; Parameters: /silent; Flags: skipifdoesntexist; WorkingDir: {src}\DirectX; StatusMsg: Installing DirectX, please wait...; Tasks: dop   Filename: {src}\Data.exe; WorkingDir: {app}; Parameters: -x -y -s2 -d.; StatusMsg: Идет распаковка данных, подождите пожалуйста...; Flags: runasoriginaluser;  MinVersion: 4.0,5.0   [UninstallDelete]   Type: filesandordirs; Name: {app}   |       |