From e392055b59ebd2856ff346cf5555e61671568f2d Mon Sep 17 00:00:00 2001 From: Daniel Scharrer Date: Sun, 24 Jun 2012 08:29:49 +0200 Subject: [PATCH] Add support for Inno Setup 5.5.0 installers --- README.md | 2 +- VERSION | 2 +- src/setup/header.cpp | 19 ++++++++++++++++++- src/setup/header.hpp | 4 ++++ src/setup/icon.cpp | 4 ++++ src/setup/icon.hpp | 1 + src/setup/version.cpp | 2 ++ 7 files changed, 31 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fbdbca6..22dceee 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Inno Extract - A tool to unpack installers created by Inno Setup -[Inno Setup](http://www.jrsoftware.org/isinfo.php) is a tool to create installers for Microsoft Windows applications. Inno Extracts allows to extract such installers under non-windows systems without running the actual installer using wine. Inno Extract currently supports installers created by Inno Setup 1.2.10 to 5.4.3. +[Inno Setup](http://www.jrsoftware.org/isinfo.php) is a tool to create installers for Microsoft Windows applications. Inno Extracts allows to extract such installers under non-windows systems without running the actual installer using wine. Inno Extract currently supports installers created by Inno Setup 1.2.10 to 5.5.0. Inno Extract is available under the ZLIB license - see the LICENSE file. diff --git a/VERSION b/VERSION index a956ebe..07649f3 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1,3 @@ Inno Extract 1.2-git -Inno Setup 1.2.10 to 5.4.3 +Inno Setup 1.2.10 to 5.5.0 (C) 2011-2012 Daniel Scharrer diff --git a/src/setup/header.cpp b/src/setup/header.cpp index bb2f70e..8f73694 100644 --- a/src/setup/header.cpp +++ b/src/setup/header.cpp @@ -211,6 +211,11 @@ void header::load(std::istream & is, const version & version) { } else { uninstallable.clear(); } + if(version >= INNO_VERSION(5, 5, 0)) { + is >> encoded_string(close_applications_filter, version.codepage()); + } else { + close_applications_filter.clear(); + } if(version >= INNO_VERSION(5, 2, 5)) { is >> ansi_string(license_text); is >> ansi_string(info_before); @@ -389,7 +394,9 @@ void header::load(std::istream & is, const version & version) { disable_program_group_page = stored_enum(is).get(); } - if(version >= INNO_VERSION(5, 3, 6)) { + if(version >= INNO_VERSION(5, 5, 0)) { + uninstall_display_size = load_number(is); + } else if(version >= INNO_VERSION(5, 3, 6)) { uninstall_display_size = load_number(is); } else { uninstall_display_size = 0; @@ -524,6 +531,13 @@ void header::load(std::istream & is, const version & version) { if(version >= INNO_VERSION(5, 3, 9)) { flags.add(DisableWelcomePage); } + if(version >= INNO_VERSION(5, 5, 0)) { + flags.add(CloseApplications); + flags.add(RestartApplications); + flags.add(AllowNetworkDrive); + } else { + options |= AllowNetworkDrive; + } options |= flags; @@ -615,6 +629,9 @@ NAMES(setup::header::flags, "Setup Option", "signed uninstaller", "use previous language", "disable welcome page", + "close applications", + "restart applications", + "allow network drive", "uninstallable", "disable dir page", "disable program group page", diff --git a/src/setup/header.hpp b/src/setup/header.hpp index 3c7aac4..d7ee6dd 100644 --- a/src/setup/header.hpp +++ b/src/setup/header.hpp @@ -89,6 +89,9 @@ struct header { SignedUninstaller, UsePreviousLanguage, DisableWelcomePage, + CloseApplications, + RestartApplications, + AllowNetworkDrive, // Obsolete flags Uninstallable, @@ -140,6 +143,7 @@ struct header { std::string app_modify_path; std::string create_uninstall_registry_key; std::string uninstallable; + std::string close_applications_filter; std::string license_text; std::string info_before; std::string info_after; diff --git a/src/setup/icon.cpp b/src/setup/icon.cpp index 370b03f..6e503ac 100644 --- a/src/setup/icon.cpp +++ b/src/setup/icon.cpp @@ -90,6 +90,9 @@ void icon_entry::load(std::istream & is, const version & version) { if(version >= INNO_VERSION(5, 4, 2)) { flags.add(ExcludeFromShowInNewInstall); } + if(version >= INNO_VERSION(5, 5, 0)) { + flags.add(PreventPinning); + } options = flags; } @@ -102,6 +105,7 @@ NAMES(setup::icon_entry::flags, "Icon Option", "use app paths", "folder shortcut", "exclude from show in new install", + "prevent pinning", "run minimized", ) diff --git a/src/setup/icon.hpp b/src/setup/icon.hpp index 2265b7e..25d19f9 100644 --- a/src/setup/icon.hpp +++ b/src/setup/icon.hpp @@ -41,6 +41,7 @@ struct icon_entry : public item { UseAppPaths, FolderShortcut, ExcludeFromShowInNewInstall, + PreventPinning, // obsolete options: RunMinimized ); diff --git a/src/setup/version.cpp b/src/setup/version.cpp index 3a233b8..255d4f3 100644 --- a/src/setup/version.cpp +++ b/src/setup/version.cpp @@ -141,6 +141,8 @@ const known_version versions[] = { { "Inno Setup Setup Data (5.3.10) (u)", INNO_VERSION_EXT(5, 3, 10, 0), true }, { "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 }, }; } // anonymous namespace