Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-01-2017, 07:27
78372 78372 is offline
Registered User
 
Join Date: Dec 2016
Location: Bangladesh
Posts: 650
Thanks: 772
Thanked 953 Times in 309 Posts
78372 is on a distinguished road
ISDone script needed

I need a ISDone script with ISRAREXTRACT, IS7ZIPEXTRACT and ISARCEXTRACT(Please, only arc, no precomp/srep/reflate etc.) support (Also Archive.ini with filename and password).

For repacking old games. I have seen ISDone scripts in some threads, but they are with precomp,srep etc extra support. But I only need simple freearc, rar and 7z extraction support. Can anyone please help me with a script?

Thanks
__________________
NOT AVAILABLE
Reply With Quote
Sponsored Links
  #2  
Old 09-01-2017, 08:28
rinaldo's Avatar
rinaldo rinaldo is offline
Registered User
 
Join Date: Sep 2015
Location: Rome
Posts: 433
Thanks: 101
Thanked 696 Times in 191 Posts
rinaldo is on a distinguished road
Code:
#define NeedSize "5000000000"
#define Task
#define unrar
#define PackZIP

[Setup]
AppName=ISDone
AppVerName=ISDone
DefaultDirName={pf}\ISDone
DefaultGroupName=ISDone Example
OutputDir=Output
OutputBaseFilename=Setup
VersionInfoCopyright=ProFrager
SolidCompression=yes
#ifdef NeedSize
ExtraDiskSpaceRequired={#NeedSize}
#endif

[Registry]

[Icons]
Name: {commondesktop}\Uninstall ISDone; Filename: {app}\unins000.exe; WorkingDir: {app}; Check: CheckError
Name: {commondesktop}\Play ISDone; Filename: {app}\game.exe; WorkingDir: {app}; Check: CheckError

#ifdef Task
[Tasks]
Name: VCCheck_1; Description: Install Microsoft Visual C++ 2013 Redist
Name: VCCheck_2; Description: Install Microsoft Visual C++ 2005 Redist

[Run]
Filename: {src}\Redist\vcredist_x64.exe; Parameters: /q; StatusMsg: Installation Microsoft Visual C++ 2013 Redist...; Flags: skipifdoesntexist; Tasks: VCCheck_1; Check: CheckError
Filename: {src}\Redist\vcredist_x86.exe; Parameters: /q; StatusMsg: Installation Microsoft Visual C++ 2005 Redist...; Flags: skipifdoesntexist; Tasks: VCCheck_2; Check: CheckError
#endif

[Files]
Source: Include\English.ini; DestDir: {tmp}; Flags: dontcopy
Source: Include\unarc.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\ISDone.dll; DestDir: {tmp}; Flags: dontcopy
#ifdef unrar
Source: Include\Unrar.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef PackZIP
Source: Include\7z.dll; DestDir: {tmp}; Flags: dontcopy
#endif

[CustomMessages]
eng.ExtractedFile=Extracted File:
eng.Extracted=Extracted...
eng.CancelButton=Cancel
eng.Error=Error!
eng.ElapsedTime=Elapsed Time:
eng.RemainingTime=Remaining Time:
eng.EstimatedTime=Estimated Time:
eng.AllElapsedTime=All Elapsed Time:

[Languages]
Name: eng; MessagesFile: compiler:default.isl

[UninstallDelete]
Type: filesandordirs; Name: {app}

[Code ]
const
  PCFonFLY=true;
  notPCFonFLY=false;
var
  LabelPct1,LabelCurrFileName,LabelTime1,LabelTime2,LabelTime3: TLabel;
  ISDoneProgressBar1: TNewProgressBar;
  MyCancelButton: TButton;
  ISDoneCancel:integer;
  ISDoneError:boolean;
  PCFVer:double;

type
  TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;

function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';
function IS7ZipExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'IS7zipExtract@files:ISDone.dll stdcall delayload';
function ISRarExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'ISRarExtract@files:ISDone.dll stdcall delayload';
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';
function Exec2 (FileName, Param: PAnsiChar;Show:boolean):boolean; external 'Exec2@files:ISDone.dll stdcall delayload';
function ISExec(CurComponent:Cardinal; PctOfTotal,SpecifiedProcessTime:double; ExeName,Parameters,TargetDir,OutputStr:AnsiString;Show:boolean):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';
function ChangeLanguage(Language:AnsiString):boolean; external 'ChangeLanguage@files:ISDone.dll stdcall delayload';
function SuspendProc:boolean; external 'SuspendProc@files:ISDone.dll stdcall';
function ResumeProc:boolean; external 'ResumeProc@files:ISDone.dll stdcall';

function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
  if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct;
  LabelPct1.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
  LabelCurrFileName.Caption:=ExpandConstant('{cm:ExtractedFile} ')+MinimizePathName(CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width-ScaleX(100));
  LabelTime1.Caption:=ExpandConstant('{cm:ElapsedTime} ')+TimeStr2;
  LabelTime2.Caption:=ExpandConstant('{cm:RemainingTime} ')+TimeStr1;
  LabelTime3.Caption:=ExpandConstant('{cm:AllElapsedTime}')+TimeStr3;
  Result := ISDoneCancel;
end;

procedure CancelButtonOnClick(Sender: TObject);
begin
  SuspendProc;
  if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
  ResumeProc;
end;

procedure HideControls;
begin
  WizardForm.FileNamelabel.Hide;
  ISDoneProgressBar1.Hide;
  LabelPct1.Hide;
  LabelCurrFileName.Hide;
  LabelTime1.Hide;
  LabelTime2.Hide;
  MyCancelButton.Hide;
end;

procedure CreateControls;
var PBTop:integer;
begin
  PBTop:=ScaleY(50);
  ISDoneProgressBar1 := TNewProgressBar.Create(WizardForm);
  with ISDoneProgressBar1 do begin
    Parent   := WizardForm.InstallingPage;
    Height   := WizardForm.ProgressGauge.Height;
    Left     := ScaleX(0);
    Top      := PBTop;
    Width    := ScaleX(365);
    Max      := 1000;
  end;
  LabelPct1 := TLabel.Create(WizardForm);
  with LabelPct1 do begin
    Parent    := WizardForm.InstallingPage;
    AutoSize  := False;
    Left      := ISDoneProgressBar1.Width+ScaleX(5);
    Top       := ISDoneProgressBar1.Top + ScaleY(2);
    Width     := ScaleX(80);
  end;
  LabelCurrFileName := TLabel.Create(WizardForm);
  with LabelCurrFileName do begin
    Parent   := WizardForm.InstallingPage;
    AutoSize := False;
    Width    := ISDoneProgressBar1.Width+ScaleX(30);
    Left     := ScaleX(0);
    Top      := ScaleY(30);
  end;
  LabelTime1 := TLabel.Create(WizardForm);
  with LabelTime1 do begin
    Parent   := WizardForm.InstallingPage;
    AutoSize := False;
    Width    := ISDoneProgressBar1.Width div 2;
    Left     := ScaleX(0);
    Top      := PBTop + ScaleY(35);
  end;
  LabelTime2 := TLabel.Create(WizardForm);
  with LabelTime2 do begin
    Parent   := WizardForm.InstallingPage;
    AutoSize := False;
    Width    := LabelTime1.Width+ScaleX(40);
    Left     := ISDoneProgressBar1.Width div 2;
    Top      := LabelTime1.Top;
  end;
  LabelTime3 := TLabel.Create(WizardForm);
  with LabelTime3 do begin
    Parent   := WizardForm.FinishedPage;
    AutoSize := False;
    Width    := 300;
    Left     := 180;
    Top      := 200;
  end;
  MyCancelButton:=TButton.Create(WizardForm);
  with MyCancelButton do begin
    Parent:=WizardForm;
    Width:=ScaleX(135);
    Caption:=ExpandConstant('{cm:CancelButton}');
    Left:=ScaleX(360);
    Top:=WizardForm.cancelbutton.top;
    OnClick:=@CancelButtonOnClick;
  end;
end;

Procedure CurPageChanged(CurPageID: Integer);
Begin
  if (CurPageID = wpFinished) and ISDoneError then
  begin
    LabelTime3.Hide;
    WizardForm.Caption:= ExpandConstant('{cm:Error}');
    WizardForm.FinishedLabel.Font.Color:= clRed;
    WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ;
  end;
end;

function CheckError:boolean;
begin
  result:= not ISDoneError;
end;

procedure CurStepChanged(CurStep: TSetupStep);
var
ExecError:boolean;
begin
  if CurStep = ssInstall then begin
    WizardForm.ProgressGauge.Hide;
    WizardForm.CancelButton.Hide;
    CreateControls;
    WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:Extracted}');
    ISDoneCancel:=0;

ExtractTemporaryFile('unarc.dll');
ExtractTemporaryFile('English.ini');
#ifdef unrar
    ExtractTemporaryFile('Unrar.dll');
#endif
#ifdef PackZIP
    ExtractTemporaryFile('7z.dll');
#endif

    ISDoneError:=true;
    if ISDoneInit(ExpandConstant(''),$F777, 0,0,0, MainForm.Handle, 512, @ProgressCallback) then begin
      repeat
        ChangeLanguage('English');
        if not ISArcExtract    ( 0, 34, ExpandConstant('{src}\FreeArc.arc'), ExpandConstant('{app}\FreeArc Folder'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
        if not IS7ZipExtract   ( 0, 33, ExpandConstant('{src}\7Zip.7z'), ExpandConstant('{app}\7zip Folder'), false, '') then break;
        if not ISRarExtract    ( 0, 33, ExpandConstant('{src}\Rar.rar'), ExpandConstant('{app}\WinRar Folder'), false, '') then break;
        ISDoneError:=false;
      until true;
      ISDoneStop;
    end;
    HideControls;
    WizardForm.CancelButton.Visible:=true;
    WizardForm.CancelButton.Enabled:=false;
  end;
  if (CurStep=ssPostInstall) and ISDoneError then begin
    Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
  end;
end;
__________________
if you understand read more

Last edited by rinaldo; 09-01-2017 at 08:49.
Reply With Quote
The Following User Says Thank You to rinaldo For This Useful Post:
LinkSystem (29-10-2024)
  #3  
Old 09-01-2017, 08:46
78372 78372 is offline
Registered User
 
Join Date: Dec 2016
Location: Bangladesh
Posts: 650
Thanks: 772
Thanked 953 Times in 309 Posts
78372 is on a distinguished road
The rest of it??
__________________
NOT AVAILABLE
Reply With Quote
  #4  
Old 09-01-2017, 08:50
rinaldo's Avatar
rinaldo rinaldo is offline
Registered User
 
Join Date: Sep 2015
Location: Rome
Posts: 433
Thanks: 101
Thanked 696 Times in 191 Posts
rinaldo is on a distinguished road
abc
Attached Files
File Type: rar ISDone_Example.rar (745.3 KB, 138 views)
__________________
if you understand read more

Last edited by rinaldo; 09-01-2017 at 08:57.
Reply With Quote
The Following 3 Users Say Thank You to rinaldo For This Useful Post:
78372 (09-01-2017), EyeSalt (02-03-2018), LinkSystem (29-10-2024)
  #5  
Old 09-01-2017, 09:41
78372 78372 is offline
Registered User
 
Join Date: Dec 2016
Location: Bangladesh
Posts: 650
Thanks: 772
Thanked 953 Times in 309 Posts
78372 is on a distinguished road
And how to define the archives? (Multiple archives with different methods and extensions)
__________________
NOT AVAILABLE

Last edited by 78372; 09-01-2017 at 09:48.
Reply With Quote
  #6  
Old 09-01-2017, 13:17
rinaldo's Avatar
rinaldo rinaldo is offline
Registered User
 
Join Date: Sep 2015
Location: Rome
Posts: 433
Thanks: 101
Thanked 696 Times in 191 Posts
rinaldo is on a distinguished road
Quote:
Originally Posted by 78372 View Post
And how to define the archives? (Multiple archives with different methods and extensions)
you already have an example of multiple files
__________________
if you understand read more
Reply With Quote
The Following User Says Thank You to rinaldo For This Useful Post:
78372 (09-01-2017)
  #7  
Old 10-01-2017, 05:13
78372 78372 is offline
Registered User
 
Join Date: Dec 2016
Location: Bangladesh
Posts: 650
Thanks: 772
Thanked 953 Times in 309 Posts
78372 is on a distinguished road
Many Many thanks
__________________
NOT AVAILABLE
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Blackbox Inno Setup Script Kurutucu Conversion Tutorials 1190 18-08-2019 22:43
Please HELP.. THETA Script ATL4NTYS Conversion Tutorials 6 14-08-2016 14:43
MSC+Srep+lzma Simple Script Example gozarck Conversion Tutorials 10 07-09-2015 16:31
Needed Classified Ad Script jakab Software 2 09-02-2009 02:43



All times are GMT -7. The time now is 12:48.


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