innoextract
repository·master·Indexed 23 days ago
https://github.com/dscharrer/innoextractA specialized tool for extracting files from Inno Setup installers on non-Windows platforms without requiring Wine. It supports Inno Setup versions 1.2.10 through 6.3.3, as well as modified variants such as GOG.com game installers, Wadjet Eye Games installers, and Arx Fatalis patches. The tool allows users to extract files, list contents, verify integrity via checksums, and inspect installer metadata including supported languages and GOG.com game IDs.
What's inside innoextract
- innoextract is a tool designed to unpack installers created by Inno Setup on non-Windows systems without requiring Wine. It supports Inno Setup versions 1.2.10 through 6.3.3, as well as several modified variants like Martijn Laan's My Inno Setup Extensions and GOG.com game installers. It is also capable of unpacking Wadjet Eye Games installers and Arx Fatalis patches.
Limitations of innoextract
masterWhen using innoextract, be aware of the following constraints:
- No component selection: There is no support for extracting individual components or filtering by name.
- No script execution: Included installer scripts and checks are not executed.
- Hard-coded mappings: The mapping from Inno Setup variables (like the application directory) to subdirectories is hard-coded.
- Multi-file naming: For multi-file installers, data slice/disk files must follow the standard Inno Setup naming scheme.
Install innoextract from source
masterTo compile and install innoextract, you need CMake 2.8, a C++ compiler, and development headers for Boost and liblzma.
Follow these steps to build the project:
- Create a build directory and enter it.
- Run CMake to generate build files.
- Run make to compile.
To install the binaries system-wide, run
make installas root.CMake build options for innoextract
masterWhen running
cmake, you can pass-D<option>=<value>to customize the build.Key options include:
DEVELOPER: Set to1to enable debug output, fast incremental builds, and unit tests. This is recommended if you are modifying the source code.USE_LZMA: Controls whetherliblzmais used (defaultON).WITH_CONV: Sets the charset conversion library. Valid values:iconv,win32, orbuiltin(supports only Windows-1252 and UTF-16LE).CMAKE_BUILD_TYPE: Set toDebugfor debug output.USE_STATIC_LIBS: Enables static linking for all libraries.
Handle file collisions during extraction
masterWhen extracting files, you can specify how
innoextractshould behave if multiple files attempt to write to the same path. This is controlled via theCollisionActionenum assigned to thecollisionsmember ofextract_options.Available actions:
OverwriteCollisions(Default)RenameCollisionsRenameAllCollisionsErrorOnCollisions
enum CollisionAction { OverwriteCollisions, RenameCollisions, RenameAllCollisions, ErrorOnCollisions };Extract or test files from an Inno Setup installer
masterThe
extractoperation ininnoextractallows you to either unpack the contents of an installer to a directory or perform an integrity test on the files.When extracting, the tool handles:
- Multi-part files: Reassembling files that are split across multiple entries.
- Checksum verification: If checksum information is available, the tool verifies the integrity of the extracted data. If the
--testflag is used and a checksum mismatch is detected, the process will throw an error. - Timestamp preservation: If the
--preserve-file-timesand--local-timestampsflags are used, the tool attempts to set the file timestamps to match the original installer data. - Output directory: Files are written to the directory specified by the output option.
If the tool is running in test mode (
o.test), a checksum mismatch or an unexpected output file size will trigger anIntegrity test failed!error.Use passwords for encrypted installers
masterIf an Inno Setup installer is encrypted, you must provide a password to extract the files. You can provide the password in two ways:
- Directly via CLI: Use the
--passwordor-Pflag. - From a file: Use the
--password-fileflag. If you use-as the filename, it will read from standard input.
Note: You cannot use both
--passwordand--password-fileat the same time.Example (from file):
innoextract --password-file my_password.txt setup.exeExample (from stdin):
echo "my_secret_password" | innoextract --password-file - setup.exe- Directly via CLI: Use the
Inspect Inno Setup installer information
masterYou can use
innoextractto inspect the metadata of an Inno Setup installer without extracting its contents. This allows you to view the setup version, supported languages, and file lists.Key capabilities include:
- Viewing the setup data version.
- Listing supported languages.
- Retrieving GOG.com game IDs.
- Inspecting password hashes and salts (if present).
- Listing files and directories contained within the installer.
Reference: CMake build options
masterThe following table lists the available CMake build options for innoextract. Set options by passing-D<option>=<value>to cmake.Reference: CMake install options
masterThe following options control the installation location of innoextract.
| Option | Default | Description | |:----------------------------|:---------:|:----------- | | `CMAKE_INSTALL_PREFIX` | `/usr/local` | Where to install innoextract. | | `CMAKE_INSTALL_BINDIR` | `bin` | Location for binaries (relative to prefix). | | `CMAKE_INSTALL_DATAROOTDIR` | `share` | Location for data files (relative to prefix). | | `CMAKE_INSTALL_MANDIR` | `${DATAROOTDIR}/man` | Location for man pages (relative to prefix). |Dependencies for innoextract
masterThe following dependencies are required or recommended:
- Boost (1.37 or newer): Requires headers and the following libraries:
iostreams,filesystem,date_time,system, andprogram_options. Note thatboost::iostreamsmust be built withzlibandbzip2support. - liblzma (from xz-utils): Highly recommended. While you can build with
-DUSE_LZMA=OFF, you will likely be unable to extract installers from newer Inno Setup versions without it. - iconv: Optional. Can be part of the system libc (glibc/uClibc) or a separate
libiconvlibrary. Used for charset conversion.
- Boost (1.37 or newer): Requires headers and the following libraries:
Run innoextract to unpack installers
masterTo extract an Inno Setup installer to the current directory, use the following command:
innoextract <file>To see all available command-line options, run:
innoextract --helpDetailed documentation is also available via the manual page:
man 1 innoextract$ innoextract <file> $ innoextract --help $ man 1 innoextract