Browse Source

Add support for a modified Inno Setup 5.4.2 variant

This version has the same additional byte in the primary setup header
as is present in the already supported 5.5.0 variant.

Fixes: issue #103
pull/108/head
Daniel Scharrer 6 years ago
parent
commit
0e07acc503
  1. 1
      CHANGELOG
  2. 4
      src/setup/header.cpp
  3. 9
      src/setup/version.cpp

1
CHANGELOG

@ -1,5 +1,6 @@
innoextract 1.9 (TBD)
- Added support for a modified Inno Setup 5.4.2 variant
- Fixed output directory being created for unsupported installers
- Fixed some safe non-ASCII characters being stripped from filenames
- Fixed handling of path separators in Japanese and Korean installers

4
src/setup/header.cpp

@ -493,10 +493,10 @@ void header::load(std::istream & is, const version & version) {
uninstall_display_size = 0;
}
if(version == INNO_VERSION_EXT(5, 5, 0, 1)) {
if(version == INNO_VERSION_EXT(5, 4, 2, 1) || version == INNO_VERSION_EXT(5, 5, 0, 1)) {
/*
* This is needed to extract an Inno Setup variant (BlackBox v2?) that uses
* the 5.5.0 (unicode) data version string while the format differs:
* the 5.4.2 or 5.5.0 (unicode) data version string while the format differs:
* The language entries are off by one byte and the EncryptionUsed flag
* gets set while there is no decrypt_dll.
* I'm not sure where exactly this byte goes, but it's after the compression

9
src/setup/version.cpp

@ -160,7 +160,9 @@ const known_version versions[] = {
{ "Inno Setup Setup Data (5.3.10)", INNO_VERSION_EXT(5, 3, 10, 0), 0 },
{ "Inno Setup Setup Data (5.3.10) (u)", INNO_VERSION_EXT(5, 3, 10, 0), version::Unicode },
{ "Inno Setup Setup Data (5.4.2)", INNO_VERSION_EXT(5, 4, 2, 0), 0 },
{ "Inno Setup Setup Data (5.4.2) (u)", INNO_VERSION_EXT(5, 4, 2, 0), version::Unicode },
{ "Inno Setup Setup Data (5.4.2) (u)", /* ambiguous */ INNO_VERSION_EXT(5, 4, 2, 0), version::Unicode },
{ "" /* BlackBox v1? */, INNO_VERSION_EXT(5, 4, 2, 1), 0 },
{ "" /* BlackBox v1? */, INNO_VERSION_EXT(5, 4, 2, 1), version::Unicode },
{ "Inno Setup Setup Data (5.5.0)", INNO_VERSION_EXT(5, 5, 0, 0), 0 },
{ "Inno Setup Setup Data (5.5.0) (u)", /* ambiguous */ INNO_VERSION_EXT(5, 5, 0, 0), version::Unicode },
{ "" /* BlackBox v2? */, INNO_VERSION_EXT(5, 5, 0, 1), 0 },
@ -372,6 +374,11 @@ bool version::is_ambiguous() const {
return true;
}
if(value == INNO_VERSION(5, 4, 2)) {
// might be either 5.5.0 or 5.5.0.1
return true;
}
if(value == INNO_VERSION(5, 5, 0)) {
// might be either 5.5.0 or 5.5.0.1
return true;

Loading…
Cancel
Save