Skip to content

Commit

Permalink
Add support for a modified Inno Setup 5.3.10 variant
Browse files Browse the repository at this point in the history
This version has the same additional byte in the primary setup header
as is present in the already supported 5.4.2 and 5.5.0 variants.
  • Loading branch information
Iglu47 committed Dec 2, 2021
1 parent 660546a commit 83c1544
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

innoextract 1.10 (TBD)
- Added support for a modified Inno Setup 5.3.10 variant

innoextract 1.9 (2020-08-09)
- Added preliminary support for Inno Setup 6.1.0
- Added support for a modified Inno Setup 5.4.2 variant
Expand Down
4 changes: 2 additions & 2 deletions src/setup/header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,10 @@ void header::load(std::istream & is, const version & version) {
uninstall_display_size = 0;
}

if(version == INNO_VERSION_EXT(5, 4, 2, 1) || version == INNO_VERSION_EXT(5, 5, 0, 1)) {
if(version == INNO_VERSION_EXT(5, 3, 10, 1) || 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.4.2 or 5.5.0 (unicode) data version string while the format differs:
* the 5.3.10, 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
Expand Down
9 changes: 8 additions & 1 deletion src/setup/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ const known_version versions[] = {
{ "Inno Setup Setup Data (5.3.9)", INNO_VERSION_EXT(5, 3, 9, 0), 0 },
{ "Inno Setup Setup Data (5.3.9) (u)", INNO_VERSION_EXT(5, 3, 9, 0), version::Unicode },
{ "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.3.10) (u)", /* ambiguous */ INNO_VERSION_EXT(5, 3, 10, 0), version::Unicode },
{ "" /* BlackBox v1? */, INNO_VERSION_EXT(5, 3, 10, 1), 0 },
{ "" /* BlackBox v1? */, INNO_VERSION_EXT(5, 3, 10, 1), 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)", /* ambiguous */ INNO_VERSION_EXT(5, 4, 2, 0), version::Unicode },
{ "" /* BlackBox v1? */, INNO_VERSION_EXT(5, 4, 2, 1), 0 },
Expand Down Expand Up @@ -375,6 +377,11 @@ bool version::is_ambiguous() const {
return true;
}

if(value == INNO_VERSION(5, 3, 10)) {
// might be either 5.3.10 or 5.3.10.1
return true;
}

if(value == INNO_VERSION(5, 4, 2)) {
// might be either 5.4.2 or 5.4.2.1
return true;
Expand Down

0 comments on commit 83c1544

Please sign in to comment.