sisong / HDiffPatch

a C\C++ library and command-line tools for Diff & Patch between binary files or directories(folder); cross-platform; runs fast; create small delta/differential; support large files and limit memory requires when diff & patch.
Other
1.52k stars 280 forks source link

How to create sfx ? #320

Closed AliM1988 closed 1 year ago

AliM1988 commented 1 year ago

I don't know how to create SFX. hpatchz [-X-exe#selfExecuteFile] diffFile -X#outSelfExtractArchive

What is selfExecuteFile ?

sisong commented 1 year ago

SFX self extract archive: Combine the hpatchz executable file of the target platform and the diffFile into one executable file.
"selfExecuteFile" is the hpatchz executable file of the target platform's pathName.
"outSelfExtractArchive" is the combined one executable file's pathName.

AliM1988 commented 1 year ago

Thank you for your reply. As an example:

set program="hpatchz.exe"
set patch="patch.hdiffz"
set selfpatch="patch.sfx.exe"

%program% -X-exe#%program% %patch% -X#%selfpatch%

I can't understand why we should repeat %program% (hpatchz) while SFX creator and SFX executer is same?

sisong commented 1 year ago

if same OS,you can delete '-X-exe#%program%' .
we created sfx on maxos, and need run sfx on windows.

AliM1988 commented 1 year ago

In Windows %program% %patch% -X#%selfpatch% works fine! Thank you.