diff --git a/CHANGELOG b/CHANGELOG index c774684..734092c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ innoextract 1.8 (WIP) - - Added preliminary support for Inno Setup 5.6.2 installers + - Added support for pre-release Inno Setup 5.6.2 installers used by GOG + - Added support for a modified Inno Setup 5.5.7 variant - Added support for installers using an alternative setup loader magic - Added support for using boost_{zlib,bzip2} when statically linking Boost - Added support for an Inno Setup 5.5.7/5.6.0 variant with an uppercase (U) in the data version string diff --git a/src/setup/language.cpp b/src/setup/language.cpp index 14f14a4..e16e055 100644 --- a/src/setup/language.cpp +++ b/src/setup/language.cpp @@ -35,19 +35,23 @@ void language_entry::load(std::istream & is, const version & version) { is >> util::encoded_string(language_name, (version >= INNO_VERSION(4, 2, 2)) ? 1200u : 1252u); - is >> util::encoded_string(dialog_font, version.codepage()); - is >> util::encoded_string(title_font, version.codepage()); - is >> util::encoded_string(welcome_font, version.codepage()); - is >> util::encoded_string(copyright_font, version.codepage()); + if(version == INNO_VERSION_EXT(5, 5, 7, 1)) { + util::load(is); // always 0? + } + + is >> util::binary_string(dialog_font); + is >> util::binary_string(title_font); + is >> util::binary_string(welcome_font); + is >> util::binary_string(copyright_font); if(version >= INNO_VERSION(4, 0, 0)) { is >> util::binary_string(data); } if(version >= INNO_VERSION(4, 0, 1)) { - is >> util::ansi_string(license_text); - is >> util::ansi_string(info_before); - is >> util::ansi_string(info_after); + is >> util::binary_string(license_text); + is >> util::binary_string(info_before); + is >> util::binary_string(info_after); } else { license_text.clear(), info_before.clear(), info_after.clear(); } @@ -75,6 +79,10 @@ void language_entry::load(std::istream & is, const version & version) { welcome_font_size = util::load(is); copyright_font_size = util::load(is); + if(version == INNO_VERSION_EXT(5, 5, 7, 1)) { + util::load(is); // always 8 or 9? + } + if(version >= INNO_VERSION(5, 2, 3)) { right_to_left = util::load_bool(is); } else { diff --git a/src/setup/version.cpp b/src/setup/version.cpp index 08d720f..2a2a37c 100644 --- a/src/setup/version.cpp +++ b/src/setup/version.cpp @@ -145,13 +145,14 @@ const known_version versions[] = { { "Inno Setup Setup Data (5.4.2)", INNO_VERSION_EXT(5, 4, 2, 0), false }, { "Inno Setup Setup Data (5.4.2) (u)", INNO_VERSION_EXT(5, 4, 2, 0), true }, { "Inno Setup Setup Data (5.5.0)", INNO_VERSION_EXT(5, 5, 0, 0), false }, - { "Inno Setup Setup Data (5.5.0) (u)", INNO_VERSION_EXT(5, 5, 0, 0), true }, - { "!!! BlackBox v2?, marked as 5.5.0", INNO_VERSION_EXT(5, 5, 0, 1), true }, + { "Inno Setup Setup Data (5.5.0) (u)", INNO_VERSION_EXT(5, 5, 0, 0), true }, // ! + { "" /* BlackBox v2? */, INNO_VERSION_EXT(5, 5, 0, 1), true }, { "Inno Setup Setup Data (5.5.6)", INNO_VERSION_EXT(5, 5, 6, 0), false }, { "Inno Setup Setup Data (5.5.6) (u)", INNO_VERSION_EXT(5, 5, 6, 0), true }, { "Inno Setup Setup Data (5.5.7)", INNO_VERSION_EXT(5, 5, 7, 0), false }, { "Inno Setup Setup Data (5.5.7) (u)", INNO_VERSION_EXT(5, 5, 7, 0), true }, - { "Inno Setup Setup Data (5.5.7) (U)", INNO_VERSION_EXT(5, 5, 7, 0), true }, + { "Inno Setup Setup Data (5.5.7) (U)", INNO_VERSION_EXT(5, 5, 7, 0), true }, // ! + { "" /* unknown 5.5.7 (u) variant */, INNO_VERSION_EXT(5, 5, 7, 1), true }, // ! { "Inno Setup Setup Data (5.6.0)", INNO_VERSION_EXT(5, 6, 0, 0), false }, { "Inno Setup Setup Data (5.6.0) (u)", INNO_VERSION_EXT(5, 6, 0, 0), true }, { "Inno Setup Setup Data (5.6.2)", INNO_VERSION_EXT(5, 6, 2, 0), false }, // Unreleased, used by GOG @@ -243,7 +244,7 @@ void version::load(std::istream & is) { for(size_t i = 0; i < size_t(boost::size(versions)); i++) { - if(!memcmp(version, versions[i].name, sizeof(version))) { + if(versions[i].name[0] != '\0' && !memcmp(version, versions[i].name, sizeof(version))) { value = versions[i].version; bits = 32; unicode = versions[i].unicode; @@ -345,8 +346,8 @@ bool version::is_ambiguous() const { return true; } - if(value == INNO_VERSION(5, 5, 7)) { - // might be either 5.5.7 or 5.6.0 + if(value == INNO_VERSION(5, 5, 7) || value == INNO_VERSION_EXT(5, 5, 7, 1)) { + // might be either 5.5.7, an unknown modification of 5.5.7, or 5.6.0 return true; }