### Extract Inno Setup Installer Source: https://constexpr.org/innoextract?C=S&O=D To extract an Inno Setup installer to the current directory, use the basic command followed by the filename. For a list of available options, use the --help flag. ```bash $ innoextract ``` ```bash $ innoextract --help ``` ```bash $ man 1 innoextract ``` -------------------------------- ### Setup Info Header Definition Source: https://constexpr.org/innoextract/doc/info_8hpp_source.html Defines the core structure and entry types for Inno Setup installer data. Requires inclusion of header, version, and utility files. ```cpp /* * Copyright (C) 2011-2019 Daniel Scharrer * * This software is provided 'as-is', without any express or implied * warranty. In no event will the author(s) be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. */ #ifndef INNOEXTRACT_SETUP_INFO_HPP #define INNOEXTRACT_SETUP_INFO_HPP #include #include #include "setup/header.hpp" #include "setup/version.hpp" #include "util/encoding.hpp" #include "util/flags.hpp" namespace setup { struct component_entry; struct data_entry; struct delete_entry; struct directory_entry; struct file_entry; struct icon_entry; struct ini_entry; struct language_entry; struct message_entry; struct permission_entry; struct registry_entry; struct run_entry; struct task_entry; struct type_entry; struct info { // Explicit constructor/destructor required to allow forward-declaring entry types info(); ~info(); FLAGS(entry_types, Components, DataEntries, DeleteEntries, UninstallDeleteEntries, Directories, Files, Icons, IniEntries, Languages, Messages, Permissions, RegistryEntries, RunEntries, UninstallRunEntries, Tasks, Types, WizardImages, DecompressorDll, DecryptDll, NoSkip, NoUnknownVersion ); setup::version version; ``` -------------------------------- ### setup::version Source: https://constexpr.org/innoextract/doc/block_8hpp_source.html Represents the version of the setup. ```APIDOC ## setup::version ### Description Represents the version of the setup. ### Definition version.hpp:49 ``` -------------------------------- ### Namespace: setup Source: https://constexpr.org/innoextract/doc/setup_2file_8cpp Details about the 'setup' namespace. ```APIDOC ## Namespace: setup ### Description This namespace contains various utility functions and definitions. ### Sub-namespaces - None ### Classes - @40::file_copy_mode ### Enumerations - @40::file_copy_mode ### Functions - NAMES() ``` -------------------------------- ### Setup Header Options Source: https://constexpr.org/innoextract/doc/extract_8cpp_source.html Flags representing options within the setup header. These control various aspects of the installer's behavior. ```cpp flags options ``` -------------------------------- ### Setup Header Data Structures Source: https://constexpr.org/innoextract/doc/header_8hpp_source.html Data members and types representing the installer configuration state. ```cpp std::string app_name; 138 std::string app_versioned_name; 139 std::string app_id; 140 std::string app_copyright; 141 std::string app_publisher; 142 std::string app_publisher_url; 143 std::string app_support_phone; 144 std::string app_support_url; 145 std::string app_updates_url; 146 std::string app_version; 147 std::string default_dir_name; 148 std::string default_group_name; 149 std::string uninstall_icon_name; 150 std::string base_filename; 151 std::string uninstall_files_dir; 152 std::string uninstall_name; 153 std::string uninstall_icon; 154 std::string app_mutex; 155 std::string default_user_name; 156 std::string default_user_organisation; 157 std::string default_serial; 158 std::string app_readme_file; 159 std::string app_contact; 160 std::string app_comments; 161 std::string app_modify_path; 162 std::string create_uninstall_registry_key; 163 std::string uninstallable; 164 std::string close_applications_filter; 165 std::string setup_mutex; 166 std::string changes_environment; 167 std::string changes_associations; 168 std::string license_text; 169 std::string info_before; 170 std::string info_after; 171 std::string uninstaller_signature; 172 std::string compiled_code; 173 174 std::bitset<256> lead_bytes; 175 176 size_t language_count; 177 size_t message_count; 178 size_t permission_count; 179 size_t type_count; 180 size_t component_count; 181 size_t task_count; 182 size_t directory_count; 183 size_t file_count; 184 size_t data_entry_count; 185 size_t icon_count; 186 size_t ini_entry_count; 187 size_t registry_entry_count; 188 size_t delete_entry_count; 189 size_t uninstall_delete_entry_count; 190 size_t run_entry_count; 191 size_t uninstall_run_entry_count; 192 193 windows_version_range winver; 194 195 typedef boost::uint32_t Color; 196 Color back_color; 197 Color back_color2; 198 Color image_back_color; 199 Color small_image_back_color; 200 201 enum style { 202 ClassicStyle, 203 ModernStyle 204 }; 205 style wizard_style; 206 boost::uint32_t wizard_resize_percent_x; 207 boost::uint32_t wizard_resize_percent_y; 208 209 enum alpha_format { 210 AlphaIgnored, 211 AlphaDefined, 212 AlphaPremultiplied 213 }; 214 alpha_format image_alpha_format; 215 216 crypto::checksum password; 217 std::string password_salt; 218 219 boost::int64_t extra_disk_space_required; 220 size_t slices_per_disk; 221 222 enum install_verbosity { 223 NormalInstallMode, 224 SilentInstallMode, 225 VerySilentInstallMode, 226 }; 227 install_verbosity install_mode; 228 229 enum log_mode { 230 AppendLog, 231 NewLog, 232 OverwriteLog 233 }; 234 log_mode uninstall_log_mode; 235 236 style uninstall_style; 237 238 enum auto_bool { 239 Auto, 240 No, 241 Yes 242 }; 243 244 auto_bool dir_exists_warning; 245 246 enum privilege_level { 247 NoPrivileges, 248 PowerUserPrivileges, 249 AdminPriviliges, 250 LowestPrivileges 251 }; 252 privilege_level privileges_required; 253 254 privileges_required_overrides privileges_required_override_allowed; 255 256 auto_bool show_language_dialog; 257 258 enum language_detection_method { 259 UILanguage, 260 LocaleLanguage, 261 NoLanguageDetection 262 }; 263 language_detection_method language_detection; 264 265 stream::compression_method compression; 266 267 architecture_types architectures_allowed; 268 architecture_types architectures_installed_in_64bit_mode; 269 270 boost::uint32_t signed_uninstaller_original_size; 271 boost::uint32_t signed_uninstaller_header_checksum; 272 273 auto_bool disable_dir_page; 274 auto_bool disable_program_group_page; 275 276 boost::uint64_t uninstall_display_size; 277 278 flags options; 279 280 void load(std::istream & is, const version & version); 281 282 void decode(util::codepage_id codepage); 283 284 }; 285 286 } // namespace setup ``` -------------------------------- ### Setup File Entry Definition Source: https://constexpr.org/innoextract/doc/setup_2file_8hpp_source.html Defines the file_entry structure and its associated installation flags within the setup namespace. ```cpp /* * Copyright (C) 2011-2019 Daniel Scharrer * * This software is provided 'as-is', without any express or implied * warranty. In no event will the author(s) be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. */ #ifndef INNOEXTRACT_SETUP_FILE_HPP #define INNOEXTRACT_SETUP_FILE_HPP #include #include #include #include #include "crypto/checksum.hpp" #include "setup/item.hpp" #include "util/enum.hpp" #include "util/flags.hpp" namespace setup { struct info; struct file_entry : public item { FLAGS(flags, ConfirmOverwrite, NeverUninstall, RestartReplace, DeleteAfterInstall, RegisterServer, RegisterTypeLib, SharedFile, CompareTimeStamp, FontIsNotTrueType, SkipIfSourceDoesntExist, OverwriteReadOnly, OverwriteSameVersion, CustomDestName, OnlyIfDestFileExists, NoRegError, UninsRestartDelete, OnlyIfDoesntExist, IgnoreVersion, PromptIfOlder, DontCopy, UninsRemoveReadOnly, RecurseSubDirsExternal, ReplaceSameVersionIfContentsDiffer, DontVerifyChecksum, UninsNoSharedFilePrompt, CreateAllSubDirs, Bits32, Bits64, ExternalSizePreset, SetNtfsCompression, UnsetNtfsCompression, GacInstall, // obsolete options: IsReadmeFile ); ``` -------------------------------- ### setup::info Source: https://constexpr.org/innoextract/doc/ini_8hpp_source.html Class to hold and load setup headers. ```APIDOC ## setup::info ### Description A class designed to store and manage setup-related header information. ### Fields (Specific fields are not detailed in the provided text, but the class is used in the `load` method of `ini_entry`.) ``` -------------------------------- ### Print Setup Information Details Source: https://constexpr.org/innoextract/doc/debug_8cpp_source.html Prints various details about the Inno Setup configuration, including languages, messages, permissions, and more. Requires setup::info object. ```cpp void print_info(const setup::info & info) { std::ios_base::fmtflags old = std::cout.flags(); std::cout << std::boolalpha; print_header(info.header); print_entries(info, info.languages, "Languages"); print_entries(info, info.messages, "Messages"); print_entries(info, info.permissions, "Permissions"); print_entries(info, info.types, "Types"); print_entries(info, info.components, "Components"); print_entries(info, info.tasks, "Tasks"); print_entries(info, info.directories, "Directories"); print_entries(info, info.files, "Files"); print_entries(info, info.icons, "Icons"); print_entries(info, info.ini_entries, "INI entries"); print_entries(info, info.registry_entries, "Registry entries"); print_entries(info, info.delete_entries, "Delete entries"); print_entries(info, info.uninstall_delete_entries, "Uninstall delete entries"); print_entries(info, info.run_entries, "Run entries"); print_entries(info, info.uninstall_run_entries, "Uninstall run entries"); print_entries(info, info.data_entries, "Data entries"); print_aux(info); std::cout.setf(old, std::ios_base::boolalpha); } ``` -------------------------------- ### Information Before and After Setup Source: https://constexpr.org/innoextract/doc/structsetup_1_1header Configuration for information displayed before and after setup. ```APIDOC ## GET /setup/header/info_before ### Description Retrieves information to be displayed before the setup process begins. ### Method GET ### Endpoint /setup/header/info_before ### Response #### Success Response (200) - **info_before** (string) - Information displayed before setup. #### Response Example ```json { "info_before": "Please read the following important information..." } ``` ## GET /setup/header/info_after ### Description Retrieves information to be displayed after the setup process is complete. ### Method GET ### Endpoint /setup/header/info_after ### Response #### Success Response (200) - **info_after** (string) - Information displayed after setup. #### Response Example ```json { "info_after": "Setup has been completed successfully. Thank you!" } ``` ``` -------------------------------- ### Setup Configuration Options Source: https://constexpr.org/innoextract/doc/structsetup_1_1header-members.html Various configuration options for the Inno Setup setup process. ```APIDOC ## Setup Configuration Options ### Description This section details various configuration parameters and constants available in Inno Setup. ### Parameters - **icon_count** (Integer) - The number of icons. - **image_alpha_format** (String) - The alpha format for images. - **image_back_color** (Color) - The background color for images. - **info_after** (String) - Text to display after information. - **info_before** (String) - Text to display before information. - **ini_entry_count** (Integer) - The number of INI entries. - **install_mode** (Enum) - The installation mode. - **install_verbosity** (Enum Name) - The verbosity level for installation. - **language_count** (Integer) - The number of languages. - **language_detection** (Boolean) - Whether language detection is enabled. - **language_detection_method** (Enum Name) - The method for language detection. - **lead_bytes** (Integer) - The number of lead bytes. - **license_text** (String) - The text of the license agreement. - **load** (Function) - Loads setup data from a stream. - **LocaleLanguage** (Enum Value) - Represents a locale language. - **log_mode** (Enum Name) - The logging mode. - **LowestPrivileges** (Enum Value) - Represents the lowest privilege level. - **message_count** (Integer) - The number of messages. - **ModernStyle** (Enum Value) - Represents the modern style. - **NewLog** (Enum Value) - Represents a new log file. - **No** (Enum Value) - Represents a 'No' option. - **NoLanguageDetection** (Enum Value) - Represents disabling language detection. - **NoPrivileges** (Enum Value) - Represents no specific privileges required. - **NormalInstallMode** (Enum Value) - Represents the normal installation mode. - **options** (String) - General options string. - **OverwriteLog** (Enum Value) - Represents overwriting the log file. - **password** (String) - The password for protected sections. - **password_salt** (String) - Salt used for password hashing. - **permission_count** (Integer) - The number of permissions. - **PowerUserPrivileges** (Enum Value) - Represents power user privileges. - **privilege_level** (Enum Name) - The required privilege level. - **privileges_required** (String) - Specifies the required privileges. - **privileges_required_override_allowed** (Boolean) - Whether privilege overrides are allowed. - **registry_entry_count** (Integer) - The number of registry entries. - **run_entry_count** (Integer) - The number of run entries. - **setup_mutex** (String) - The name of the setup mutex. - **show_language_dialog** (Boolean) - Whether to show the language dialog. - **signed_uninstaller_header_checksum** (String) - Checksum of the signed uninstaller header. - **signed_uninstaller_original_size** (Integer) - Original size of the signed uninstaller. - **SilentInstallMode** (Enum Value) - Represents the silent installation mode. - **slices_per_disk** (Integer) - Number of slices per disk. - **small_image_back_color** (Color) - The small background color for images. - **style** (Enum Name) - The style of the wizard or components. - **task_count** (Integer) - The number of tasks. - **type_count** (Integer) - The number of types. - **UILanguage** (Enum Value) - Represents the UI language. - **uninstall_delete_entry_count** (Integer) - Number of entries to delete during uninstallation. - **uninstall_display_size** (Integer) - The displayed size of the uninstallation. - **uninstall_files_dir** (String) - The directory for uninstallation files. - **uninstall_icon** (String) - The icon for the uninstaller. - **uninstall_icon_name** (String) - The name of the uninstaller icon. - **uninstall_log_mode** (Enum Name) - The log mode for uninstallation. - **uninstall_name** (String) - The name of the uninstaller. - **uninstall_run_entry_count** (Integer) - Number of run entries for uninstallation. - **uninstall_style** (Enum Name) - The style of the uninstaller. - **uninstallable** (Boolean) - Whether the application is uninstallable. - **uninstaller_signature** (String) - The signature of the uninstaller. - **VerySilentInstallMode** (Enum Value) - Represents the very silent installation mode. - **winver** (String) - Windows version information. - **wizard_resize_percent_x** (Integer) - Wizard resize percentage horizontally. - **wizard_resize_percent_y** (Integer) - Wizard resize percentage vertically. - **wizard_style** (Enum Name) - The style of the wizard. - **Yes** (Enum Value) - Represents a 'Yes' option. ``` -------------------------------- ### setup::info Source: https://constexpr.org/innoextract/doc/delete_8hpp_source.html Structure to hold and load setup headers. ```APIDOC ## struct setup::info ### Description Class used to hold and load the various setup headers. It is used in conjunction with loading other setup structures like `delete_entry`. ### Fields (Specific fields are not detailed in the provided text, but it's used for loading context.) ### Methods (Methods are not detailed in the provided text, but it's used for loading context.) ### Example ```cpp // Assuming 'is' is an input stream setup::info info_obj; // ... potentially load info_obj from 'is' if applicable ... setup::delete_entry delete_data; delete_data.load(is, info_obj); ``` ``` -------------------------------- ### setup::registry_entry Class Source: https://constexpr.org/innoextract/doc/structsetup_1_1registry__entry.html Detailed documentation for the setup::registry_entry class. ```APIDOC ## Class setup::registry_entry ### Description Represents an entry in the system registry. ### Definition `#include "setup/registry.hpp"` ## Public Types ### enum hive_name Enumerates the possible registry hives. - **HKCR**: HKEY_CLASSES_ROOT - **HKCU**: HKEY_CURRENT_USER - **HKLM**: HKEY_LOCAL_MACHINE - **HKU**: HKEY_USERS - **HKPD**: HKEY_PERFORMANCE_DATA - **HKCC**: HKEY_CURRENT_CONFIG - **HKDD**: HKEY_DYN_DATA - **Unset**: Unset hive ### enum value_type Specifies the type of the registry value. - **None**: No type specified - **String**: REG_SZ - **ExpandString**: REG_EXPAND_SZ - **DWord**: REG_DWORD - **Binary**: REG_BINARY - **MultiString**: REG_MULTI_SZ - **QWord**: REG_QWORD ## Public Member Functions ### void load (std::istream &is, const info &i) Loads registry entry data from an input stream. ### FLAGS (flags, CreateValueIfDoesntExist, UninsDeleteValue, UninsClearValue, UninsDeleteEntireKey, UninsDeleteEntireKeyIfEmpty, PreserveStringType, DeleteKey, DeleteValue, NoError, DontCreateKey, Bits32, Bits64) Represents flags for registry operations. ## Public Attributes ### std::string key The registry key path. ### std::string name The name of the registry value. ### std::string value The data of the registry value. ### std::string permissions Permissions associated with the registry entry. ### hive_name hive The hive where the registry entry is located. ### int permission Index into the permission entry list. ### value_type type The type of the registry value. ### flags options Flags associated with the registry entry options. ### setup::item Inherited item information. ### std::string components Components associated with the registry entry. ### std::string tasks Tasks associated with the registry entry. ### std::string languages Languages associated with the registry entry. ### std::string check Check condition for the registry entry. ### std::string after_install Action to perform after installation. ### std::string before_install Action to perform before installation. ### windows_version_range winver The Windows version range for this entry. ## Additional Inherited Members ### setup::item Provides base item functionality. ### void load_condition_data (std::istream &is, const info &i) Loads condition data from an input stream. ### void load_version_data (std::istream &is, const version &version) Loads version data from an input stream. ``` -------------------------------- ### setup::run_entry Structure Source: https://constexpr.org/innoextract/doc/run_8hpp_source.html Details the structure of a run entry, which defines how an application or file should be executed during the installation process. ```APIDOC ## setup::run_entry Structure ### Description Represents a run entry in an Inno Setup script, specifying details for executing an application or file during installation. ### Fields #### Flags (`flags`) An enumeration of flags that modify the behavior of the run entry. Available flags include: - `ShellExec`: Execute using the shell. - `SkipIfDoesntExist`: Skip if the file does not exist. - `PostInstall`: Run after installation. - `Unchecked`: Run unchecked. - `SkipIfSilent`: Skip if the installation is silent. - `SkipIfNotSilent`: Skip if the installation is not silent. - `HideWizard`: Hide the wizard during execution. - `Bits32`: Run as a 32-bit application. - `Bits64`: Run as a 64-bit application. - `RunAsOriginalUser`: Run as the original user. #### Wait Condition (`wait`) Specifies the condition under which the installer should wait for the executed process to complete. - `WaitUntilTerminated`: Wait until the process terminates. - `NoWait`: Do not wait for the process to complete. - `WaitUntilIdle`: Wait until the process is idle. #### String Properties - **`name`** (std::string) - The name of the executable or command to run. - **`parameters`** (std::string) - Command-line parameters for the executable. - **`working_dir`** (std::string) - The working directory for the executed process. - **`run_once_id`** (std::string) - A unique identifier to ensure the entry runs only once. - **`status_message`** (std::string) - A message to display while the process is running. - **`verb`** (std::string) - The verb to use when executing the command (e.g., 'open', 'edit'). - **`description`** (std::string) - A description of the action being performed. #### Integer Properties - **`show_command`** (int) - Controls how the command window is shown (e.g., normal, minimized, maximized). ### Methods - **`load(std::istream & is, const info & i)`**: Loads the run entry data from an input stream. ### Example Usage ```cpp #include "setup/run.hpp" // Assuming 'runEntry' is an instance of setup::run_entry // Accessing fields: std::string commandName = runEntry.name; std::string commandParams = runEntry.parameters; setup::run_entry::flags executionOptions = runEntry.options; setup::run_entry::wait_condition waitMode = runEntry.wait; // Setting flags: runEntry.options.add(setup::run_entry::flags::PostInstall); // Checking flags: if (runEntry.options.has(setup::run_entry::flags::SkipIfDoesntExist)) { // Handle skipping } ``` ``` -------------------------------- ### setup::header Structure Source: https://constexpr.org/innoextract/doc/header_8hpp Defines the main setup header structure used for Inno Setup files. ```APIDOC ## setup::header ### Description Represents the main setup header structure found in Inno Setup files. ### Definition Defined in file `header.hpp` within the `setup` namespace. ### Typedefs - **setup::salt** (char[8]) - A fixed-size array of 8 characters used for salt values. ``` -------------------------------- ### Namespace: setup Source: https://constexpr.org/innoextract/doc/filename_8cpp Details about the 'setup' namespace, including its members. ```APIDOC ## Namespace: setup ### Description This namespace contains various elements related to the setup of the project. ### Members #### All - a, b, c, d, e, f, g, i, k, l, m, n, o, p, r, s, t, u, v, w, y, z #### Functions - a, b, c, d, e, f, g, i, l, m, o, p, r, s, t, u, w #### Variables - (No specific variables listed in this section) #### Typedefs - (No specific typedefs listed in this section) #### Enumerations - (No specific enumerations listed in this section) #### Enumerator - a, b, c, d, e, i, l, m, n, p, s, u, z ``` -------------------------------- ### Class: setup::header Source: https://constexpr.org/innoextract/doc/structsetup_1_1header Documentation for the 'header' class within the 'setup' namespace. ```APIDOC ## Class setup::header ### Description This class appears to be a header file or a class related to setup headers. ### Include `#include "setup/header.hpp"` ### Public Types #### Enum: style - **ClassicStyle** - **ModernStyle** #### Enum: alpha_format - **AlphaIgnored** - **AlphaDefined** - **AlphaPremultiplied** #### Enum: install_verbosity - **NormalInstallMode** - **SilentInstallMode** - **VerySilentInstallMode** #### Enum: log_mode - **AppendLog** - **NewLog** - **OverwriteLog** #### Enum: auto_bool - **Auto** - **No** - **Yes** #### Enum: privilege_level - **NoPrivileges** - **PowerUserPrivileges** - **AdminPriviliges** - **LowestPrivileges** #### Enum: language_detection_method - **UILanguage** - **LocaleLanguage** - **NoLanguageDetection** #### Typedef: Color - **boost::uint32_t** ``` -------------------------------- ### Version-Specific Setup Configuration Source: https://constexpr.org/innoextract/doc/header_8cpp_source.html Handles conditional logic for setup options based on the Inno Setup version. ```cpp 658 flagreader.add(ForceCloseApplications); 659 } 660 if(version >= INNO_VERSION(6, 0, 0)) { 661 flagreader.add(AppNameHasConsts); 662 flagreader.add(UsePreviousPrivileges); 663 flagreader.add(WizardResizable); 664 } 665 666 options |= flagreader; 667 668 if(version < INNO_VERSION(3, 0, 4)) { 669 privileges_required = (options & AdminPrivilegesRequired) ? AdminPriviliges : NoPrivileges; 670 } 671 672 if(version < INNO_VERSION(4, 0, 10)) { 673 show_language_dialog = (options & ShowLanguageDialog) ? Yes : No; 674 language_detection = (options & DetectLanguageUsingLocale) ? LocaleLanguage : UILanguage; 675 } 676 677 if(version < INNO_VERSION(4, 1, 5)) { 678 compression = (options & BzipUsed) ? stream::BZip2 : stream::Zlib; 679 } 680 681 if(version < INNO_VERSION(5, 3, 3)) { 682 disable_dir_page = (options & DisableDirPage) ? Yes : No; 683 disable_program_group_page = (options & DisableProgramGroupPage) ? Yes : No; 684 } 685 686 if(version < INNO_VERSION(1, 3, 0)) { 687 if(license_size > 0) { 688 license_text.resize(size_t(license_size)); 689 is.read(&license_text[0], license_size); 690 util::to_utf8(license_text); 691 } 692 if(info_before_size > 0) { 693 info_before.resize(size_t(info_before_size)); 694 is.read(&info_before[0], info_before_size); 695 util::to_utf8(info_before); 696 } 697 if(info_after_size > 0) { 698 info_after.resize(size_t(info_after_size)); 699 is.read(&info_after[0], info_after_size); 700 util::to_utf8(info_after); 701 } 702 } 703 704 } ``` -------------------------------- ### Class: setup Source: https://constexpr.org/innoextract/doc/filename_8cpp Details about the 'setup' class, including its members. ```APIDOC ## Class: setup ### Description This class is a core component of the project, likely involved in system setup or configuration. ### Members #### All - a, b, c, d, e, f, g, h, i, k, l, m, n, o, p, q, r, s, t, u, v, w, y, ~ #### Functions - a, b, c, d, e, f, g, h, i, l, n, o, p, q, r, s, t, u, v, w, ~ #### Variables - a, b, c, d, e, f, g, h, i, k, l, m, n, o, p, q, r, s, t, u, v, w #### Typedefs - b, c, e, f, h, i, m, p, t #### Enumerations - (No specific enumerations listed in this section) #### Enumerator - a, b, c, d, e, f, h, i, l, m, n, o, p, q, r, s, t, u, v, w, y #### Related Functions - (No specific related functions listed in this section) ``` -------------------------------- ### Variable: setup::version Source: https://constexpr.org/innoextract/doc/setup_2windows_8cpp Documentation for the 'version' variable within the 'setup' namespace. ```APIDOC ## Variable: setup::version ### Description Represents the version data. ### Type windows_version::data ### Definition File: `windows.cpp`, Line: 74 ``` -------------------------------- ### Process Inno Setup File Metadata Source: https://constexpr.org/innoextract/doc/data_8cpp_source.html Handles file size, checksum verification based on installer version, and timestamp parsing for different bit-depths. ```cpp 60 file.size = util::load(is); 61 chunk.size = util::load(is); 62 } 63 uncompressed_size = file.size; 64 65 if(i.version >= INNO_VERSION(5, 3, 9)) { 66 is.read(file.checksum.sha1, std::streamsize(sizeof(file.checksum.sha1))); 67 file.checksum.type = crypto::SHA1; 68 } else if(i.version >= INNO_VERSION(4, 2, 0)) { 69 is.read(file.checksum.md5, std::streamsize(sizeof(file.checksum.md5))); 70 file.checksum.type = crypto::MD5; 71 } else if(i.version >= INNO_VERSION(4, 0, 1)) { 72 file.checksum.crc32 = util::load(is); 73 file.checksum.type = crypto::CRC32; 74 } else { 75 file.checksum.adler32 = util::load(is); 76 file.checksum.type = crypto::Adler32; 77 } 78 79 if(i.version.bits() == 16) { 80 81 // 16-bit installers use the FAT filetime format 82 83 boost::uint16_t time = util::load(is); 84 boost::uint16_t date = util::load(is); 85 86 struct tm t; 87 std::memset(&t, 0, sizeof(t)); 88 t.tm_sec = util::get_bits(time, 0, 4) * 2; // [0, 58] 89 t.tm_min = util::get_bits(time, 5, 10); // [0, 59] 90 t.tm_hour = util::get_bits(time, 11, 15); // [0, 23] 91 t.tm_mday = util::get_bits(date, 0, 4); // [1, 31] 92 t.tm_mon = util::get_bits(date, 5, 8) - 1; // [0, 11] 93 t.tm_year = util::get_bits(date, 9, 15) + 1980 - 1900; // [80, 199] 94 95 timestamp = util::parse_time(t); 96 timestamp_nsec = 0; 97 98 } else { 99 100 // 32-bit installers use the Win32 FILETIME format 101 102 boost::int64_t filetime = util::load(is); 103 104 static const boost::int64_t FiletimeOffset = 0x19DB1DED53E8000ll; 105 if(filetime < FiletimeOffset) { 106 log_warning << "Unexpected filetime: " << filetime; 107 } 108 filetime -= FiletimeOffset; 109 110 timestamp = filetime / 10000000; 111 timestamp_nsec = boost::uint32_t(filetime % 10000000) * 100; 112 113 } ``` -------------------------------- ### Setup Info Class Source: https://constexpr.org/innoextract/doc/run_8hpp_source.html Details about the setup::info class. ```APIDOC ## setup::info Class ### Description Class used to hold and load the various setup headers. ### Definition Defined in `run.hpp:64`. ``` -------------------------------- ### Namespace setup Source: https://constexpr.org/innoextract/doc/setup_2windows_8hpp_source.html Details about the 'setup' namespace within the constexpr_innoextract project. ```APIDOC ## Namespace setup ### Description This namespace contains structures and functions related to setting up and managing version information, particularly for Windows operating systems. ### Members #### Structs - **version**: Represents a version number. - **windows_version**: Represents Windows-specific version information, including OS version and service pack details. #### Functions - `setup::windows_version::data::load(std::istream & is, const version & version)`: Loads Windows version data from an input stream. - `setup::windows_version::load(std::istream & is, const version & version)`: Loads the complete Windows version information from an input stream. #### Operators - `setup::windows_version::data::operator==(const data & o) const` - `setup::windows_version::data::operator!=(const data & o) const` - `setup::windows_version::service_pack::operator==(const service_pack & o) const` - `setup::windows_version::service_pack::operator!=(const service_pack & o) const` - `setup::windows_version::operator==(const windows_version & o) const` ``` -------------------------------- ### setup::task_entry Structure Source: https://constexpr.org/innoextract/doc/task_8hpp_source.html Details the fields and definitions for the setup::task_entry structure. ```APIDOC ## setup::task_entry ### Description Represents a task entry in Inno Setup, containing various properties related to the task's configuration and behavior. ### Definition task.hpp:40 ### Fields - **name** (std::string) - The name of the task. (Definition: task.hpp:52) - **description** (std::string) - A description of the task. (Definition: task.hpp:53) - **group_description** (std::string) - The description of the group the task belongs to. (Definition: task.hpp:54) - **components** (std::string) - Information about the components associated with the task. (Definition: task.hpp:55) - **languages** (std::string) - Supported languages for the task. (Definition: task.hpp:56) - **check** (std::string) - A string representing the check condition for the task. (Definition: task.hpp:57) - **winver** (windows_version_range) - The Windows version range for the task. (Definition: task.hpp:62) - **options** (flags) - Options for the task, using a typesafe flags system. (Definition: task.hpp:64) ### Associated Utilities - **setup::task_entry::load**: Function to load task entry data from a stream. (Definition: task.cpp:32) - **setup::windows_version_range**: Structure for Windows version numbers. (Definition: windows.hpp:91) - **flags**: A typesafe way to define flags as a combination of enum values. (Definition: flags.hpp:45) - **NAMED_FLAGS**: Macro for defining named flags. (Definition: enum.hpp:66) ``` -------------------------------- ### Setup Info Member Functions Source: https://constexpr.org/innoextract/doc/structsetup_1_1info Documentation for the member functions of the setup::info class. ```APIDOC ## Member Function Documentation ### Function: setup::info::FLAGS() ```cpp setup::info::FLAGS(entry_types, Components, DataEntries, DeleteEntries, UninstallDeleteEntries, Directories, Files, Icons, IniEntries, Languages, Messages, Permissions, RegistryEntries, RunEntries, UninstallRunEntries, Tasks, Types, WizardImages, DecompressorDll, DecryptDll, NoSkip, NoUnknownVersion); ``` ### Function: setup::info::load() ```cpp void setup::info::load(std::istream & _is_, entry_types _entries_, util::codepage_id _force_codepage_ = 0); ``` #### Description Load setup headers. #### Parameters * **_is_** (std::istream) - The input stream to load the setup headers from. It must already be positioned at start of setup::version identifier whose position is given by loader::offsets::header_offset. * **_entries_** (entry_types) - What kinds of entries to load. * **_force_codepage_** (util::codepage_id) - Windows codepage to use for strings in ANSI installers. Definition at line 216 of file info.cpp. ``` -------------------------------- ### Namespace: setup Source: https://constexpr.org/innoextract/doc/setup_2file_8hpp_source.html Details about the 'setup' namespace and its members, including file entries and their flags. ```APIDOC ## Namespace: setup ### Description This namespace contains structures and definitions related to the setup process, including file handling. ### Endpoint N/A (Namespace definition) ### Parameters N/A ### Request Body N/A ### Response N/A ## Struct: setup::file_entry ### Description Represents a file entry within the setup process, inheriting from the base 'item' structure and defining various flags. ### Method N/A (Struct definition) ### Endpoint N/A (Struct definition) ### Parameters N/A ### Request Body N/A ### Response N/A ## Flags: setup::file_entry::flags ### Description Defines a set of flags that can be applied to a file entry, controlling its behavior during installation or uninstallation. ### Flags List - ConfirmOverwrite - NeverUninstall - RestartReplace - DeleteAfterInstall - RegisterServer - RegisterTypeLib - SharedFile - CompareTimeStamp - FontIsNotTrueType - SkipIfSourceDoesntExist - OverwriteReadOnly - OverwriteSameVersion - CustomDestName - OnlyIfDestFileExists - NoRegError - UninsRestartDelete - OnlyIfDoesntExist - IgnoreVersion - PromptIfOlder - DontCopy - UninsRemoveReadOnly - RecurseSubDirsExternal - ReplaceSameVersionIfContentsDiffer - DontVerifyChecksum - UninsNoSharedFilePrompt - CreateAllSubDirs - Bits32 - Bits64 - ExternalSizePreset - SetNtfsCompression - UnsetNtfsCompression - GacInstall - IsReadmeFile (obsolete) ``` -------------------------------- ### Class: setup::info Source: https://constexpr.org/innoextract/doc/structsetup_1_1info-members.html Detailed information about the 'setup::info' class and its members. ```APIDOC ## Class setup::info ### Description The 'info' class within the 'setup' namespace provides comprehensive details and management capabilities for various setup-related entries. ### Members - **codepage**: Represents the codepage associated with the info. - **components**: Manages components. - **data_entries**: Manages data entries. - **decompressor_dll**: Handles decompressor DLLs. - **decrypt_dll**: Handles decryption DLLs. - **delete_entries**: Manages entries to be deleted. - **directories**: Manages directories. - **files**: Manages files. - **FLAGS**: Enumeration for various entry types and flags, including Components, DataEntries, DeleteEntries, UninstallDeleteEntries, Directories, Files, Icons, IniEntries, Languages, Messages, Permissions, RegistryEntries, RunEntries, UninstallRunEntries, Tasks, Types, WizardImages, DecompressorDll, DecryptDll, NoSkip, NoUnknownVersion. - **header**: Represents the header information. - **icons**: Manages icons. - **info()**: Constructor for the info class. - **ini_entries**: Manages INI entries. - **languages**: Manages languages. - **load(std::istream &is, entry_types entries, util::codepage_id force_codepage=0)**: Loads setup information from an input stream. - **messages**: Manages messages. - **permissions**: Manages permissions. - **registry_entries**: Manages registry entries. - **run_entries**: Manages run entries. - **tasks**: Manages tasks. - **types**: Manages types. - **uninstall_delete_entries**: Manages entries to be deleted during uninstallation. - **uninstall_run_entries**: Manages run entries during uninstallation. - **version**: Represents the version information. - **wizard_images**: Manages wizard images. - **wizard_images_small**: Manages small wizard images. - **~info()**: Destructor for the info class. ``` -------------------------------- ### Setup Info Constructor and Destructor Source: https://constexpr.org/innoextract/doc/structsetup_1_1info Documentation for the constructor and destructor of the setup::info class. ```APIDOC ## Constructor & Destructor Documentation ### Constructor: setup::info::info() ```cpp setup::info::info(); ``` Definition at line 297 of file info.cpp. ### Destructor: setup::info::~info() ```cpp setup::info::~info(); ``` Definition at line 298 of file info.cpp. ``` -------------------------------- ### Get Cppcheck Version Source: https://constexpr.org/innoextract/buildlogs/commits/264c2fe6b84f90f6290c670e5f676660ec7b2387/cppcheck-options.txt Use this command to check the installed version of Cppcheck. No setup is required. ```bash cppcheck --version ``` -------------------------------- ### Declare setup::info loading methods Source: https://constexpr.org/innoextract/doc/info_8hpp_source.html Methods for loading setup data from an input stream. ```cpp 133 void load(std::istream & is, entry_types entries, util::codepage_id force_codepage = 0); 134 135 private: 136 150 void try_load(std::istream & is, entry_types entries, util::codepage_id force_codepage); 151 152 template 153 void load_entries(std::istream & is, entry_types entries, size_t count, 154 std::vector & result, entry_types::enum_type entry_type); ``` -------------------------------- ### Try Load Setup Headers Source: https://constexpr.org/innoextract/doc/info_8cpp_source.html Main entry point for loading setup headers and associated data entries. ```cpp void info::try_load(std::istream & is, entry_types entries, util::codepage_id force_codepage) { debug("trying to load setup headers for version " << version); if((entries & (Messages | NoSkip)) || (!version.is_unicode() && !force_codepage)) { entries |= Languages; } stream::block_reader::pointer reader = stream::block_reader::get(is, version); header.load(*reader, version); load_entries(*reader, entries, header.language_count, languages, Languages); if(version.is_unicode()) { // Unicode installers are always UTF16-LE, do not allow users to override that. codepage = util::cp_utf16le; } else if(force_codepage) { codepage = force_codepage; } else if(languages.empty()) { codepage = util::cp_windows1252; } else { // Non-Unicode installers do not have a defined codepage but instead just assume the // codepage of the system the installer is run on. // Look at the list of available languages to guess a suitable codepage. codepage = languages[0].codepage; BOOST_FOREACH(const language_entry & language, languages) { if(language.codepage == util::cp_windows1252) { codepage = util::cp_windows1252; break; } } } header.decode(codepage); BOOST_FOREACH(language_entry & language, languages) { language.decode(codepage); } if(version < INNO_VERSION(4, 0, 0)) { load_wizard_and_decompressor(*reader, version, header, *this, entries); } load_entries(*reader, entries, header.message_count, messages, Messages); load_entries(*reader, entries, header.permission_count, permissions, Permissions); load_entries(*reader, entries, header.type_count, types, Types); load_entries(*reader, entries, header.component_count, components, Components); load_entries(*reader, entries, header.task_count, tasks, Tasks); load_entries(*reader, entries, header.directory_count, directories, Directories); load_entries(*reader, entries, header.file_count, files, Files); load_entries(*reader, entries, header.icon_count, icons, Icons); load_entries(*reader, entries, header.ini_entry_count, ini_entries, IniEntries); load_entries(*reader, entries, header.registry_entry_count, registry_entries, RegistryEntries); load_entries(*reader, entries, header.delete_entry_count, delete_entries, DeleteEntries); load_entries(*reader, entries, header.uninstall_delete_entry_count, uninstall_delete_entries, UninstallDeleteEntries); load_entries(*reader, entries, header.run_entry_count, run_entries, RunEntries); load_entries(*reader, entries, header.uninstall_run_entry_count, uninstall_run_entries, UninstallRunEntries); if(version >= INNO_VERSION(4, 0, 0)) { ``` -------------------------------- ### File: setup/file.cpp Source: https://constexpr.org/innoextract/doc/setup_2file_8cpp Includes and dependencies for the setup/file.cpp file. ```APIDOC ## File: setup/file.cpp ### Description This file contains definitions related to file operations, including the `file_copy_mode` enumeration and the `NAMES` function. ### Included Headers - `"setup/file.hpp" - `"setup/info.hpp" - `"setup/version.hpp" - `"util/load.hpp" - `"util/log.hpp" - `"util/storedenum.hpp" ### Dependencies - **Namespaces**: `setup` - **Enumerations**: `setup::@40::file_copy_mode` - **Functions**: `NAMES()` ``` -------------------------------- ### Setup Info Class Source: https://constexpr.org/innoextract/doc/extract_8cpp_source.html A central class to hold and load various setup headers. It aggregates information about the Inno Setup installer structure. ```cpp setup::info ``` -------------------------------- ### Install innoextract on NetBSD Source: https://constexpr.org/innoextract/install Install using the pkg_add command. ```bash # pkg_add innoextract ```