View Single Post
  #4  
Old 04-09-2016, 05:46
felice2011's Avatar
felice2011 felice2011 is offline
Registered User
 
Join Date: Feb 2011
Location: italy
Posts: 836
Thanks: 357
Thanked 1,158 Times in 390 Posts
felice2011 is on a distinguished road
Read so the error is a somewhat difficult to decipher, I read only IsArcExtract.

I recommend the use of MSKompressor instead of Split Kompress, it has a range of more compressors.

Edit this point as below :
Code:
if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, Comps1,Comps2,Comps3, MainForm.Handle, {#NeedMem}, @ProgressCallback) then begin
        repeat
          if not SrepInit(ExpandConstant('{app}'),512,0) then break;
          if not PrecompInit(ExpandConstant('{app}'),128,PCFVer) then break;
          if not FileSearchInit(true) then break;
          if not ISArcExtract    (0, 100, ExpandConstant('{src}\data.arc'), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
          if not ShowChangeDiskWindow ('bla bla bla.', ExpandConstant('{src}'),'data.arc') then break;
          FindHandle1:=ISFindFiles(0,ExpandConstant('{app}\*.ogg'),ColFiles1);
          ExecError:=false;
          while not ExecError and ISPickFilename(FindHandle1,ExpandConstant('{app}\'),CurIndex1,true) do begin
            InFilePath:=ISGetName(0);
            OutFilePath:=ISGetName(1);
            OutFileName:=ISGetName(2);
            ExecError:=not ISExec(0, 0, 0, ExpandConstant('{tmp}\oggdec.exe'), '"'+InFilePath+'" -w "'+OutFilePath+'"',ExpandConstant('{tmp}'),OutFileName,false);
          end;
          ISFindFree(FindHandle1);
          if ExecError then break;
          ISDoneError:=false;
        until true;
        ISDoneStop;
      end;
Logically the name 'data.arc' is the archive name we're going to insert.

Here add the names of compressors we're going to compile in the installation :
Code:
[Files]
Source: "Files\unarc.dll"; DestDir: "{tmp}"; Flags: "dontcopy";
Source: "Files\ISDone.dll"; DestDir: "{tmp}"; Flags: "dontcopy";
#ifdef records
Source: "records.ini"; DestDir: "{tmp}"; Flags: "dontcopy";
#endif
#ifdef PrecompInside
Source: "Files\packjpg_dll.dll"; DestDir: "{tmp}"; Flags: "dontcopy";
Source: "Files\packjpg_dll1.dll"; DestDir: "{tmp}"; Flags: "dontcopy";
Source: "Files\precomp.exe"; DestDir: "{tmp}"; Flags: "dontcopy";
Source: "Files\zlib1.dll"; DestDir: "{tmp}"; Flags: "dontcopy";
#endif
#ifdef SrepInside
Source: "Files\CLS-srep.dll"; DestDir: "{tmp}"; Flags: "dontcopy";
Source: "Files\CLS-MSC.dll"; DestDir: "{tmp}"; Flags: "dontcopy";
Source: "Files\srep.exe"; DestDir: "{tmp}"; Flags: "dontcopy";
Source: "Files\srep64.exe"; DestDir: "{tmp}"; Flags: "dontcopy";
#endif
#ifdef facompress
Source: "Files\facompress.dll"; DestDir: "{tmp}"; Flags: "dontcopy";
Source: "Files\facompress_mt.dll"; DestDir: "{tmp}"; Flags: "dontcopy";
#endif
#ifdef unrar
Source: "Files\Unrar.dll"; DestDir: "{tmp}"; Flags: "dontcopy";
Source: "Files\arc.ini"; DestDir: "{tmp}"; Flags: "dontcopy";
#endif
#ifdef XDelta
Source: "Files\XDelta3.dll"; DestDir: "{tmp}"; Flags: "dontcopy";
#endif
#ifdef PackZIP
Source: "Files\7z.dll"; DestDir: "{tmp}"; Flags: "dontcopy";
Source: "Files\dec.exe"; DestDir: "{tmp}"; Flags: "dontcopy";
Source: "Files\packZIP.exe"; DestDir: "{tmp}"; Flags: "dontcopy";
#endif
Here we add the names of compressors that will be extracted to a temporary path during installation:
Code:
case CurStep of
    ssInstall: begin
      WizardForm.CancelButton.OnClick := @CancelButtonOnClick;
      ISDoneCancel:=0;
      ExtractTemporaryFile('unarc.dll');
      ExtractTemporaryFile('arc.ini');
#ifdef PrecompInside
      ExtractTemporaryFile('packjpg_dll.dll');
      ExtractTemporaryFile('packjpg_dll1.dll');
      ExtractTemporaryFile('precomp.exe');
      ExtractTemporaryFile('zlib1.dll');
#endif
#ifdef SrepInside
      ExtractTemporaryFile('CLS-MSC.dll');
      ExtractTemporaryFile('CLS-srep.dll');
      ExtractTemporaryFile('srep.exe');
      ExtractTemporaryFile('srep64.exe');
#endif
#ifdef facompress
      ExtractTemporaryFile('facompress.dll');
      ExtractTemporaryFile('facompress_mt.dll');
#endif
#ifdef records
      ExtractTemporaryFile('records.inf');
#endif
#ifdef unrar
      ExtractTemporaryFile('Unrar.dll');
#endif
#ifdef XDelta
      ExtractTemporaryFile('XDelta3.dll');
#endif
#ifdef PackZIP
      ExtractTemporaryFile('7z.dll');
      ExtractTemporaryFile('dec.exe');
      ExtractTemporaryFile('PackZIP.exe');
#endif
      Comps1:=0;
      Comps2:=0;
      Comps3:=0;
#ifdef precomp
      PCFVer:={#precomp};
    #else
      PCFVer:=0;
#endif
Logically and it is understood that the name of the compressors you added in the script, must be entered before in the "Files" folder.
Last thing, if you use different versions of precomp, just copy and replace the existing precomp always in the "Files" folder.
The script that you posted is tested and working with your modifications, enjoy..
__________________
≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈ ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
« I Mediocri Imitano, I Geni Copiano, Dio Crea & Distrugge » (Io Ridefinisco & Perfeziono le Loro Opere Rendendole Uniche)
≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈ ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
« Mediocrities Imitate, Genius Copy, God Creates & Destroys » (I Reconsider & Improve Their Works, Rending Them One And Only)

Last edited by felice2011; 04-09-2016 at 05:54.
Reply With Quote
The Following 2 Users Say Thank You to felice2011 For This Useful Post:
ATL4NTYS (04-09-2016), knife16 (04-09-2016)