Advertisement
Guest User

Untitled

a guest
Jan 8th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 19.34 KB | None | 0 0
  1. #define NeedSize "5000000000"
  2.  
  3. #define NeedMem 512
  4.  
  5. #define SecondProgressBar
  6.  
  7. ;#define Components
  8.  
  9. ;#define records
  10.  
  11. ;#define facompress
  12.  
  13. ;#define PrecompInside
  14. ;#define SrepInside
  15. ;#define MSCInside
  16. ;#define precomp "0.42"
  17. ;#define unrar
  18. ;#define XDelta
  19. ;#define PackZIP
  20.  
  21. [Setup]
  22. AppName=CSS Test 2
  23. AppVerName=CSS Test 2 1.0
  24. DefaultDirName={pf}\CSS Test 2
  25. DefaultGroupName=CSS Example
  26. OutputDir=.
  27. OutputBaseFilename=CSS Setup
  28. VersionInfoCopyright=ProFrager
  29. SolidCompression=yes
  30. #ifdef NeedSize
  31. ExtraDiskSpaceRequired={#NeedSize}
  32. #endif
  33.  
  34. #ifdef Components
  35. [Types]
  36. Name: full; Description: Full installation; Flags: iscustom
  37.  
  38. [Components]
  39. Name: text; Description: ßçûê ñóáòèòðîâ; Types: full; Flags: fixed
  40. Name: text\rus; Description: Ðóññêèé; Flags: exclusive; ExtraDiskSpaceRequired: 100000000
  41. Name: text\eng; Description: Àíãëèéñêèé; Flags: exclusive; ExtraDiskSpaceRequired: 200000000
  42. Name: voice; Description: ßçûê îçâó÷êè; Types: full; Flags: fixed
  43. Name: voice\rus; Description: Ðóññêèé; Flags: exclusive; ExtraDiskSpaceRequired: 500000000
  44. Name: voice\eng; Description: Àíãëèéñêèé; Flags: exclusive; ExtraDiskSpaceRequired: 600000000
  45. #endif
  46.  
  47. [Messages]
  48. // define wizard title and tray status msg
  49. // both are normally defined in innosetup's default.isl (install folder)
  50. SetupAppTitle = Setup SYN REPACK
  51. SetupWindowTitle = <Game Title> - SYN REPACK 1.0
  52.  
  53. [Registry]
  54. Root: HKLM; Subkey: Software\ProFrager; ValueName: path; ValueType: String; ValueData: {app}; Flags: uninsdeletekey; Check: CheckError
  55. Root: HKLM; Subkey: Software\ProFrager; ValueName: name; ValueType: String; ValueData: Data; Flags: uninsdeletekey; Check: CheckError
  56.  
  57. [Icons]
  58. Name: {group}\Óäàëèòü ïðèìåð ISDone; Filename: {app}\unins000.exe; WorkingDir: {app}; Check: CheckError
  59. Name: {commondesktop}\Óäàëèòü ïðèìåð ISDone; Filename: {app}\unins000.exe; WorkingDir: {app}; Check: CheckError
  60.  
  61. [Tasks]
  62. Name: VCCheck; Description: Install: Microsoft Visual C++ 2005 Redist
  63. Name: PhysXCheck; Description: Install: Nvidia PhysX
  64.  
  65. [Run]
  66. Filename: {src}\Redist\vcredist_x86.exe; Parameters: /q; StatusMsg: Óñòàíàâëèâàåì Microsoft Visual C++ 2005 Redist...; Flags: skipifdoesntexist; Tasks: VCCheck; Check: CheckError
  67. Filename: {src}\Redist\PhysX.exe; Parameters: /qn; StatusMsg: Óñòàíàâëèâàåì Nvidia PhysX...; Flags: skipifdoesntexist; Tasks: PhysXCheck; Check: CheckError
  68.  
  69. [Files]
  70. Source: Include\English.ini; DestDir: {tmp}; Flags: dontcopy
  71. Source: Include\unarc.dll; DestDir: {tmp}; Flags: dontcopy
  72. Source: Include\test.arc; DestDir: {tmp}; Flags: dontcopy
  73. Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy
  74. #ifdef records
  75. Source: records.inf; DestDir: {tmp}; Flags: dontcopy
  76. #endif
  77.  
  78. #ifdef PrecompInside
  79. Source: Include\CLS-precomp.dll; DestDir: {tmp}; Flags: dontcopy
  80. Source: Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
  81. Source: Include\packjpg_dll1.dll; DestDir: {tmp}; Flags: dontcopy
  82. Source: Include\precomp.exe; DestDir: {tmp}; Flags: dontcopy
  83. Source: Include\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
  84. #endif
  85. #ifdef SrepInside
  86. Source: Include\CLS-srep.dll; DestDir: {tmp}; Flags: dontcopy
  87. #endif
  88. #ifdef MSCInside
  89. Source: Include\CLS-MSC.dll; DestDir: {tmp}; Flags: dontcopy
  90. #endif
  91. #ifdef facompress
  92. Source: Include\facompress.dll; DestDir: {tmp}; Flags: dontcopy
  93. #endif
  94. #ifdef precomp
  95.   #if precomp == "0.38"
  96.   Source: Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
  97.   #else
  98.     #if precomp == "0.4"
  99.     Source: Include\precomp040.exe; DestDir: {tmp}; Flags: dontcopy
  100.     #else
  101.       #if precomp == "0.41"
  102.       Source: Include\precomp041.exe; DestDir: {tmp}; Flags: dontcopy
  103.       #else
  104.         #if precomp == "0.42"
  105.         Source: Include\precomp042.exe; DestDir: {tmp}; Flags: dontcopy
  106.         #else
  107.         Source: Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
  108.         Source: Include\precomp040.exe; DestDir: {tmp}; Flags: dontcopy
  109.         Source: Include\precomp041.exe; DestDir: {tmp}; Flags: dontcopy
  110.         Source: Include\precomp042.exe; DestDir: {tmp}; Flags: dontcopy
  111.         #endif
  112.       #endif
  113.     #endif
  114.   #endif
  115. #endif
  116. #ifdef unrar
  117. Source: Include\Unrar.dll; DestDir: {tmp}; Flags: dontcopy
  118. #endif
  119. #ifdef XDelta
  120. Source: Include\XDelta3.dll; DestDir: {tmp}; Flags: dontcopy
  121. #endif
  122. #ifdef PackZIP
  123. Source: Include\7z.dll; DestDir: {tmp}; Flags: dontcopy
  124. Source: Include\packZIP.exe; DestDir: {tmp}; Flags: dontcopy
  125. #endif
  126.  
  127. [CustomMessages]
  128. english.ExtractedFile = The file is retrieved :
  129. english.Extracted = Unpacking archives ...
  130. english.CancelButton = Cancel unpacking
  131. english.Error = Unpacking error!
  132. english.ElapsedTime = Elapsed:
  133. english.RemainingTime = Time left:
  134. english.EstimatedTime = Total:
  135. english.AllElapsedTime = Installation time:
  136.  
  137. [Languages]
  138. Name: english; MessagesFile: compiler:Languages\Default.isl
  139.  
  140. [UninstallDelete]
  141. Type: filesandordirs; Name: {app}
  142.  
  143. [Code]
  144. const
  145.   PCFonFLY=true;
  146.   notPCFonFLY=false;
  147. var
  148.   LabelPct1,LabelCurrFileName,LabelTime1,LabelTime2,LabelTime3: TLabel;
  149.   ISDoneProgressBar1: TNewProgressBar;
  150. #ifdef SecondProgressBar
  151.   LabelPct2: TLabel;
  152.   ISDoneProgressBar2:TNewProgressBar;
  153. #endif
  154.   MyCancelButton: TButton;
  155.   ISDoneCancel:integer;
  156.   ISDoneError:boolean;
  157.   PCFVer:double;
  158.  
  159. type
  160.   TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
  161.  
  162. function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';
  163.  
  164. function ISArcExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile:boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external 'ISArcExtract@files:ISDone.dll stdcall delayload';
  165. function IS7ZipExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'IS7zipExtract@files:ISDone.dll stdcall delayload';
  166. function ISRarExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'ISRarExtract@files:ISDone.dll stdcall delayload';
  167. function ISPrecompExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISPrecompExtract@files:ISDone.dll stdcall delayload';
  168. function ISSRepExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISSrepExtract@files:ISDone.dll stdcall delayload';
  169. function ISxDeltaExtract(CurComponent:Cardinal; PctOfTotal:double; minRAM,maxRAM:integer; InName, DiffFile, OutFile: AnsiString; DeleteInFile, DeleteDiffFile:boolean):boolean; external 'ISxDeltaExtract@files:ISDone.dll stdcall delayload';
  170. function ISPackZIP(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString;ComprLvl:integer; DeleteInFile:boolean):boolean; external 'ISPackZIP@files:ISDone.dll stdcall delayload';
  171. function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):boolean; external 'ShowChangeDiskWindow@files:ISDone.dll stdcall delayload';
  172.  
  173. function Exec2 (FileName, Param: PAnsiChar;Show:boolean):boolean; external 'Exec2@files:ISDone.dll stdcall delayload';
  174. function ISFindFiles(CurComponent:Cardinal; FileMask:AnsiString; var ColFiles:integer):integer; external 'ISFindFiles@files:ISDone.dll stdcall delayload';
  175. function ISPickFilename(FindHandle:integer; OutPath:AnsiString; var CurIndex:integer; DeleteInFile:boolean):boolean; external 'ISPickFilename@files:ISDone.dll stdcall delayload';
  176. function ISGetName(TypeStr:integer):PAnsichar; external 'ISGetName@files:ISDone.dll stdcall delayload';
  177. function ISFindFree(FindHandle:integer):boolean; external 'ISFindFree@files:ISDone.dll stdcall delayload';
  178. function ISExec(CurComponent:Cardinal; PctOfTotal,SpecifiedProcessTime:double; ExeName,Parameters,TargetDir,OutputStr:AnsiString;Show:boolean):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';
  179.  
  180. function SrepInit(TmpPath:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
  181. function PrecompInit(TmpPath:PAnsiChar;VirtMem:cardinal;PrecompVers:single):boolean; external 'PrecompInit@files:ISDone.dll stdcall delayload';
  182. function FileSearchInit(RecursiveSubDir:boolean):boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
  183. function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
  184. function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';
  185. function ChangeLanguage(Language:AnsiString):boolean; external 'ChangeLanguage@files:ISDone.dll stdcall delayload';
  186. function SuspendProc:boolean; external 'SuspendProc@files:ISDone.dll stdcall';
  187. function ResumeProc:boolean; external 'ResumeProc@files:ISDone.dll stdcall';
  188.  
  189. function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
  190. begin
  191.   if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct;
  192.   LabelPct1.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
  193. #ifdef SecondProgressBar
  194.   if CurrentPct<=1000 then ISDoneProgressBar2.Position := CurrentPct;
  195.   LabelPct2.Caption := IntToStr(CurrentPct div 10)+'.'+chr(48 + CurrentPct mod 10)+'%';
  196. #endif
  197.   LabelCurrFileName.Caption:=ExpandConstant('{cm:ExtractedFile} ')+MinimizePathName(CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width-ScaleX(100));
  198.   LabelTime1.Caption:=ExpandConstant('{cm:ElapsedTime} ')+TimeStr2;
  199.   LabelTime2.Caption:=ExpandConstant('{cm:RemainingTime} ')+TimeStr1;
  200.   LabelTime3.Caption:=ExpandConstant('{cm:AllElapsedTime}')+TimeStr3;
  201.   Result := ISDoneCancel;
  202. end;
  203.  
  204. procedure CancelButtonOnClick(Sender: TObject);
  205. begin
  206.   SuspendProc;
  207.   if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
  208.   ResumeProc;
  209. end;
  210.  
  211. procedure HideControls;
  212. begin
  213.   WizardForm.FileNamelabel.Hide;
  214.   ISDoneProgressBar1.Hide;
  215.   LabelPct1.Hide;
  216.   LabelCurrFileName.Hide;
  217.   LabelTime1.Hide;
  218.   LabelTime2.Hide;
  219.   MyCancelButton.Hide;
  220. #ifdef SecondProgressBar
  221.   ISDoneProgressBar2.Hide;
  222.   LabelPct2.Hide;
  223. #endif
  224. end;
  225.  
  226. procedure CreateControls;
  227. var PBTop:integer;
  228. begin
  229.   PBTop:=ScaleY(50);
  230.   ISDoneProgressBar1 := TNewProgressBar.Create(WizardForm);
  231.   with ISDoneProgressBar1 do begin
  232.     Parent   := WizardForm.InstallingPage;
  233.     Height   := WizardForm.ProgressGauge.Height;
  234.     Left     := ScaleX(0);
  235.     Top      := PBTop;
  236.     Width    := ScaleX(365);
  237.     Max      := 1000;
  238.   end;
  239.   LabelPct1 := TLabel.Create(WizardForm);
  240.   with LabelPct1 do begin
  241.     Parent    := WizardForm.InstallingPage;
  242.     AutoSize  := False;
  243.     Left      := ISDoneProgressBar1.Width+ScaleX(5);
  244.     Top       := ISDoneProgressBar1.Top + ScaleY(2);
  245.     Width     := ScaleX(80);
  246.   end;
  247.   LabelCurrFileName := TLabel.Create(WizardForm);
  248.   with LabelCurrFileName do begin
  249.     Parent   := WizardForm.InstallingPage;
  250.     AutoSize := False;
  251.     Width    := ISDoneProgressBar1.Width+ScaleX(30);
  252.     Left     := ScaleX(0);
  253.     Top      := ScaleY(30);
  254.   end;
  255. #ifdef SecondProgressBar
  256.   PBTop:=PBTop+ScaleY(25);
  257.   ISDoneProgressBar2 := TNewProgressBar.Create(WizardForm);
  258.   with ISDoneProgressBar2 do begin
  259.     Parent   := WizardForm.InstallingPage;
  260.     Left     := ScaleX(0);
  261.     Top      := PBTop+ScaleY(8);
  262.     Width    := ISDoneProgressBar1.Width;
  263.     Max      := 1000;
  264.     Height   := WizardForm.ProgressGauge.Height;
  265.   end;
  266.   LabelPct2 := TLabel.Create(WizardForm);
  267.   with LabelPct2 do begin
  268.     Parent    := WizardForm.InstallingPage;
  269.     AutoSize  := False;
  270.     Left      := ISDoneProgressBar2.Width+ScaleX(5);
  271.     Top       := ISDoneProgressBar2.Top + ScaleY(2);
  272.     Width     := ScaleX(80);
  273.   end;
  274. #endif
  275.   LabelTime1 := TLabel.Create(WizardForm);
  276.   with LabelTime1 do begin
  277.     Parent   := WizardForm.InstallingPage;
  278.     AutoSize := False;
  279.     Width    := ISDoneProgressBar1.Width div 2;
  280.     Left     := ScaleX(0);
  281.     Top      := PBTop + ScaleY(35);
  282.   end;
  283.   LabelTime2 := TLabel.Create(WizardForm);
  284.   with LabelTime2 do begin
  285.     Parent   := WizardForm.InstallingPage;
  286.     AutoSize := False;
  287.     Width    := LabelTime1.Width+ScaleX(40);
  288.     Left     := ISDoneProgressBar1.Width div 2;
  289.     Top      := LabelTime1.Top;
  290.   end;
  291.   LabelTime3 := TLabel.Create(WizardForm);
  292.   with LabelTime3 do begin
  293.     Parent   := WizardForm.FinishedPage;
  294.     AutoSize := False;
  295.     Width    := 300;
  296.     Left     := 180;
  297.     Top      := 200;
  298.   end;
  299.   MyCancelButton:=TButton.Create(WizardForm);
  300.   with MyCancelButton do begin
  301.     Parent:=WizardForm;
  302.     Width:=ScaleX(135);
  303.     Caption:=ExpandConstant('{cm:CancelButton}');
  304.     Left:=ScaleX(360);
  305.     Top:=WizardForm.cancelbutton.top;
  306.     OnClick:=@CancelButtonOnClick;
  307.   end;
  308. end;
  309.  
  310. Procedure CurPageChanged(CurPageID: Integer);
  311. Begin
  312.   if (CurPageID = wpFinished) and ISDoneError then
  313.   begin
  314.     LabelTime3.Hide;
  315.     WizardForm.Caption:= ExpandConstant('{cm:Error}');
  316.     WizardForm.FinishedLabel.Font.Color:= clRed;
  317.     WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ;
  318.   end;
  319. end;
  320.  
  321. function CheckError:boolean;
  322. begin
  323.   result:= not ISDoneError;
  324. end;
  325.  
  326. procedure CurStepChanged(CurStep: TSetupStep);
  327. var Comps1,Comps2,Comps3, TmpValue:cardinal;
  328.     FindHandle1,ColFiles1,CurIndex1,tmp:integer;
  329.     ExecError:boolean;
  330.     InFilePath,OutFilePath,OutFileName:PAnsiChar;
  331. begin
  332.   if CurStep = ssInstall then begin  //Åñëè íåîáõîäèìî, ìîæíî ïîìåíÿòü íà ssPostInstall
  333.     WizardForm.ProgressGauge.Hide;
  334.     WizardForm.CancelButton.Hide;
  335.     CreateControls;
  336.     WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:Extracted}');
  337.     ISDoneCancel:=0;
  338.  
  339. // Ðàñïàêîâêà âñåõ íåîáõîäèìûõ ôàéëîâ â ïàïêó {tmp}.
  340.  
  341. ExtractTemporaryFile('unarc.dll');
  342.  
  343. #ifdef PrecompInside
  344. ExtractTemporaryFile('CLS-precomp.dll');
  345. ExtractTemporaryFile('packjpg_dll.dll');
  346. ExtractTemporaryFile('packjpg_dll1.dll');
  347. ExtractTemporaryFile('precomp.exe');
  348. ExtractTemporaryFile('zlib1.dll');
  349. #endif
  350. #ifdef SrepInside
  351. ExtractTemporaryFile('CLS-srep.dll');
  352. #endif
  353. #ifdef MSCInside
  354. ExtractTemporaryFile('CLS-MSC.dll');
  355. #endif
  356. #ifdef facompress
  357.     ExtractTemporaryFile('facompress.dll'); //óñêîðÿåò ðàñïàêîâêó .arc àðõèâîâ.
  358. #endif
  359. #ifdef records
  360.     ExtractTemporaryFile('records.inf');
  361. #endif
  362. #ifdef precomp
  363.   #if precomp == "0.38"
  364.     ExtractTemporaryFile('precomp038.exe');
  365.   #else
  366.     #if precomp == "0.4"
  367.       ExtractTemporaryFile('precomp040.exe');
  368.     #else
  369.       #if precomp == "0.41"
  370.         ExtractTemporaryFile('precomp041.exe');
  371.       #else
  372.         #if precomp == "0.42"
  373.           ExtractTemporaryFile('precomp042.exe');
  374.         #else
  375.           ExtractTemporaryFile('precomp038.exe');
  376.           ExtractTemporaryFile('precomp040.exe');
  377.           ExtractTemporaryFile('precomp041.exe');
  378.           ExtractTemporaryFile('precomp042.exe');
  379.         #endif
  380.       #endif
  381.     #endif
  382.   #endif
  383. #endif
  384. #ifdef unrar
  385.     ExtractTemporaryFile('Unrar.dll');
  386. #endif
  387. #ifdef XDelta
  388.     ExtractTemporaryFile('XDelta3.dll');
  389. #endif
  390. #ifdef PackZIP
  391.     ExtractTemporaryFile('7z.dll');
  392.     ExtractTemporaryFile('PackZIP.exe');
  393. #endif
  394.  
  395.     ExtractTemporaryFile('English.ini');
  396.  
  397. // Ïîäãîòàâëèâàåì ïåðåìåííóþ, ñîäåðæàùóþ âñþ èíôîðìàöèþ î âûäåëåííûõ êîìïîíåíòàõ äëÿ ISDone.dll
  398. // ìàêñèìóì 96 êîìïîíåíòîâ.
  399.     Comps1:=0; Comps2:=0; Comps3:=0;
  400. #ifdef Components
  401.     TmpValue:=1;
  402.     if IsComponentSelected('text\rus') then Comps1:=Comps1+TmpValue;     //êîìïîíåíò 1
  403.     TmpValue:=TmpValue*2;
  404.     if IsComponentSelected('text\eng') then Comps1:=Comps1+TmpValue;     //êîìïîíåíò 2
  405.     TmpValue:=TmpValue*2;
  406.     if IsComponentSelected('voice\rus') then Comps1:=Comps1+TmpValue;    //êîìïîíåíò 3
  407.     TmpValue:=TmpValue*2;
  408.     if IsComponentSelected('voice\eng') then Comps1:=Comps1+TmpValue;    //êîìïîíåíò 4
  409. //    .....
  410. // ñì. ñïðàâêó
  411. #endif
  412.  
  413. #ifdef precomp
  414.   PCFVer:={#precomp};
  415. #else
  416.   PCFVer:=0;
  417. #endif
  418.     ISDoneError:=true;
  419.     if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, Comps1,Comps2,Comps3, MainForm.Handle, {#NeedMem}, @ProgressCallback) then begin
  420.       repeat
  421. //        ChangeLanguage('English');
  422.         if not SrepInit('',512,0) then break;
  423.         if not PrecompInit('',128,PCFVer) then break;
  424.         if not FileSearchInit(true) then break;
  425.  
  426.         if not ISArcExtract ( 0, 0, ExpandConstant('{src}\*.arc'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
  427.  
  428. //    äàëåå íàõîäÿòñÿ çàêîììåíòèðîâàíûå ïðèìåðû ðàçëè÷íûõ ôóíêöèé ðàñïàêîâêè (÷òîáû êàæäûé ðàç íå ëàçèòü â ñïðàâêó çà ïðèìåðàìè)
  429. (*
  430.         if not ISArcExtract    ( 0, 0, ExpandConstant('{src}\arc.arc'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
  431.         if not IS7ZipExtract   ( 0, 0, ExpandConstant('{src}\CODMW2.7z'), ExpandConstant('{app}\data1'), false, '') then break;
  432.         if not ISRarExtract    ( 0, 0, ExpandConstant('{src}\data_*.rar'), ExpandConstant('{app}'), false, '') then break;
  433.         if not ISSRepExtract   ( 0, 0, ExpandConstant('{app}\data1024_1024.srep'),ExpandConstant('{app}\data1024.arc'), true) then break;
  434.         if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data.pcf'),    ExpandConstant('{app}\data.7z'), true) then break;
  435.         if not ISxDeltaExtract ( 0, 0, 0, 640, ExpandConstant('{app}\in.pcf'), ExpandConstant('{app}\*.diff'),   ExpandConstant('{app}\out.dat'), false, false) then break;
  436.         if not ISPackZIP       ( 0, 0, ExpandConstant('{app}\1a1\*'), ExpandConstant('{app}\1a1.pak'), 2, false ) then break;
  437.         if not ISExec          ( 0, 0, 0, ExpandConstant('{tmp}\Arc.exe'), ExpandConstant('x -o+ "{src}\001.arc" "{app}\"'), ExpandConstant('{tmp}'), '...',false) then break;
  438.         if not ShowChangeDiskWindow ('Ïîæàëóéñòà, âñòàâüòå âòîðîé äèñê è äîæäèòåñü åãî èíèöèàëèçàöèè.', ExpandConstant('{src}'),'CODMW_2.arc') then break;
  439.  
  440. //    ðàñïàêîâêà ãðóïïû ôàéëîâ ïîñðåäñòâîì âíåøíåãî ïðèëîæåíèÿ
  441.  
  442.         FindHandle1:=ISFindFiles(0,ExpandConstant('{app}\*.ogg'),ColFiles1);
  443.         ExecError:=false;
  444.         while not ExecError and ISPickFilename(FindHandle1,ExpandConstant('{app}\'),CurIndex1,true) do begin
  445.           InFilePath:=ISGetName(0);
  446.           OutFilePath:=ISGetName(1);
  447.           OutFileName:=ISGetName(2);
  448.           ExecError:=not ISExec(0, 0, 0, ExpandConstant('{tmp}\oggdec.exe'), '"'+InFilePath+'" -w "'+OutFilePath+'"',ExpandConstant('{tmp}'),OutFileName,false);
  449.         end;
  450.         ISFindFree(FindHandle1);
  451.         if ExecError then break;
  452. *)
  453.  
  454.         ISDoneError:=false;
  455.       until true;
  456.       ISDoneStop;
  457.     end;
  458.     HideControls;
  459.     WizardForm.CancelButton.Visible:=true;
  460.     WizardForm.CancelButton.Enabled:=false;
  461.   end;
  462.   if (CurStep=ssPostInstall) and ISDoneError then begin
  463.     Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
  464.   end;
  465. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement