I have an embedded 7Zip archive
in my setup script.
Is there a "native" way of extracting the contents to a target folder?
If not any hints on how this could be achieved?
Updated with my implementation. Thanks for the hint TLama
[Files]
Source: "Documentation.7zip"; DestDir: "{tmp}"
Source: "7za.exe"; DestDir: "{tmp}"
[Run]
Filename: "{tmp}\7za.exe"; Parameters: "x -o""{app}"" ""{tmp}\Documentation.7zip"""; Flags: runhidden; Description: "{cm:InstallingDocumentation}"; StatusMsg: "{cm:InstallingDocumentationStatus}"
[CustomMessages]
en.InstallingDocumentation=Documentation Files
en.InstallingDocumentationStatus=Installing Documentation Files. This may take several minutes...
No, there is no native way to extract 7zip files from InnoSetup installer. However, you can get a copy of 7zip library, which is redistributable
and call it from InnoSetup script's code section.
Inno doesn't have any native method of extracting files from anything other than it's own archives (which normally compress better than 7Zip).
Inno Setup can however use wildcards for including files to install:
[Files]
Source: "Documentation\*.*"; DestDir: "{app}/Documentation/";
If you have many small files, using the solidcompression
flag will improve compression performance and size.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With