; Addon   : Inno Setup
; Version : 3.1, 2021-05-12 by deus-ex
; Authors : Gnozal, Maxwish, arsvrn, MultiArc team, ZoSTeR,
;           XPEHOPE3KA, icfu, TychoBarfy, MVV, deus-ex
; Required: Total Commander v9.5x, https://www.ghisler.com
;           MultiArc v1.4.3.162, http://totalcmd.net/plugring/MultiArc2012.html
;           Latest MultiArc release, https://yadi.sk/d/EtSssI_ZuFRtRQ
;           Inno Setup Unpacker v0.50, http://innounp.sourceforge.net
;
;
; Inno Setup Unpacker, MultiArc, IDs:
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; Inno Setup Unpacker supports listing and unpacking the content of software
; installers created with the free installer solution Inno Setup, available
; at https://jrsoftware.org/isinfo.php
;
; Inno Setup Unpacker offers support for most Inno Setup releases ranging from
; v1.3.x to v6.1.x with a few exceptions.
;
; Inno Setup installers usually contain one of two signatures (without quotes):
;
;  'Inno Setup Setup Data ('
;  'My Inno Setup Extensions Setup Data ('
;
; First this script searches the executable header for the string 'Inno Setup'.
; If a match is found, the executable then is checked for several exclusion
; strings to filter unsupported versions:
; 
;  '1.3.6'    = Inno Setup v1.3.6
;  '1.3.9'    = Inno Setup v1.3.9
;  '1.3.1'    = Inno Setup v1.3.10-v1.3.19
;  '4.2.5'    = Inno Setup v4.2.5
;  'with ISX' = any Inno Setup version
;  'jpe)'     = any Inno Setup version
;
; Should you encounter any Inno Setup installer currently unsupported by this
; script, you can verify with the Inno Setup Unpacker using this command-line:
;
;  innounp.exe -v -b -m <path>[inno-setup.exe]
;
; Please report any issues and suggestions in the related forum thread at
; https://ghisler.ch/board/viewtopic.php?t=3810
;
;
; Unsupported Inno Setup Installers:
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; Any Inno Setup Installer version unsupported by Inno Setup Unpacker
; is excluded by this script. Optionally any Inno Setup Installer can
; be accessed with the packer plugin InstallExplorer, available at
; https://totalcmd.net/plugring/IETotal.html (32-bit only).
;
;
; History:
; ~~~~~~~~
; v3.1, 2021-05-12 by deus-ex
;  * adjusted parameters of List and ExtractWithPath commands
;  * added Extract command, Note: This is ONLY used when BatchUnpack=0,
;    useful for Inno Setup Installers that fail to unpack with BatchUnpack=1
;  * removed unrequired special specifier in Format0= string
;
; v3.0, 2021-01-24 by deus-ex
;  * revised and simplified script, based on InnoUnp's broadened support of
;    Inno Setup versions and MultiArc's fixed 'ExcludeIDs' function (many thanks to MVV)
;  + adds support for Inno Setup Installer versions 1.3.x to 6.1.x
;  + includes previously unsupported versions from v1.3.x, v2.x, and many more
;  * improved handling of unsupported versions and variants
;  * rewrote addon text, improved descriptions
;  + added links to referenced software
;
; v2.1a, 2007-12-22 by deus-ex
;  * updated info for Inno Setup Unpacker
;  * rewrote addon text
;
; v2.1, 2007-08-06 by deus-ex
;  + converted decimal IDPos values to hexadecimal, requires MultiArc v1.4.x
;  + enhanced exclude filter to detect 'My Inno Setup Extensions Setup Data (3.0.4)'
;  - removed 'ExcludeIDs', feature doesn't work properly
;  * rewrote addon text, fixed spelling
;
; v2.0b, 2007-03-08 by ZoSTeR
;  + added IDPos to support 'Inno 5.1.10'
;
; v2.0a, 2006-05-20 by deus-ex
;  + added IDPos to support a 'Inno 4.0.9(UPXed)' variant (thanks to XPEHOPE3KA)
;
; v2.0, 2006-05-18 by deus-ex
;  * restructured sections to improve exclusion of unsupported Inno Setup Installers
;  * increased file name length in 'Format0', fixes truncated file names in listing
;  * rewrote addon text, restructured layout, fixed spelling
;  + added filter for 'Inno 3.0.3 with ISX'
;  + added filter for 'Inno 4.2.2jpe'
;  + added support for 'Inno 3.0.6.1', previously handled by InstallExplorer
;  + added support for 'Inno 4.0.9(UPXed)', InnoUnp cannot handle when unUPXed
;  + added support for 'Inno 4.0.10(UPXed)', InnoUnp cannot handle when unUPXed
;  + added ASCII conversions of ID strings for comprehensibility
;  + added hexadecimal conversions of IDPos strings for quick checking in executables
;
; v1.1, 2006-04-06 by MultiArc team, arsvrn
;  * rewrote ID and IDPos for improved archive detection
;
; v1.0.1, 2004-04-19 by Maxwish
;  + added '-m' parameters, to also show embedded files
;  + added 'BatchUnpack=1' for speed improvement
;  - removed { } from {@%LQ} in 'extract' strings, not required
;
; v1.0a, 2004-04-02 by Maxwish
;  * corrected datestring in 'Format0'
;
; v1.0, 2004-04-02 by Gnozal
;  * innitial release
;
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
[INNO SETUP]
Description="Inno Setup"
Archiver=%COMMANDER_PATH%\Plugins\MULTIARC\innounp.exe
Extension=exe
ID=49 6E 6E 6F 20 53 65 74 75 70
;ID=Inno Setup
IDPos=<SeekID>
ExcludeIDs=(31 2E 33 2E 31, 23), (31 2E 33 2E 36, 23), (31 2E 33 2E 39, 23), (77 69 74 68 20 49 53 58, 30), (77 69 74 68 20 49 53 58, 31), (6A 70 65 29, 28), (34 2E 32 2E 35, 23)
;ExcludeIDs=(1.3.1, Offset 23),  (1.3.6, Offset 23),   (1.3.9, Offset 23),   (with ISX, Offset 30),         (with ISX, Offset 31),         (jpe), Offset 28), (4.2.5, Offset 23)
Start="^--"
End="^--"
Format0="zzzzzzzzzz  yyyy tt dd hh mm n++"
List=%P -v -b -m %AQA
BatchUnpack=1
Extract=%P -e -b -m -q -y %AQA @%LQ
ExtractWithPath=%P -x -b -m -q -y %AQA @%LQ

[MultiArc]
LanguageFile=Russian.lng
