Browse Source

Add support for Inno Setup 6.3.0+

pull/174/head
crackedmind 2 years ago
parent
commit
4fd2b980a6
  1. 20
      src/setup/data.cpp
  2. 11
      src/setup/data.hpp
  3. 11
      src/setup/header.cpp
  4. 9
      src/setup/header.hpp
  5. 2
      src/setup/icon.cpp
  6. 4
      src/setup/icon.hpp
  7. 4
      src/setup/run.cpp
  8. 3
      src/setup/run.hpp
  9. 1
      src/setup/version.cpp

20
src/setup/data.cpp

@ -149,13 +149,24 @@ void data_entry::load(std::istream & is, const info & i) {
if(i.version >= INNO_VERSION(5, 1, 13)) {
flagreader.add(SolidBreak);
}
if(i.version >= INNO_VERSION(5, 5, 7)) {
if(i.version >= INNO_VERSION(5, 5, 7) && i.version < INNO_VERSION(6, 3, 0)) {
// Actually added in Inno Setup 5.5.9 but the data version was not bumped
flagreader.add(Sign);
flagreader.add(SignOnce);
}
options |= flagreader;
if (i.version >= INNO_VERSION(6, 3, 0)) {
stored_flag_reader<sign> flagreader2(is, i.version.bits());
flagreader2.add(NoSetting);
flagreader2.add(Yes);
flagreader2.add(Once);
flagreader2.add(Check);
sign_options |= flagreader2;
}
if(options & ChunkCompressed) {
chunk.compression = i.header.compression;
@ -206,3 +217,10 @@ NAMES(setup::data_entry::flags, "File Location Option",
"sign once",
"bzipped",
)
NAMES(setup::data_entry::sign, "File Sign Option",
"no setting",
"yes",
"once",
"check"
)

11
src/setup/data.hpp

@ -60,6 +60,14 @@ struct data_entry {
// obsolete:
BZipped
);
FLAGS(sign,
NoSetting,
Yes,
Once,
Check
);
stream::chunk chunk;
@ -73,6 +81,8 @@ struct data_entry {
boost::uint64_t file_version;
flags options;
sign sign_options;
/*!
* Load one data entry.
@ -86,5 +96,6 @@ struct data_entry {
} // namespace setup
NAMED_FLAGS(setup::data_entry::flags)
NAMED_FLAGS(setup::data_entry::sign)
#endif // INNOEXTRACT_SETUP_DATA_HPP

11
src/setup/header.cpp

@ -261,6 +261,10 @@ void header::load(std::istream & is, const version & version) {
changes_environment.clear();
changes_associations.clear();
}
if(version >= INNO_VERSION(6, 3, 0)) {
is >> util::binary_string(architectures_allowed_1);
is >> util::binary_string(architectures_installed_in_64bit_mode_1);
}
if(version >= INNO_VERSION(5, 2, 5)) {
is >> util::ansi_string(license_text);
is >> util::ansi_string(info_before);
@ -462,10 +466,10 @@ void header::load(std::istream & is, const version & version) {
compression = stored_enum<stored_compression_method_0>(is).get();
}
if(version >= INNO_VERSION(5, 6, 0)) {
if(version >= INNO_VERSION(5, 6, 0) && version < INNO_VERSION(6, 3, 0)) {
architectures_allowed = stored_flags<stored_architectures_1>(is).get();
architectures_installed_in_64bit_mode = stored_flags<stored_architectures_1>(is).get();
} else if(version >= INNO_VERSION(5, 1, 0)) {
} else if(version >= INNO_VERSION(5, 1, 0) && version < INNO_VERSION(6, 3, 0)) {
architectures_allowed = stored_flags<stored_architectures_0>(is).get();
architectures_installed_in_64bit_mode = stored_flags<stored_architectures_0>(is).get();
} else {
@ -662,6 +666,9 @@ void header::load(std::istream & is, const version & version) {
flagreader.add(UsePreviousPrivileges);
flagreader.add(WizardResizable);
}
if(version >= INNO_VERSION(6, 3, 0)) {
flagreader.add(UninstallLogging);
}
options |= flagreader;

9
src/setup/header.hpp

@ -91,7 +91,6 @@ struct header {
AppendDefaultGroupName,
EncryptionUsed,
ChangesEnvironment,
ShowUndisplayableLanguages,
SetupLogging,
SignedUninstaller,
UsePreviousLanguage,
@ -103,6 +102,7 @@ struct header {
AppNameHasConsts,
UsePreviousPrivileges,
WizardResizable,
UninstallLogging,
// Obsolete flags
Uninstallable,
@ -117,7 +117,8 @@ struct header {
DetectLanguageUsingLocale,
DisableDirExistsWarning,
BackSolid,
OverwriteUninstRegEntries
OverwriteUninstRegEntries,
ShowUndisplayableLanguages
);
@ -165,6 +166,10 @@ struct header {
std::string setup_mutex;
std::string changes_environment;
std::string changes_associations;
std::string architectures_allowed_1;
std::string architectures_installed_in_64bit_mode_1;
std::string license_text;
std::string info_before;
std::string info_after;

2
src/setup/icon.cpp

@ -97,7 +97,7 @@ void icon_entry::load(std::istream & is, const info & i) {
if(i.version.bits() != 16) {
flagreader.add(UseAppPaths);
}
if(i.version >= INNO_VERSION(5, 0, 3)) {
if(i.version >= INNO_VERSION(5, 0, 3) && i.version <= INNO_VERSION(6, 3, 0)) {
flagreader.add(FolderShortcut);
}
if(i.version >= INNO_VERSION(5, 4, 2)) {

4
src/setup/icon.hpp

@ -45,12 +45,12 @@ struct icon_entry : public item {
NeverUninstall,
CreateOnlyIfFileExists,
UseAppPaths,
FolderShortcut,
ExcludeFromShowInNewInstall,
PreventPinning,
HasAppUserModelToastActivatorCLSID,
// obsolete options:
RunMinimized
RunMinimized,
FolderShortcut
);
enum close_setting {

4
src/setup/run.cpp

@ -106,6 +106,9 @@ void run_entry::load(std::istream & is, const info & i) {
if(i.version >= INNO_VERSION(6, 1, 0)) {
flagreader.add(DontLogParameters);
}
if(i.version >= INNO_VERSION(6, 3, 0)) {
flagreader.add(LogOutput);
}
options = flagreader;
}
@ -123,6 +126,7 @@ NAMES(setup::run_entry::flags, "Run Option",
"32 bit",
"64 bit",
"run as original user",
"log output"
)
NAMES(setup::run_entry::wait_condition, "Run Wait Type",

3
src/setup/run.hpp

@ -50,7 +50,8 @@ struct run_entry : public item {
Bits32,
Bits64,
RunAsOriginalUser,
DontLogParameters
DontLogParameters,
LogOutput
);
enum wait_condition {

1
src/setup/version.cpp

@ -183,6 +183,7 @@ const known_version versions[] = {
{ "Inno Setup Setup Data (5.6.2) (u)", /* prerelease */ INNO_VERSION_EXT(5, 6, 2, 0), version::Unicode },
{ "Inno Setup Setup Data (6.0.0) (u)", INNO_VERSION_EXT(6, 0, 0, 0), version::Unicode },
{ "Inno Setup Setup Data (6.1.0) (u)", INNO_VERSION_EXT(6, 1, 0, 0), version::Unicode },
{ "Inno Setup Setup Data (6.3.0)", INNO_VERSION_EXT(6, 3, 0, 0), version::Unicode },
};
} // anonymous namespace

Loading…
Cancel
Save