|
|
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
what is the best and right way to patch a file in inno setup using xdelta
I want to patch one big file (~1GB) inside of my installer that I created with inno setup
for creating the binary different patch file I think the best way is using xdelta (if there is any better ways I will be happy to hear it), but I'm not sure what is the best way to apply the created xdelta patch to a file in install time. I know there is a function name ISXDeltaExtract in IsDone that I think created for same reason, but I'm not sure how can I use it properly Code:
function ISxDeltaExtract(CurComponent: Cardinal; PctOfTotal: Double; MinRAM, MaxRAM: Integer; InName, DiffFile, OutFile: AnsiString; DeleteInFile, DeleteDiffFile: Boolean): Boolean; |
Sponsored Links |
#2
|
||||
|
||||
It is necessary to include XDelta3.dll in your installer.
You can create the code by copying parts of the code included in the DiskSpan GUI 2.0.0.2 example script. ISxDeltaExtract only works if you create the patch using XDelta with the parameters: Code:
MakePatch.bat @echo off set "OldFile=File_Old.txt" set "NewFile=File_New.txt" echo. xdelta3.exe -e -9 -S djw -vfs "%OldFile%" "%NewFile%" "%OldFile%.diff" echo. echo.Press any key to exit. pause >nul |
The Following User Says Thank You to Cesar82 For This Useful Post: | ||
maybeknow (17-09-2021) |
#3
|
|||
|
|||
Quote:
but something that I still not sure about is how can I show the progress of it in installation page of my installer... |
#4
|
|||
|
|||
I Keep getting this error...
and I dont know why here is the line of code Code:
ExtractTemporaryFile('XDelta3.dll'); ISxDeltaExtract(0, 0, 0, 256000, ExpandConstant('{app}\test1.txt'), ExpandConstant('{tmp}\test1.txt.diff'), ExpandConstant('{app}\out3.dat'), false, false); what is the type of first argument of function? should I pass a compressed file to it?? Last edited by maybeknow; 17-09-2021 at 08:09. |
#5
|
||||
|
||||
Quote:
Code:
ExtractTemporaryFile('XDelta3.dll'); ISxDeltaExtract(0, 0, 0, 640, ExpandConstant('{app}\test1.txt'), ExpandConstant('{tmp}\test1.txt.diff'), ExpandConstant('{app}\test_dest.txt'), false, false); |
The Following User Says Thank You to Cesar82 For This Useful Post: | ||
maybeknow (17-09-2021) |
#6
|
|||
|
|||
Quote:
I just using the ISDone.dll for the xdelta function, and im not using any other function |
#7
|
||||
|
||||
Quote:
Example patch 10% of progressbar. Code:
if not ISArcExtract ( 0, 0.9, ExpandConstant('{src}\*.arc'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break; if not ISxDeltaExtract ( 0, 0, 0.1, 640, ExpandConstant('{app}\origfile.txt'), ExpandConstant('{app}\patch.diff'), ExpandConstant('{app}\newfile.txt'), false, false) then break; |
The Following User Says Thank You to Cesar82 For This Useful Post: | ||
maybeknow (17-09-2021) |
Tags |
inno setup, patch, xdelta, xdelta3 |
Thread Tools | |
Display Modes | |
|
|