|
#1
|
|||
|
|||
|
A small problem in isdone
I am going to repack Prince Of Persia Trilogy. The compressing is complete and the script is ready, but I don't Understand why the installer is not extracting the files. So I need help badly. The script is as follows
[Setup] AppName=Prince of Persia Trilogy AppVerName=Prince of Persia Trilogy Repack by 78372 DefaultDirName={pf}\Ubisoft DefaultGroupName=Ubisoft\Prince of Persia Trilogy OutputDir=Output OutputBaseFilename=Setup VersionInfoCopyright=Ubisoft SolidCompression=yes DisableWelcomePage=no WizardImageFile=WizModernImage.bmp WizardSmallImageFile=WizModernSmallImage.bmp [Components] Name: POPTSOT; Description: Prince of Persia The Sands of Time; ExtraDiskSpaceRequired: 1309965026; Types: full custom Name: POPT2T; Description: Prince of Persia The Two Thrones; ExtraDiskSpaceRequired: 1527283712; Types: full custom Name: POPWW; Description: Prince of Persia Warrior Within; ExtraDiskSpaceRequired: 3543348020; Types: full custom [Registry] Root: "HKLM32"; Subkey: "SOFTWARE\Ubisoft\Prince of Persia Warrior Within\1.00.999"; ValueType: string; ValueName: "Product_Path"; ValueData: "{app}"; Flags:uninsdeletekey; Components:POPWW Root: "HKLM32"; Subkey: "SOFTWARE\Ubisoft\Prince of Persia Warrior Within\1.00.999"; ValueType: string; ValueName: "Product_Executable"; ValueData: "PrinceOfPersia.exe"; Flags:uninsdeletekey; Components:POPWW Root: "HKLM32"; Subkey: "SOFTWARE\Ubisoft\Prince of Persia Warrior Within\1.00.999"; ValueType: string; ValueName: "Product_Language"; ValueData: "9"; Flags:uninsdeletekey; Components:POPWW Root: "HKLM32"; Subkey: "SOFTWARE\Ubisoft\Prince of Persia Warrior Within\1.00.999"; ValueType: string; ValueName: "Product_Release"; ValueData: "Retail EMEA"; Flags:uninsdeletekey; Components:POPWW Root: "HKLM32"; Subkey: "SOFTWARE\Ubisoft\Prince of Persia Warrior Within\1.00.999"; ValueType: string; ValueName: "Profiles_Path"; ValueData: "%ProgramData%"; Flags:uninsdeletekey; Components:POPWW Root: "HKLM32"; Subkey: "SOFTWARE\Ubisoft\Prince of Persia The Two Thrones\1.00.999"; ValueType: string; ValueName: "Product_Path"; ValueData: "{app}"; Flags:uninsdeletekey; Components:POPT2T Root: "HKLM32"; Subkey: "SOFTWARE\Ubisoft\Prince of Persia The Two Thrones\1.00.999"; ValueType: string; ValueName: "Product_Executable"; ValueData: "PrinceOfPersia.exe"; Flags:uninsdeletekey; Components:POPT2T Root: "HKLM32"; Subkey: "SOFTWARE\Ubisoft\Prince of Persia The Two Thrones\1.00.999"; ValueType: string; ValueName: "Product_Language"; ValueData: "9"; Flags:uninsdeletekey; Components:POPT2T Root: "HKLM32"; Subkey: "SOFTWARE\Ubisoft\Prince of Persia The Two Thrones\1.00.999"; ValueType: string; ValueName: "Product_Release"; ValueData: "Retail EMEA"; Flags:uninsdeletekey; Components:POPT2T Root: "HKLM32"; Subkey: "SOFTWARE\Ubisoft\Prince of Persia The Two Thrones\1.00.999"; ValueType: string; ValueName: "Profiles_Path"; ValueData: "%ProgramData%"; Flags:uninsdeletekey; Components:POPT2T [Icons] Name: {group}\Uninstall Prince of Persia Trilogy; Filename: {uninstallexe} Name: {group}\Prince of Persia The Sands of Time\Play Prince of Persia The Sands of Time; Filename: {app}\The Sands of Time\PrinceOfPersia.exe; Components:POPTSOT Name: {commondesktop}\Play Prince of Persia The Sands of Time; Filename: {app}\The Sands of Time\PrinceOfPersia.exe Name: {group}\Prince of Persia Warrior Within\Play Prince of Persia Warrior Within; Filename: {app}\Warrior Within\PrinceOfPersia.exe; Components:POPWW Name: {commondesktop}\Play Prince of Persia Warrior Within; Filename: {app}\Warrior Within\PrinceOfPersia.exe Name: {group}\Prince of Persia The Two Thrones\Play Prince of Persia The Two Thrones; Filename: {app}\The Sands of Time\PrinceOfPersia.exe; Components:POPT2T Name: {commondesktop}\Play Prince of Persia The Two Thrones; Filename: {app}\The Two Thrones\PrinceOfPersia.exe [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 sevenzip 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:PAn siChar): 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:PAn siChar): longword; begin if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct; LabelPct1.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%'; LabelCurrFileName.Caption:=ExpandConstant('{cm:Ext ractedFile} ')+MinimizePathName(CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width-ScaleX(100)); LabelTime1.Caption:=ExpandConstant('{cm:ElapsedTim e} ')+TimeStr2; LabelTime2.Caption:=ExpandConstant('{cm:RemainingT ime} ')+TimeStr1; LabelTime3.Caption:=ExpandConstant('{cm:AllElapsed Time}')+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('{c m:Extracted}'); ISDoneCancel:=0; ExtractTemporaryFile('unarc.dll'); ExtractTemporaryFile('English.ini'); #ifdef unrar ExtractTemporaryFile('Unrar.dll'); #endif #ifdef sevenzip ExtractTemporaryFile('7z.dll'); #endif ISDoneError:=true; if ISDoneInit(ExpandConstant(''),$F777, 0,0,0, MainForm.Handle, 512, @ProgressCallback) then begin repeat ChangeLanguage('English'); if IsComponentSelected('POPTSOT') then if not ISArcExtract ( 0, 33, ExpandConstant('{src}\pop.tsot'), ExpandConstant('{app}\The Sands Of Time'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break; if IsComponentSelected('POPWW') then if not ISArcExtract ( 0, 33, ExpandConstant('{src}\pop.ww'), ExpandConstant('{app}\Warrior Within'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break; if IsComponentSelected('POPT2T') then if not ISArcExtract ( 0, 33, ExpandConstant('{src}\pop.t2t'), ExpandConstant('{app}\The Two Thrones'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) 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;
__________________
NOT AVAILABLE |
| Sponsored Links |
|
#2
|
|||
|
|||
|
what is your compression code?..if it may custom code make arc.ini file
1.use arc.ini in your isdone section if not ISArcExtract ( 0, 60, ExpandConstant('{src}\data-1.pkg'), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), False) then break; in your ISArcExtract ( 0, 33, section :total is 100 for progress. you may use 33,33,34 {sum=100} 2.use the same version of unarc.dll or unarc.exe 3.if you use srep use the same in installer inclueded file. test it. It may work..
|
|
#3
|
|||
|
|||
|
Normal arc compression m9x, so arc.ini is not needed
__________________
NOT AVAILABLE |
|
#4
|
|||
|
|||
|
I am using password protected archives. Is it the cause of the problem? Though I added it in the script(Not in the script you are seeing :P
__________________
NOT AVAILABLE |
|
#5
|
||||
|
||||
|
then you have to put the password
if IsComponentSelected('POPTSOT') then if not ISArcExtract ( 0, 50, ExpandConstant('{src}\pop.tsot'), ExpandConstant('{app}\The Sands Of Time'), '', false, 'PaswrdHere', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break; if IsComponentSelected('POPWW') then if not ISArcExtract ( 0, 25, ExpandConstant('{src}\pop.ww'), ExpandConstant('{app}\Warrior Within'), '', false, '', 'PaswrdHere', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break; if IsComponentSelected('POPT2T') then if not ISArcExtract ( 0, 25, ExpandConstant('{src}\pop.t2t'), ExpandConstant('{app}\The Two Thrones'), '', false, 'PaswrdHere', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break; |
| The Following User Says Thank You to -XCX- For This Useful Post: | ||
78372 (18-01-2017) | ||
|
#6
|
|||
|
|||
|
Thanks, I put that in a wrong place
__________________
NOT AVAILABLE |
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem Unistall with CIU v2 | alucard1973 | Conversion Tutorials | 2 | 15-12-2015 02:43 |
| DirectX problem!!! | angel-TDw! | General Gaming | 10 | 17-11-2006 11:18 |
| dvd playing problem... | themis_t | CD/DVD Software & Utilities | 6 | 20-10-2004 13:44 |
| Problem with Record Now Max ver 4.5 | brkr101 | PS2 Games | 2 | 22-04-2004 21:40 |
| problem with my xbox | mrlucky | XBox Games | 1 | 11-01-2004 08:38 |