FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   [Help] Wrong Code Inno Script! (https://fileforums.com/showthread.php?t=96362)

Carldric Clement 18-10-2014 07:53

[Help] Wrong Code Inno Script!
 
I'm Gonna to make a external extract like this

Code:

File from Setup.ini

[ExtractSettings]
FreeArcFile1=Data2.cab;DestDir:{app};Disk:1;

when i make, i don't know how to extract it? to make a code?
Please help me!
:o:(

_EZEKiEL_ 21-11-2014 03:22

Quote:

Originally Posted by Carldric Clement (Post 435090)
I'm Gonna to make a external extract like this

Code:

File from Setup.ini

[ExtractSettings]
FreeArcFile1=Data2.cab;DestDir:{app};Disk:1;

when i make, i don't know how to extract it? to make a code?
Please help me!
:o:(

What script do you use for this INI file ?

Carldric Clement 21-11-2014 05:19

Quote:

Originally Posted by _EZEKiEL_ (Post 436253)
What script do you use for this INI file ?

CIU Version.

Dante1995 21-11-2014 05:25

that code works with a construct like this+ISDone Function: code Razor

Code:

[Files]
Source: ISDone\*; Flags: dontcopy;
[ Code]
procedure CurStepChanged(CurStep: TSetupStep);
var
  res, i, ResultCode: integer;
  Arc1, Arc2, Arc3: Array of String;
begin   

If CurStep = ssInstall then
begin
    ExtractTemporaryFile('arc.ini');
    ExtractTemporaryFile('unarc.dll');
    ExtractTemporaryFile('Setup.ini');
    ExtractTemporaryFile('english.ini');
    ExtractTemporaryFile('precomp.exe');
    ExtractTemporaryFile('CLS-MSC.dll');
    ExtractTemporaryFile('CLS-srep.dll');
    ExtractTemporaryFile('CLS-precomp.dll');

    ISDoneError:=false;
    i:=1;
    if (GetIniString('ExtractSettings' + IntToStr(i),'FreeArcFile','',ExpandConstant('{tmp}\Setup.ini')) <> '') then
    begin
    WizardForm.ProgressGauge.Max:=0;
    repeat
    WizardForm.ProgressGauge.Max:= WizardForm.ProgressGauge.Max + 1000;
    i:= i + 1;
    until (GetIniString('ExtractSettings' + IntToStr(i),'FreeArcFile','',ExpandConstant('{tmp}\Setup.ini')) = '');
    end;
    if ISDoneInit(ExpandConstant('{tmp}\records.inf'), $F777, 0,0,0, MainForm.Handle, 512, @ProgressCallback) then begin
      repeat
      ChangeLanguage('English');
      if not SrepInit('',512,0) then ISDoneError := True;
      if not PrecompInit('',128,0) then ISDoneError := True;
      if not FileSearchInit(true) then ISDoneError := True;
     
      i:=1;
      if (GetIniString('ExtractSettings' + IntToStr(i),'FreeArcFile','',ExpandConstant('{tmp}\Setup.ini')) <> '') then
      begin
      SetArrayLength(Arc1,4);
      SetArrayLength(Arc2,4);
      SetArrayLength(Arc3,4);
      repeat
      Arc1[0]:=ExpandConstant(GetIniString('ExtractSettings' + IntToStr(i),'FreeArcFile','',ExpandConstant('{tmp}\Setup.ini')));
      Arc1[1]:=ExpandConstant(GetIniString('ExtractSettings' + IntToStr(i),'Output','',ExpandConstant('{tmp}\Setup.ini')));
      Arc1[2]:=ExpandConstant(GetIniString('ExtractSettings' + IntToStr(i),'Disk','1',ExpandConstant('{tmp}\Setup.ini')));
      if Arc1[0] <> '' then
      begin
      if not FileExists(Arc1[0]) then
      begin
      if MsgBox('Insert disc: ' + Arc1[2], mbError, MB_OKCANCEL) = IDCANCEL then ISDoneError := True;
      end else begin
      if not ISArcExtract( 0, 0, Arc1[0], Arc1[1], '', false, Arc1[3], ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), False) then ISDoneError := True;
      i:= i + 1;
      end;
      end;
      until ((GetIniString('ExtractSettings' + IntToStr(i),'FreeArcFile','',ExpandConstant('{tmp}\Setup.ini')) = '') or (ISDoneError = True));
    end;
    until true;
    ISDoneStop;
    end;
  end;
 
  if (CurStep=ssPostInstall) and ISDoneError then begin
    Exec(ExpandConstant('{uninstallexe}'), '/VERYSILENT','', sw_Hide, ewWaitUntilTerminated, ResultCode);
    WizardForm.StatusLabel.Caption:=SetupMessage(msgStatusRollback);
  end;


CIU is complete, what do you want to do is not clear??


All times are GMT -7. The time now is 05:57.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com