View Single Post
  #174  
Old 04-02-2017, 01:58
shazzla shazzla is offline
Registered User
 
Join Date: Nov 2010
Location: Hunnia
Posts: 292
Thanks: 524
Thanked 102 Times in 78 Posts
shazzla is on a distinguished road
hi all !

im in trouble.... i cant unpack my archives using the default isdone script,although it works fine with precomp/srep/lzma,etc.

if i use any extrenal compressors,it says :

error-2.png

My .ISS looks like this :



#define zstd
[Setup]

[Files]
#ifdef zstd
Source: Include\zstd.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\arc.ini; DestDir: {tmp}; Flags: dontcopy
#endif

[Code]
#ifdef zstd
ExtractTemporaryFile('zstd.exe');
ExtractTemporaryFile('arc.ini');
#endif

if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data1.arc'), ExpandConstant('{app}\'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;




end;


Upon execution ,setup unpacks the arc.ini ,zstd.exe ,everything ,but the result is the above picture.
I tried to change the unpack command to :

if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data1.arc'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;

Doesnt help.
The only working method for me is :

if not ISExec(0, 0, 0, ExpandConstant('{tmp}\arc.exe'), ExpandConstant('x -o+ -cfg"{tmp}\arc.ini" -w"{app}" -hp"mypw" -dp"{app}" "{src}\data1.arc"'), ExpandConstant('{tmp}'), '...', False) then break;

But its pretty ugly.
Is there any other way to extract my archives using ISArcExtract function ?

Arc.ini content :

[External compressor:zstd]
header = 0
unpackcmd = zstd -d -f <stdin> <stdout>

Thanks in advance !
Reply With Quote