pax_global_header00006660000000000000000000000064152411415410014510gustar00rootroot0000000000000052 comment=21e1fd97083baf2c1ce41afb547ae6d273f4fcfb crazy-max-innoextract-21e1fd9/000077500000000000000000000000001524114154100163745ustar00rootroot00000000000000crazy-max-innoextract-21e1fd9/.github/000077500000000000000000000000001524114154100177345ustar00rootroot00000000000000crazy-max-innoextract-21e1fd9/.github/workflows/000077500000000000000000000000001524114154100217715ustar00rootroot00000000000000crazy-max-innoextract-21e1fd9/.github/workflows/ci.yml000066400000000000000000000532731524114154100231210ustar00rootroot00000000000000name: ci concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: contents: read on: workflow_dispatch: push: branches: - 'dev' - 'master' tags: - 'v*' pull_request: jobs: build-linux: runs-on: ${{ matrix.runner }} timeout-minutes: 10 strategy: fail-fast: false matrix: include: - arch: amd64 runner: ubuntu-24.04 artifact: innoextract-linux-amd64 check_style: true - arch: arm64 runner: ubuntu-24.04-arm artifact: innoextract-linux-arm64 check_style: false steps: - name: Checkout uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 0 - name: Update run: sudo apt-get update - name: Dependencies run: sudo apt-get install build-essential cmake libboost-all-dev libbz2-dev libicu-dev liblz4-dev liblzma-dev libzstd-dev zlib1g-dev - name: Configure run: cmake --version && cmake -B ${{ github.workspace }}/build -Werror=author -Werror=deprecated -DCONTINUOUS_INTEGRATION=1 -DRUN_TESTS=OFF -DUSE_STATIC_LIBS=ON - name: Build run: cmake --build ${{ github.workspace }}/build - name: Test run: ctest --test-dir ${{ github.workspace }}/build --output-on-failure --timeout 120 - name: Check Style if: matrix.check_style run: cmake --build ${{ github.workspace }}/build --target style - name: Install run: cmake --install ${{ github.workspace }}/build --prefix ${{ github.workspace }}/dist - name: Smoke test run: | "${{ github.workspace }}/dist/bin/innoextract" -h - name: Prepare release binary id: asset run: | name="${{ matrix.artifact }}" mkdir -p release cp "${{ github.workspace }}/dist/bin/innoextract" "release/${name}" echo "name=${name}" >> "${GITHUB_OUTPUT}" - name: Upload artifact uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ steps.asset.outputs.name }} path: release/${{ steps.asset.outputs.name }} if-no-files-found: error build-macos: runs-on: ${{ matrix.runner }} timeout-minutes: 10 strategy: fail-fast: false matrix: include: - arch: arm64 runner: macos-15 artifact: innoextract-darwin-arm64 cxx_flags: "" - arch: amd64 runner: macos-15-intel artifact: innoextract-darwin-amd64 cxx_flags: "-isystem /usr/local/include" steps: - name: Checkout uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 0 - name: Dependencies env: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 run: brew install boost bzip2 icu4c@78 libiconv lz4 xz zlib zstd - name: Configure env: CXXFLAGS: ${{ matrix.cxx_flags }} run: | cmake --version brew_deps=(boost bzip2 icu4c@78 libiconv lz4 xz zlib zstd) prefixes=() link_paths=() for dep in "${brew_deps[@]}"; do prefix="$(brew --prefix "${dep}")" prefixes+=("${prefix}") link_paths+=("-L${prefix}/lib") done prefix_path="$(IFS=';'; echo "${prefixes[*]}")" link_flags="${link_paths[*]}" bzip2_prefix="$(brew --prefix bzip2)" iconv_prefix="$(brew --prefix libiconv)" xz_prefix="$(brew --prefix xz)" zlib_prefix="$(brew --prefix zlib)" cmake -B ${{ github.workspace }}/build \ -Werror=author \ -Werror=deprecated \ -DCMAKE_POLICY_DEFAULT_CMP0167=OLD \ -DBoost_NO_BOOST_CMAKE=ON \ -DCONTINUOUS_INTEGRATION=1 \ -DRUN_TESTS=OFF \ -DUSE_STATIC_LIBS=ON \ -DCMAKE_PREFIX_PATH="${prefix_path}" \ -DCMAKE_EXE_LINKER_FLAGS="${link_flags}" \ -DBZIP2_LIBRARY="${bzip2_prefix}/lib/libbz2.a" \ -DBZIP2_LIBRARY_RELEASE="${bzip2_prefix}/lib/libbz2.a" \ -Diconv_INCLUDE_DIR="${iconv_prefix}/include" \ -Diconv_LIBRARY="${iconv_prefix}/lib/libiconv.a" \ -DLZMA_LIBRARY="${xz_prefix}/lib/liblzma.a" \ -DZLIB_LIBRARY="${zlib_prefix}/lib/libz.a" \ -DZLIB_LIBRARY_RELEASE="${zlib_prefix}/lib/libz.a" - name: Build run: cmake --build ${{ github.workspace }}/build - name: Test run: ctest --test-dir ${{ github.workspace }}/build --output-on-failure --timeout 120 - name: Install run: cmake --install ${{ github.workspace }}/build --prefix ${{ github.workspace }}/dist - name: Smoke test run: | "${{ github.workspace }}/dist/bin/innoextract" -h - name: Prepare release binary id: asset run: | name="${{ matrix.artifact }}" mkdir -p release cp "${{ github.workspace }}/dist/bin/innoextract" "release/${name}" echo "name=${name}" >> "${GITHUB_OUTPUT}" - name: Upload artifact uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ steps.asset.outputs.name }} path: release/${{ steps.asset.outputs.name }} if-no-files-found: error build-windows: runs-on: windows-2025 timeout-minutes: 10 defaults: run: shell: msys2 {0} steps: - name: Checkout uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 0 - name: Dependencies uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.0 with: msystem: MINGW64 update: true install: >- git mingw-w64-x86_64-boost mingw-w64-x86_64-bzip2 mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc mingw-w64-x86_64-ninja mingw-w64-x86_64-xz mingw-w64-x86_64-zlib - name: Configure run: cmake --version && cmake -B "${GITHUB_WORKSPACE}/build" -G Ninja -Werror=author -Werror=deprecated -DCONTINUOUS_INTEGRATION=1 -DRUN_TESTS=OFF - name: Build run: cmake --build "${GITHUB_WORKSPACE}/build" - name: Test run: ctest --test-dir "${GITHUB_WORKSPACE}/build" --output-on-failure --timeout 120 - name: Install run: cmake --install "${GITHUB_WORKSPACE}/build" --prefix "${GITHUB_WORKSPACE}/dist" - name: Smoke test shell: pwsh run: | $env:PATH = "$env:SystemRoot\System32;$env:SystemRoot" & "${env:GITHUB_WORKSPACE}\dist\bin\innoextract.exe" -h - name: Prepare release binary id: asset run: | name="innoextract-windows-amd64.exe" mkdir -p release cp "${GITHUB_WORKSPACE}/dist/bin/innoextract.exe" "release/${name}" echo "name=${name}" >> "${GITHUB_OUTPUT}" - name: Upload artifact uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ steps.asset.outputs.name }} path: release/${{ steps.asset.outputs.name }} if-no-files-found: error build-installers: name: build-installers (${{ matrix.compiler }}) runs-on: windows-2025 timeout-minutes: 20 strategy: fail-fast: false matrix: include: - compiler: '6.0.5' asset: 'innosetup-6.0.5.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-6_0_5/innosetup-6.0.5.exe' sha256: 'ae6823b523df87e9441789e51845434e4e0e70aac0b88afe80f94f20f4b98acb' data_version: '6.0.0 (unicode)' - compiler: '6.1.2' asset: 'innosetup-6.1.2.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-6_1_2/innosetup-6.1.2.exe' sha256: 'a3ce1c40ef9c71a92691aaff0f413f530c8c9e3c766be481bc63ca7cc74e35e7' data_version: '6.1.0 (unicode)' - compiler: '6.3.3' asset: 'innosetup-6.3.3.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-6_3_3/innosetup-6.3.3.exe' sha256: '0bcb2a409dea17e305a27a6b09555cabe600e984f88570ab72575cd7e93c95e6' data_version: '6.3.0 (unicode)' - compiler: '6.4.0' asset: 'innosetup-6.4.0.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-6_4_0/innosetup-6.4.0.exe' sha256: 'a360db165cfb1d42d195b020700181e7eaf5db45c1249a24edb51c3c33e9d659' data_version: '6.4.0.1 (unicode)' - compiler: '6.4.2' asset: 'innosetup-6.4.2.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-6_4_2/innosetup-6.4.2.exe' sha256: '238e2cf82c212a3879a050e02d787283c54bcb72d5cb6070830942de56627d5b' data_version: '6.4.2 (unicode)' - compiler: '6.4.3' asset: 'innosetup-6.4.3.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-6_4_3/innosetup-6.4.3.exe' sha256: 'f3c42116542c4cc57263c5ba6c4feabfc49fe771f2f98a79d2f7628b8762723b' data_version: '6.4.3 (unicode)' - compiler: '6.5.0' asset: 'innosetup-6.5.0.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-6_5_0/innosetup-6.5.0.exe' sha256: '79b7a1063b3888bb8eceb44a8c28e90ccdaa22ac71f9272de1dac79b42941dbd' data_version: '6.5.0 (unicode)' - compiler: '6.5.1' asset: 'innosetup-6.5.1.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-6_5_1/innosetup-6.5.1.exe' sha256: '3622ffdad7b2534239370099149c33adb85b90054799d901cb8ec844df7a0e41' data_version: '6.5.0 (unicode)' - compiler: '6.5.2' asset: 'innosetup-6.5.2.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-6_5_2/innosetup-6.5.2.exe' sha256: '8582879760b6e0e42e00f2e28ce904afac0d739941a130d3da3573c3cbf2d75b' data_version: '6.5.2 (unicode)' - compiler: '6.5.3' asset: 'innosetup-6.5.3.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-6_5_3/innosetup-6.5.3.exe' sha256: '9345ee029faa0b7aed0818c3d5b227699ef9a496cce79e20c19eb9d6ef2e2c2d' data_version: '6.5.2 (unicode)' - compiler: '6.5.4' asset: 'innosetup-6.5.4.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-6_5_4/innosetup-6.5.4.exe' sha256: 'fa73bf47a4da250d185d07561c2bfda387e5e20db77e4570004cf6a133cc10b1' data_version: '6.5.2 (unicode)' - compiler: '6.6.0' asset: 'innosetup-6.6.0.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-6_6_0/innosetup-6.6.0.exe' sha256: 'fa39687070ba17cf1c6a179f8671af73375254b63e97948e6b9532fc46302cec' data_version: '6.6.0 (unicode)' - compiler: '6.6.1' asset: 'innosetup-6.6.1.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-6_6_1/innosetup-6.6.1.exe' sha256: 'd243ce440c02705530699554fb9612b9b2bd7a2a90629cdb7f41e66f5faeb91f' data_version: '6.6.1 (unicode)' - compiler: '6.7.0' asset: 'innosetup-6.7.0.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-6_7_0/innosetup-6.7.0.exe' sha256: 'f45c7d68d1e660cf13877ec36738a5179ce72a33414f9959d35e99b68c52a697' data_version: '6.7.0 (unicode)' - compiler: '6.7.1' asset: 'innosetup-6.7.1.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-6_7_1/innosetup-6.7.1.exe' sha256: '4d11e8050b6185e0d49bd9e8cc661a7a59f44959a621d31d11033124c4e8a7b0' data_version: '6.7.0 (unicode)' - compiler: '6.7.2' asset: 'innosetup-6.7.2.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-6_7_2/innosetup-6.7.2.exe' sha256: '9f27f8386e554eb093336a1ca5c2dcacb7dbf04ab020889491d7ac53c38a12ff' data_version: '6.7.0 (unicode)' - compiler: '6.7.3' asset: 'innosetup-6.7.3.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-6_7_3/innosetup-6.7.3.exe' sha256: '9c73c3bae7ed48d44112a0f48e66742c00090bdb5bef71d9d3c056c66e97b732' data_version: '6.7.0 (unicode)' - compiler: '7.0.0-preview-3' asset: 'innosetup-7.0.0-preview-3-x64.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-7_0_0_2/innosetup-7.0.0-preview-3-x64.exe' sha256: 'acbb8e1ff4eb72e29aef1d2b50029e645a433e461d833bb4eb40ed8cc31160a5' data_version: '7.0.0.1 (unicode)' - compiler: '7.0.0-beta' asset: 'innosetup-7.0.0-beta-x64.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-7_0_0/innosetup-7.0.0-beta-x64.exe' sha256: 'bc8e6f13af0f912b5384bbc7068df30cfe3a57bb5f0f5ab3eaa89675629ec797' data_version: '7.0.0.3 (unicode)' - compiler: '7.0.1-beta' asset: 'innosetup-7.0.1-beta-x64.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-7_0_1/innosetup-7.0.1-beta-x64.exe' sha256: 'a6033578da2c7b57ceaf9a97ebba56cb40bb71ed275170b49bbaf5eb1f4b5e16' data_version: '7.0.0.3 (unicode)' - compiler: '7.0.2' asset: 'innosetup-7.0.2-x64.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-7_0_2/innosetup-7.0.2-x64.exe' sha256: '5ad54ca3def786f8f4212552e54cc6d8d61329e2d24a1cfee0571d42c2684ff1' data_version: '7.0.0.3 (unicode)' - compiler: '7.1.0' asset: 'innosetup-7.1.0-x64.exe' url: 'https://github.com/jrsoftware/issrc/releases/download/is-7_1_0/innosetup-7.1.0-x64.exe' sha256: '0362a383ed217d4c4239b5933866dd96d3eb2102737da92f80f6057a4b40df2f' data_version: '7.0.0.3 (unicode)' steps: - name: Disable CRLF conversion shell: pwsh run: git config --global core.autocrlf false - name: Checkout uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Download and verify Inno Setup shell: pwsh run: | $ErrorActionPreference = 'Stop' $downloadDir = Join-Path $env:RUNNER_TEMP 'innosetup-download' New-Item -ItemType Directory -Force -Path $downloadDir | Out-Null $installer = Join-Path $downloadDir '${{ matrix.asset }}' $url = '${{ matrix.url }}' $expected = '${{ matrix.sha256 }}' $attempts = 5 for ($attempt = 1; $attempt -le $attempts; $attempt++) { if (Test-Path -LiteralPath $installer) { Remove-Item -LiteralPath $installer -Force } try { Write-Host "Downloading $url (attempt $attempt/$attempts)" Invoke-WebRequest -Uri $url -OutFile $installer -TimeoutSec 120 $actual = (Get-FileHash -Algorithm SHA256 -Path $installer).Hash.ToLowerInvariant() if ($actual -ne $expected) { throw "SHA-256 mismatch for $url. Expected $expected, got $actual" } break } catch { if ($attempt -eq $attempts) { throw } $delay = [Math]::Min(60, 5 * [Math]::Pow(2, $attempt - 1)) Write-Warning "Download failed: $($_.Exception.Message)" Write-Host "Retrying in $delay seconds" Start-Sleep -Seconds $delay } } "INNOSETUP_INSTALLER=$installer" >> $env:GITHUB_ENV - name: Install Inno Setup shell: pwsh run: | $ErrorActionPreference = 'Stop' $installDir = Join-Path $env:RUNNER_TEMP 'innosetup-${{ matrix.compiler }}' New-Item -ItemType Directory -Force -Path $installDir | Out-Null $arguments = @( '/VERYSILENT', '/SUPPRESSMSGBOXES', '/NORESTART', "/DIR=$installDir" ) $process = Start-Process -FilePath $env:INNOSETUP_INSTALLER -ArgumentList $arguments -Wait -PassThru if ($process.ExitCode -ne 0) { throw "Inno Setup installer exited with $($process.ExitCode)" } $iscc = Join-Path $installDir 'ISCC.exe' if (!(Test-Path $iscc)) { throw "ISCC.exe was not installed at $iscc" } "ISCC=$iscc" >> $env:GITHUB_ENV - name: Compile fixture installer shell: pwsh run: | $ErrorActionPreference = 'Stop' $compiler = '${{ matrix.compiler }}' $compilerId = $compiler -replace '[^A-Za-z0-9]+', '_' $artifactBase = "e2e-$compilerId" $artifactName = "$artifactBase.exe" $outputDir = Join-Path $env:RUNNER_TEMP 'innosetup-output' $artifactDir = Join-Path $env:RUNNER_TEMP 'innosetup-artifact' New-Item -ItemType Directory -Force -Path $outputDir, $artifactDir | Out-Null $fixture = Join-Path $env:GITHUB_WORKSPACE 'test\e2e\innosetup\fixture.iss' & $env:ISCC "/O$outputDir" "/F$artifactBase" $fixture if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } $compiledInstaller = Join-Path $outputDir $artifactName if (!(Test-Path -LiteralPath $compiledInstaller)) { throw "Compiled installer missing: $compiledInstaller" } Copy-Item -LiteralPath $compiledInstaller -Destination (Join-Path $artifactDir $artifactName) $manifest = Join-Path $artifactDir "manifest-$compilerId.tsv" $manifestLine = "$compiler`t${{ matrix.data_version }}`t$artifactName`n" $utf8NoBom = [System.Text.UTF8Encoding]::new($false) [System.IO.File]::WriteAllText($manifest, $manifestLine, $utf8NoBom) Get-ChildItem -LiteralPath $artifactDir | Select-Object Name, Length | Format-Table -AutoSize - name: Upload fixture installer uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: e2e-${{ matrix.compiler }} path: ${{ runner.temp }}/innosetup-artifact if-no-files-found: error validate-artifact: name: validate (${{ matrix.artifact }}) runs-on: ${{ matrix.runner }} needs: - build-installers - build-linux - build-macos - build-windows timeout-minutes: 30 strategy: fail-fast: false matrix: include: - runner: ubuntu-24.04 artifact: innoextract-linux-amd64 - runner: ubuntu-24.04-arm artifact: innoextract-linux-arm64 - runner: macos-15 artifact: innoextract-darwin-arm64 - runner: macos-15-intel artifact: innoextract-darwin-amd64 - runner: windows-2025 artifact: innoextract-windows-amd64.exe steps: - name: Disable CRLF conversion if: startsWith(matrix.runner, 'windows') shell: pwsh run: git config --global core.autocrlf false - name: Checkout uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Download release artifact uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: ${{ matrix.artifact }} path: ${{ runner.temp }}/innoextract-artifact - name: Download fixture installers uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: pattern: e2e-* path: ${{ runner.temp }}/e2e-installers - name: Validate extraction shell: bash run: | to_unix_path() { if command -v cygpath >/dev/null 2>&1; then cygpath -u "$1" else printf '%s\n' "$1" fi } temp_dir="$(to_unix_path "${RUNNER_TEMP}")" workspace="$(to_unix_path "${GITHUB_WORKSPACE}")" artifact_dir="${temp_dir}/innoextract-artifact" installers_dir="${temp_dir}/e2e-installers" binary="${artifact_dir}/${{ matrix.artifact }}" find "${artifact_dir}" "${installers_dir}" -type f -print | sort if [ "${RUNNER_OS}" != "Windows" ]; then chmod +x "${binary}" fi bash "${workspace}/test/e2e/innosetup/validate.sh" \ --innoextract "${binary}" \ --installers "${installers_dir}" release: runs-on: ubuntu-24.04 permissions: contents: write # required to create GitHub release needs: - validate-artifact steps: - name: Download artifacts uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: pattern: innoextract-* path: release merge-multiple: true - name: GitHub Release if: startsWith(github.ref, 'refs/tags/v') uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: draft: true files: release/* crazy-max-innoextract-21e1fd9/.mailmap000066400000000000000000000005051524114154100200150ustar00rootroot00000000000000# # This list is used by git-shortlog to fix a few botched name translations # in the git archive, either because the author's full name was messed up # and/or not always written the same way, making contributions from the # same person appearing not to be so. # Daniel Scharrer crazy-max-innoextract-21e1fd9/CHANGELOG000066400000000000000000000242511524114154100176120ustar00rootroot00000000000000 innoextract 1.13.0 (2026-08-18) - Fixed printing SHA-256 checksums to use the stored SHA-256 digest instead of SHA-1 bytes - Fixed collision rename suffixes so component and language expressions containing path separators cannot create nested output paths - Fixed processing installers without files to avoid evaluating log(0) - Fixed MinGW static Boost builds with LTO enabled - Updated build documentation to stop listing Boost.System as a required Boost library innoextract 1.12.0 (2026-08-17) - Fixed checksum handling for Inno Setup 6.5+ file entries that do not use SHA-256 hash verification - Fixed release binaries to be self-contained by statically linking third-party dependencies on Linux, macOS and Windows - Release artifacts are now validated with end-to-end extraction tests on Linux amd64/arm64, macOS amd64/arm64 and Windows amd64 before publishing innoextract 1.11.0 (2026-08-17) - Added support for Inno Setup 6.4.2, 6.4.3, 6.5.x, 6.6.x, 6.7.x, 7.0.x and 7.1.0 installers - Added support for newer Inno Setup data layouts, including 64-bit loader offsets, 64-bit data block sizes, ISSig metadata and 7.x entry bitness fields - Fixed parsing of newer Inno Setup file, data, header, language, registry, run and task entries after upstream layout changes - Added end-to-end extraction tests using fixture installers built with Inno Setup versions from 5.6.1 through 7.1.0 - Added Linux arm64 and macOS amd64 release binaries innoextract 1.10.0 (2026-08-16) - Added support for Inno Setup 6.1.2, 6.2.1, 6.2.2, 6.3.x and 6.4.0 installers - Added support for a modified Inno Setup 5.3.10 variant - Added support for SHA-256, PBKDF2-SHA256 and XChaCha20 decryption - Added unit tests, enable with BUILD_TESTS - Fixed extracting files with repeated or shared starting locations in GOG Galaxy installers - Fixed XChaCha20 decryption on big-endian platforms - Fixed debug output for installers with out-of-bounds language IDs - Fixed builds with newer Boost and CMake versions - Added GitHub CI and release binaries for Linux, macOS and Windows - Release versions now use semantic versioning - Replaced USE_ARC4 build option with BUILD_DECRYPTION - Linking will be done using Mold or LLD if available innoextract 1.9 (2020-08-09) - Added preliminary support for Inno Setup 6.1.0 - Added support for a modified Inno Setup 5.4.2 variant - Fixed output directory being created for unsupported installers - Fixed some safe non-ASCII characters being stripped from filenames - Fixed handling of path separators in Japanese and Korean installers - Fixed build with newer Boost versions - Windows: Fixed heap corruption - Windows: Fixed garbled output innoextract 1.8 (2019-09-15) - Added support for Inno Setup 6.0.0 installers - Added support for pre-release Inno Setup 5.6.2 installers used by GOG - Added support for two modified Inno Setup 5.5.7 variants - Added support for Inno Setup 1.3.0 to 1.3.23 - Added support for My Inno Setup Extensions installers older than 3.0.6.1 - Added support for modified Inno Setup variants using an alternative setup loader magic - Added support for using boost_{zlib,bzip2} when statically linking Boost - Added support for automatically reading external setup.0 files - Encoding for non-Unicode installers is now determined from the languages supported by the installer, overridable using the --codepage option - Implemented parsing of GOG Galaxy architecture constraints - The architecture-specific suffixes @32bit and @64bit are now used to disambiguate colliding files - Fixed extracting files from slices larger than 2 GiB with 32-bit builds - Fixed output path for files with absolute paths (canonicalization now strips all unsafe characters) - Fixed output directory being created even when not extracting files - Fixed a hang when using the --language option - Improved checksum verification for files reconstructed from GOG Galaxy file parts - Changed header parsing to select the first version without warnings and failing that the first without errors - Changed filesystem and output encoding to WTF-8 (extended UTF-8) to represent broken UTF-16 data innoextract 1.7 (2018-06-12) - Added support for Inno Setup 5.6.0 installers - Added support for new GOG installers with GOG Galaxy file parts - Added support for encrypted installers with the --password (-P) and --password-file options - Added a --show-password option to print password check information - Added a --check-password option to abort if the provided password does not match the stored checksum - Added a --info (-i) convenience option to print information about the installer - Added a --list-sizes option to print file sizes even with --quiet or --silent - Added a --list-checksums option to print file checksums - Added a --data-version (-V) option to print the data version and exit - Added a --no-extract-unknown (-n) option to abort on unknown Inno Setup data versions - Fixed building in paths that contain regex expressions - Fixed case-sensitivity in parent directory when creating subdirectories - Fixed .bin slice file names used with Inno Setup versions older than 4.1.7 - Fixed build with newer libc++ versions - Made loading of .bin slice files case-insensitive - The --test option can now be combined with --extract to abort on file checksum errors - Now compiles in C++17 mode if supported innoextract 1.6 (2016-03-24) - Added support for Inno Setup 5.5.7 (and 5.5.8) installers - Added a --collisions=rename-all option - Changed --collisions=rename to omit the suffix for the file that would have been extracted with --collisions=overwrite instead of the first encountered file - Fixed @lang suffix sometimes missing for the first file with the --collisions=rename option - Fixed build error with CMake 3.5 - Now compiles in C++14 mode if supported - Unsafe characters in special constant strings (ie ':' in {code:…}) are now replaced with '$' - Windows: Fixed error message if the source file could not be opened - Windows: Fixed progress bar flickering while printing extracted filenames - Windows binaries: Fixed crash on platforms without AVX support innoextract 1.5 (2015-09-24) - Added support for Inno Setup 5.5.6 installers - Added support for a modified Inno Setup 5.5.0 variant - Added support for building without iconv (Windows-1252 and UTF-16LE only) - Added warnings for .bin files that are not part of the installer - Added a simple --include (-I) option to filter files thanks to Alexandre Detiste - Added a --list-languages option to list available languages - Added a --exclude-temp (-m) option to not extract temporary files - Added a --language-only option to skip language-independent files - Added a --collisions option to abort or rename files on collision - Added a --default-language option to prefer a language in case of file collisions - Added a --gog-game-id option to print the GOG.com game ID for Galaxy-ready installers - Added a --gog (-g) option to extract additional .bin files using unrar or unar - Fixed handling of spaces in the --data-dir option - Fixed an infinite loop with truncated LZMA streams - Fixed handling of forward slashes in stored file paths - Fixed size display for powers of 1024 - Fixed loading headers if there are encrypted chunks - Fixed file collisions not being handled case-insensitively - Files will now be extracted into the same directory even if the stored case differs - Empty directories are now created correctly when extracting - Skipped files in encrypted chunks are now listed individually - Temporary files are now marked in file listings - Error summary is now written to stderr when using --quiet - Colors are now only enabled automatically if $TERM is set to something other than "dumb" - Improved error and warning messages - Build system improvements - Debug output can now be enabled separately from debug builds - Windows: Added support for using the Win32 API for string encoding conversion - Windows: Fixed unicode console output innoextract 1.4-windows-r2 (2014-04-17) - This is a Windows-specific hotfix release, no other platforms are affected - Fixed running innoextract under Windows XP innoextract 1.4-windows-r1 (2013-05-14) - This is a Windows-specific hotfix release, no other platforms are affected - Fixed a crash on startup under Windows - Reduced progress bar flickering under Windows - Fixed original console text color not being restored under Windows innoextract 1.4 (2013-03-11) - Fixed build on non-Linux platforms with a separate libiconv (Windows™, macOS) - Fixed build on systems with non-standard iconv function prototypes (FreeBSD) - Fixed MSVC build - Fixed build with older glibc versions - Fixed issues with the progress bar in sandbox environments - Fixed string conversion on systems where libiconv defaults to big-endian variants - Fixed extracting very large installers with 32-bit innoextract builds - Improved handling of invalid encoded strings - Improved error messages when input or output files could not be opened - The --list command-line option can now combined with --test or --extract - The --version command-line option can now be modified with --quiet or --silent - Added color output and progress bar support for Windows™ - Added support for Unicode filenames under Windows™ - Added support for preserving timestamps of extracted files (enabled by default) - Added a --timestamps (-T) command-line options to control or disable file timestamps - Added an --output-dir (-d) command-line option to control where files are extracted - Added various CMake options to fine-tune the build process - Various bug fixes and tweaks innoextract 1.3 (2012-07-03) - Fixed --quiet and --silent flags being ignored for some multi-file installers output - Now compiles in C++11 mode if supported - Added a warning when extracting unsupported setup data versions - Added support for Inno Setup 5.5.0 installers innoextract 1.2 (2012-04-01) - Fixed compile errors with older versions of Boost or GCC. - Prevented linking against libraries that aren't actually needed. innoextract 1.1 (2012-03-19) - Added support to extract files for a specific language. - Fixed a bug in the setup header parsing code. innoextract 1.0 (2012-03-01) - Initial release. - Can list and extract files but not much more. crazy-max-innoextract-21e1fd9/CMakeLists.txt000066400000000000000000000471431524114154100211450ustar00rootroot00000000000000cmake_minimum_required(VERSION 2.8...3.31) if(CMAKE_VERSION VERSION_LESS 3.12) cmake_policy(VERSION ${CMAKE_VERSION}) endif() if(DEFINED CMAKE_POLICY_DEFAULT_CMP0167 AND POLICY CMP0167) cmake_policy(SET CMP0167 ${CMAKE_POLICY_DEFAULT_CMP0167}) endif() project(innoextract) # Define configuration options if(CMAKE_SYSTEM_NAME MATCHES "Darwin") set(MACOS 1) else() set(MACOS 0) endif() macro(suboption _var _comment _type _default) if(NOT DEFINED ${_var}) set(${_var} "${_default}") else() set(${_var} "${${_var}}" CACHE ${_type} "${_comment}") endif() endmacro() option(DEVELOPER "Use build settings suitable for developers" OFF) option(CONTINUOUS_INTEGRATION "Use build settings suitable for CI" OFF) # Components set(default_BUILD_TESTS OFF) if(CONTINUOUS_INTEGRATION OR DEVELOPER) set(default_BUILD_TESTS ON) endif() suboption(BUILD_TESTS "Build tests" BOOL ${default_BUILD_TESTS}) option(BUILD_DECRYPTION "Build decryption support" ON) # Optional dependencies option(USE_LZMA "Build LZMA decompression support" ON) option(USE_DYNAMIC_UTIMENSAT "Dynamically load utimensat if not available at compile time" OFF) # Alternative dependencies set(WITH_CONV CACHE STRING "The library to use for charset conversions") # Build types option(DEBUG_EXTRA "Expensive debug options" OFF) option(SET_WARNING_FLAGS "Adjust compiler warning flags" ON) option(SET_NOISY_WARNING_FLAGS "Enable noisy compiler warnings" OFF) option(SET_OPTIMIZATION_FLAGS "Adjust compiler optimization flags" ON) set(default_FASTLINK OFF) if(DEVELOPER OR CONTINUOUS_INTEGRATION) set(default_FASTLINK ON) endif() suboption(FASTLINK "Optimize (incremental) linking speed" BOOL ${default_FASTLINK}) set(default_USE_LD "default") if(SET_OPTIMIZATION_FLAGS OR FASTLINK) set(default_USE_LD "best") endif() suboption(USE_LD "The linker to use (mold, lld, gold, bfd, best or default)" STRING "${default_USE_LD}") set(default_USE_LTO OFF) if(SET_OPTIMIZATION_FLAGS AND NOT FASTLINK) set(default_USE_LTO ON) endif() suboption(USE_LTO "Use link-time code generation" BOOL ${default_USE_LTO}) suboption(WERROR "Turn warnings into errors" BOOL ${CONTINUOUS_INTEGRATION}) suboption(CXX_STD_VERSION "Maximum C++ standard version to enable" STRING 2017) if(DEVELOPER OR CMAKE_BUILD_TYPE STREQUAL "Debug") set(default_DEBUG ON) else() set(default_DEBUG OFF) endif() suboption(DEBUG "Build with debug output" BOOL ${default_DEBUG}) if(DEBUG) add_definitions(-DDEBUG=1) endif() set(default_USE_STATIC_LIBS OFF) if(WIN32) set(default_USE_STATIC_LIBS ON) endif() option(USE_STATIC_LIBS "Statically link libraries" ${default_USE_STATIC_LIBS}) option(LZMA_USE_STATIC_LIBS "Statically link liblzma" ${USE_STATIC_LIBS}) option(ZLIB_USE_STATIC_LIBS "Statically link libz" ${USE_STATIC_LIBS}) option(BZip2_USE_STATIC_LIBS "Statically link libbz2" ${USE_STATIC_LIBS}) option(Boost_USE_STATIC_LIBS "Statically link Boost" ${USE_STATIC_LIBS}) option(iconv_USE_STATIC_LIBS "Statically link libiconv" ${USE_STATIC_LIBS}) # Make optional dependencies required suboption(STRICT_USE "Abort if there are missing optional dependencies" BOOL ${CONTINUOUS_INTEGRATION}) if(STRICT_USE) set(OPTIONAL_DEPENDENCY REQUIRED) else() set(OPTIONAL_DEPENDENCY) endif() # Test configuration set(RUN_TARGET CACHE STRING "Wrapper to run built targets") mark_as_advanced(RUN_TARGET) set(default_RUN_TESTS OFF) if((DEVELOPER OR CONTINUOUS_INTEGRATION) AND (NOT CMAKE_CROSSCOMPILING OR NOT RUN_TARGET STREQUAL "")) set(default_RUN_TESTS ON) endif() suboption(RUN_TESTS "Run tests as part of the default build target" BOOL ${default_RUN_TESTS}) # Install destinations if(CMAKE_VERSION VERSION_LESS 2.8.5) set(CMAKE_INSTALL_DATAROOTDIR "share" CACHE STRING "read-only architecture-independent data root (share) (relative to prefix).") set(CMAKE_INSTALL_BINDIR "bin" CACHE STRING "user executables (bin) (relative to prefix).") set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man" CACHE STRING "man documentation (DATAROOTDIR/man) (relative to prefix).") mark_as_advanced( CMAKE_INSTALL_DATAROOTDIR CMAKE_INSTALL_BINDIR CMAKE_INSTALL_MANDIR ) else() include(GNUInstallDirs) endif() # Helper scrips include(CheckSymbolExists) set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") # For custom cmake modules include(BuildType) include(CompileCheck) include(CreateSourceGroups) include(CXXVersionCheck) include(Doxygen) include(FilterList) include(PrintConfiguration) include(StyleCheck) include(UseStaticLibs) include(VersionString) # Find required libraries # Win32 API if(WIN32) # Ensure we aren't using functionalities not found under Window XP SP1 add_definitions(-D_WIN32_WINNT=0x0502) add_definitions(-DNOMINMAX) add_definitions(-DWIN32_LEAN_AND_MEAN) endif() if(USE_STATIC_LIBS AND NOT MSVC) if(MINGW) add_ldflag("-static") else() add_ldflag("-static-libstdc++") add_ldflag("-static-libgcc") endif() endif() unset(LIBRARIES) if(BUILD_DECRYPTION) set(INNOEXTRACT_HAVE_DECRYPTION 1) endif() if(USE_LZMA) find_package(LZMA REQUIRED) list(APPEND LIBRARIES ${LZMA_LIBRARIES}) include_directories(SYSTEM ${LZMA_INCLUDE_DIR}) add_definitions(${LZMA_DEFINITIONS}) set(INNOEXTRACT_HAVE_LZMA 1) else() message(WARNING "\nDisabling LZMA decompression support.\n" "You won't be able to extract most newer Inno Setup installers.") set(INNOEXTRACT_HAVE_LZMA 0) endif() find_package(Boost REQUIRED COMPONENTS iostreams filesystem date_time program_options ) set(INNOEXTRACT_BOOST_LIBRARIES ${Boost_LIBRARIES}) link_directories(${Boost_LIBRARY_DIRS}) include_directories(SYSTEM ${Boost_INCLUDE_DIR}) if(NOT Boost_VERSION_MACRO) # CMP0093 changed Boost_VERSION to x.y.z format and provide the old format in Boost_VERSION_MACRO set(Boost_VERSION_MACRO ${Boost_VERSION}) endif() find_package(Boost QUIET COMPONENTS system) if(Boost_SYSTEM_FOUND) list(APPEND INNOEXTRACT_BOOST_LIBRARIES ${Boost_SYSTEM_LIBRARY}) elseif(Boost_VERSION_MACRO LESS 106900) message(FATAL_ERROR "Could NOT find Boost component system") endif() list(APPEND LIBRARIES ${INNOEXTRACT_BOOST_LIBRARIES}) add_definitions(-DBOOST_SYSTEM_DISABLE_THREADS) if(WIN32) add_definitions(-DBOOST_SYSTEM_USE_UTF8) endif() has_static_libs(Boost INNOEXTRACT_BOOST_LIBRARIES) if(Boost_HAS_STATIC_LIBS) foreach(Lib IN ITEMS ZLIB BZip2) string(TOUPPER ${Lib} LIB) string(TOLOWER ${Lib} lib) foreach(static IN ITEMS 1 0) if(static) use_static_libs(${Lib}) endif() # MinGW Boost component lookups can resolve DLL import libraries here. if(WIN32 AND NOT MINGW) find_package(Boost COMPONENTS ${lib} QUIET) endif() if(Boost_${LIB}_FOUND) message (STATUS "Found boost_${lib}") set(${LIB}_LIBRARIES ${Boost_${LIB}_LIBRARY}) else() # Avoid MinGW import libraries such as libbz2.dll.a. if(static AND MINGW) unset(static_library_name) if(Lib STREQUAL "ZLIB") set(static_library_name libz.a) elseif(Lib STREQUAL "BZip2") set(static_library_name libbz2.a) endif() find_file(${LIB}_STATIC_LIBRARY ${static_library_name} HINTS "$ENV{MINGW_PREFIX}/lib" "$ENV{MSYSTEM_PREFIX}/lib" PATH_SUFFIXES lib ) if(${LIB}_STATIC_LIBRARY) set(${LIB}_LIBRARY "${${LIB}_STATIC_LIBRARY}" CACHE FILEPATH "The ${Lib} library" FORCE) set(${LIB}_LIBRARY_RELEASE "${${LIB}_STATIC_LIBRARY}" CACHE FILEPATH "The ${Lib} library" FORCE) set(${LIB}_LIBRARIES "${${LIB}_STATIC_LIBRARY}") elseif(STRICT_USE) message(FATAL_ERROR "Could NOT find static ${Lib} library") endif() endif() find_package(${Lib} REQUIRED) endif() if(static) use_static_libs_restore() endif() if(${LIB}_LIBRARIES OR STRICT_USE) break() endif() endforeach() list(APPEND LIBRARIES ${${LIB}_LIBRARIES}) endforeach() endif() set(INNOEXTRACT_HAVE_ICONV 0) set(INNOEXTRACT_HAVE_WIN32_CONV 0) if(WIN32 AND (NOT WITH_CONV OR WITH_CONV STREQUAL "win32")) set(INNOEXTRACT_HAVE_WIN32_CONV 1) elseif(NOT WITH_CONV OR WITH_CONV STREQUAL "iconv") if(STRICT_USE) set(ICONV_REQUIRED REQUIRED) else() set(ICONV_REQUIRED) endif() find_package(iconv ${ICONV_REQUIRED}) if(ICONV_FOUND) list(APPEND LIBRARIES ${iconv_LIBRARIES}) include_directories(SYSTEM ${iconv_INCLUDE_DIR}) add_definitions(${iconv_DEFINITIONS}) set(INNOEXTRACT_HAVE_ICONV 1) endif() elseif(WITH_CONV AND NOT WITH_CONV STREQUAL "builtin") message(FATAL_ERROR "Invalid WITH_CONV option: ${WITH_CONV}") endif() # Set compiler flags if(Boost_VERSION_MACRO LESS 104800) # Older Boost versions don't work with C++11 elseif(NOT CXX_STD_VERSION LESS 2011) enable_cxx_version(${CXX_STD_VERSION}) check_cxx11("alignof" INNOEXTRACT_HAVE_ALIGNOF) if(WIN32) check_cxx11("std::codecvt_utf8_utf16" INNOEXTRACT_HAVE_STD_CODECVT_UTF8_UTF16 1600) endif() check_cxx11("std::unique_ptr" INNOEXTRACT_HAVE_STD_UNIQUE_PTR 1600) endif() # Don't expose internal symbols to the outside world by default if(NOT MSVC) add_cxxflag("-fvisibility=hidden") add_cxxflag("-fvisibility-inlines-hidden") endif() # Older glibc versions won't provide some useful symbols by default - request them # This flag is currently also set by gcc when compiling C++, but not for plain C if(NOT WIN32) check_symbol_exists(__GLIBC__ "features.h" HAVE_GLIBC) if(HAVE_GLIBC) set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE=1") add_definitions(-D_GNU_SOURCE=1) endif() endif() if(WIN32) # Define this so that we don't accitenally use ANSI functions add_definitions(-DUNICODE) add_definitions(-D_UNICODE) endif() # Check for optional functionality and system configuration if(NOT WIN32) check_symbol_exists(isatty "unistd.h" INNOEXTRACT_HAVE_ISATTY) check_symbol_exists(ioctl "sys/ioctl.h" INNOEXTRACT_HAVE_IOCTL) check_symbol_exists(timegm "time.h" INNOEXTRACT_HAVE_TIMEGM) check_symbol_exists(gmtime_r "time.h" INNOEXTRACT_HAVE_GMTIME_R) check_symbol_exists(AT_FDCWD "fcntl.h" INNOEXTRACT_HAVE_AT_FDCWD) if(INNOEXTRACT_HAVE_AT_FDCWD) check_symbol_exists(utimensat "sys/stat.h" INNOEXTRACT_HAVE_UTIMENSAT) endif() if(INNOEXTRACT_HAVE_UTIMENSAT AND INNOEXTRACT_HAVE_AT_FDCWD) set(INNOEXTRACT_HAVE_UTIMENSAT_d 1) else() if(USE_DYNAMIC_UTIMENSAT AND INNOEXTRACT_HAVE_AT_FDCWD) set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS}) check_symbol_exists(dlsym "dlfcn.h" INNOEXTRACT_HAVE_DLSYM) check_symbol_exists(RTLD_DEFAULT "dlfcn.h" INNOEXTRACT_HAVE_RTLD_DEFAULT) unset(CMAKE_REQUIRED_LIBRARIES) if(INNOEXTRACT_HAVE_DLSYM AND INNOEXTRACT_HAVE_RTLD_DEFAULT) set(INNOEXTRACT_HAVE_DYNAMIC_UTIMENSAT 1) if(CMAKE_DL_LIBS) list(APPEND LIBRARIES ${CMAKE_DL_LIBS}) endif() endif() endif() check_symbol_exists(utimes "sys/time.h" INNOEXTRACT_HAVE_UTIMES) endif() check_symbol_exists(posix_spawnp "spawn.h" INNOEXTRACT_HAVE_POSIX_SPAWNP) if(INNOEXTRACT_HAVE_POSIX_SPAWNP) check_symbol_exists(environ "unistd.h" INNOEXTRACT_HAVE_UNISTD_ENVIRON) else() check_symbol_exists(fork "unistd.h" INNOEXTRACT_HAVE_FORK) check_symbol_exists(execvp "unistd.h" INNOEXTRACT_HAVE_EXECVP) endif() if(INNOEXTRACT_HAVE_POSIX_SPAWNP OR (INNOEXTRACT_HAVE_FORK AND INNOEXTRACT_HAVE_EXECVP)) check_symbol_exists(waitpid "sys/wait.h" INNOEXTRACT_HAVE_WAITPID) endif() endif() if(NOT MSVC) if(CMAKE_CXX_COMPILER_ID STREQUAL "PathScale") # EKOPath recognizes these but then fails to link else() check_builtin(INNOEXTRACT_HAVE_BUILTIN_BSWAP16 "__builtin_bswap16(0)") check_builtin(INNOEXTRACT_HAVE_BUILTIN_BSWAP32 "__builtin_bswap32(0)") check_builtin(INNOEXTRACT_HAVE_BUILTIN_BSWAP64 "__builtin_bswap64(0)") endif() if(NOT INNOEXTRACT_HAVE_BUILTIN_BSWAP16) check_symbol_exists(bswap_16 "byteswap.h" INNOEXTRACT_HAVE_BSWAP_16) endif() if(NOT INNOEXTRACT_HAVE_BUILTIN_BSWAP32) check_symbol_exists(bswap_32 "byteswap.h" INNOEXTRACT_HAVE_BSWAP_32) endif() if(NOT INNOEXTRACT_HAVE_BUILTIN_BSWAP64) check_symbol_exists(bswap_64 "byteswap.h" INNOEXTRACT_HAVE_BSWAP_64) endif() endif() if($ENV{PORTAGE_REPO_NAME} MATCHES "gentoo") # Meh unset(LIBRARIES) endif() # All sources: set(DOCUMENTATION 0) # never build these set(INNOEXTRACT_SOURCES src/index.hpp if DOCUMENTATION src/release.hpp src/cli/debug.hpp src/cli/debug.cpp if DEBUG src/cli/extract.hpp src/cli/extract.cpp src/cli/gog.hpp src/cli/gog.cpp src/cli/goggalaxy.hpp src/cli/goggalaxy.cpp src/cli/main.cpp src/crypto/adler32.hpp src/crypto/adler32.cpp src/crypto/arc4.hpp if INNOEXTRACT_HAVE_DECRYPTION src/crypto/arc4.cpp if INNOEXTRACT_HAVE_DECRYPTION src/crypto/checksum.hpp src/crypto/checksum.cpp src/crypto/crc32.hpp src/crypto/crc32.cpp src/crypto/hasher.cpp src/crypto/hasher.cpp src/crypto/iteratedhash.hpp src/crypto/md5.hpp src/crypto/md5.cpp src/crypto/pbkdf2.hpp if INNOEXTRACT_HAVE_DECRYPTION src/crypto/pbkdf2.cpp if INNOEXTRACT_HAVE_DECRYPTION src/crypto/sha1.hpp src/crypto/sha1.cpp src/crypto/sha256.hpp src/crypto/sha256.cpp src/crypto/xchacha20.hpp if INNOEXTRACT_HAVE_DECRYPTION src/crypto/xchacha20.cpp if INNOEXTRACT_HAVE_DECRYPTION src/loader/exereader.hpp src/loader/exereader.cpp src/loader/offsets.hpp src/loader/offsets.cpp src/setup/component.hpp src/setup/component.cpp src/setup/data.hpp src/setup/data.cpp src/setup/delete.hpp src/setup/delete.cpp src/setup/directory.hpp src/setup/directory.cpp src/setup/expression.hpp src/setup/expression.cpp src/setup/file.hpp src/setup/file.cpp src/setup/filename.hpp src/setup/filename.cpp src/setup/header.hpp src/setup/header.cpp src/setup/icon.hpp src/setup/icon.cpp src/setup/info.hpp src/setup/info.cpp src/setup/ini.hpp src/setup/ini.cpp src/setup/issigkey.hpp src/setup/issigkey.cpp src/setup/item.hpp src/setup/item.cpp src/setup/language.hpp src/setup/language.cpp src/setup/message.hpp src/setup/message.cpp src/setup/permission.hpp src/setup/permission.cpp src/setup/registry.hpp src/setup/registry.cpp src/setup/run.hpp src/setup/run.cpp src/setup/task.hpp src/setup/task.cpp src/setup/type.hpp src/setup/type.cpp src/setup/version.hpp src/setup/version.cpp src/setup/windows.hpp src/setup/windows.cpp src/stream/block.hpp src/stream/block.cpp src/stream/checksum.hpp src/stream/chunk.hpp src/stream/chunk.cpp src/stream/exefilter.hpp src/stream/file.hpp src/stream/file.cpp src/stream/lzma.hpp src/stream/lzma.cpp if INNOEXTRACT_HAVE_LZMA src/stream/restrict.hpp src/stream/slice.hpp src/stream/slice.cpp src/util/align.hpp src/util/ansi.hpp src/util/boostfs_compat.hpp src/util/console.hpp src/util/console.cpp src/util/encoding.hpp src/util/encoding.cpp src/util/endian.hpp src/util/enum.hpp src/util/flags.hpp src/util/fstream.hpp src/util/load.hpp src/util/load.cpp src/util/log.hpp src/util/log.cpp src/util/math.hpp src/util/output.hpp src/util/process.hpp src/util/process.cpp src/util/storedenum.hpp src/util/time.hpp src/util/time.cpp src/util/test.hpp src/util/types.hpp src/util/unique_ptr.hpp src/util/windows.hpp src/util/windows.cpp if WIN32 ) set(UNITTEST_SOURCES src/crypto/adler32.cpp src/crypto/arc4.cpp if INNOEXTRACT_HAVE_DECRYPTION src/crypto/crc32.cpp src/crypto/md5.cpp src/crypto/pbkdf2.cpp if INNOEXTRACT_HAVE_DECRYPTION src/crypto/sha1.cpp src/crypto/sha256.cpp src/crypto/xchacha20.cpp if INNOEXTRACT_HAVE_DECRYPTION src/util/test.hpp src/util/test.cpp ) filter_list(INNOEXTRACT_SOURCES ALL_INNOEXTRACT_SOURCES) filter_list(UNITTEST_SOURCES ALL_UNITTEST_SOURCES) create_source_groups(ALL_INNOEXTRACT_SOURCES) # Prepare generated files include_directories(src ${CMAKE_CURRENT_BINARY_DIR}) configure_file("src/configure.hpp.in" "configure.hpp") set(VERSION_FILE "${PROJECT_BINARY_DIR}/release.cpp") set(VERSION_SOURCES VERSION "VERSION" LICENSE "LICENSE") version_file("src/release.cpp.in" ${VERSION_FILE} "${VERSION_SOURCES}" ".git") list(APPEND INNOEXTRACT_SOURCES ${VERSION_FILE}) set(MAN_INPUT "doc/innoextract.1.in") set(MAN_FILE "${PROJECT_BINARY_DIR}/innoextract.1") set(MAN_SOURCES VERSION "VERSION" CHANGELOG "CHANGELOG") version_file(${MAN_INPUT} ${MAN_FILE} "${MAN_SOURCES}" ".git") add_custom_target(manpage ALL DEPENDS ${MAN_FILE}) # Main targets if(MINGW AND USE_LTO AND Boost_USE_STATIC_LIBS AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") message(STATUS "Disabling LTO for selected sources due to MinGW static Boost link issue") # GCC/MinGW LTO may discard COMDAT/linkonce thunks emitted for Boost # exceptions/wrapexcept, causing "defined in discarded section" link errors. set_source_files_properties( src/cli/debug.cpp src/cli/main.cpp src/cli/extract.cpp src/cli/goggalaxy.cpp src/stream/block.cpp PROPERTIES COMPILE_OPTIONS "-fno-lto" ) endif() add_executable(innoextract ${INNOEXTRACT_SOURCES}) target_link_libraries(innoextract ${LIBRARIES}) install(TARGETS innoextract RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) install(FILES ${MAN_FILE} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 OPTIONAL) # Test target if(BUILD_TESTS) enable_testing() set(run_tests) if(RUN_TESTS) set(run_tests ALL) endif() add_executable(unittest ${UNITTEST_SOURCES}) target_link_libraries(unittest ${LIBRARIES}) if(CMAKE_VERSION VERSION_LESS 3.0) set_target_properties(unittest PROPERTIES COMPILE_DEFINITIONS INNOEXTRACT_BUILD_TESTS) get_property(unittest_binary TARGET unittest PROPERTY LOCATION) else() target_compile_definitions(unittest PRIVATE INNOEXTRACT_BUILD_TESTS) set(unittest_binary "$") endif() add_test(NAME "unittest" COMMAND ${RUN_TARGET} "${unittest_binary}" --verbose WORKING_DIRECTORY "${PROJECT_BINARY_DIR}" ) add_custom_command( OUTPUT "${PROJECT_BINARY_DIR}/unittest.check" COMMAND ${RUN_TARGET} "${unittest_binary}" COMMAND ${CMAKE_COMMAND} -E touch "${PROJECT_BINARY_DIR}/unittest.check" DEPENDS unittest WORKING_DIRECTORY "${PROJECT_BINARY_DIR}" COMMENT "Running unit tests" VERBATIM ) add_custom_target(check ${run_tests} DEPENDS "${PROJECT_BINARY_DIR}/unittest.check" ) endif() # Additional targets. add_style_check_target(style "${ALL_INNOEXTRACT_SOURCES}" innoextract) add_doxygen_target(doc "doc/Doxyfile.in" "VERSION" ".git" "${PROJECT_BINARY_DIR}/doc") # Print a configuration summary message("") message("Configuration:") set(BUILD_TYPE_SUFFIX "") if(DEBUG AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug") set(BUILD_TYPE_SUFFIX "${BUILD_TYPE_SUFFIX} with debug output") elseif(NOT DEBUG AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") set(BUILD_TYPE_SUFFIX "${BUILD_TYPE_SUFFIX} without debug output") endif() message(" - Build type: ${CMAKE_BUILD_TYPE}${BUILD_TYPE_SUFFIX}") print_configuration("Decryption support" FIRST INNOEXTRACT_HAVE_DECRYPTION "enabled" 1 "disabled" ) print_configuration("LZMA decompression" FIRST INNOEXTRACT_HAVE_LZMA "enabled" 1 "disabled" ) if(INNOEXTRACT_HAVE_DYNAMIC_UTIMENSAT) set(time_prefix "nanoseconds if supported, ") set(time_suffix " otherwise") endif() print_configuration("File time precision" FIRST INNOEXTRACT_HAVE_UTIMENSAT_d "nanoseconds" WIN32 "100-nanoseconds" INNOEXTRACT_HAVE_UTIMES "${time_prefix}microseconds${time_suffix}" 1 "${time_prefix}seconds${time_suffix}" ) print_configuration("Charset conversion" INNOEXTRACT_HAVE_ICONV "iconv" INNOEXTRACT_HAVE_WIN32_CONV "Win32" 1 "builtin" ) message("") if(DEVELOPER) file(READ "README.md" readme) parse_version_file("VERSION" "VERSION") string(REPLACE "${VERSION_2}" "" readme_without_version "${readme}") if(readme_without_version STREQUAL readme) message(WARNING "Could not find '${VERSION_2}' in README.md.") endif() foreach(file IN LISTS ALL_INNOEXTRACT_SOURCES) file(READ "${file}" source) if(source MATCHES ".*INNOEXTRACT_TEST.*") list(FIND ALL_UNITTEST_SOURCES ${file} result) if(result EQUAL -1) message(WARNING "Could not find '${file}' in UNITTEST_SOURCES") endif() endif() endforeach() endif() crazy-max-innoextract-21e1fd9/CONTRIBUTING.md000066400000000000000000000013151524114154100206250ustar00rootroot00000000000000 Contributions of all kinds are welcome as [GitHub pull requests](https://github.com/dscharrer/innoextract/pulls) or as patches mailed to daniel@constexpr.org. If you are planning to implement a larger feature and intend to get it merged, please contact me **first** at daniel@constexpr.org or on the [GitHub issue tracker](https://github.com/dscharrer/innoextract/issues) to discuss the planned changes in order to avoid duplicating work or having to re-do the changes in a way that fits with the project. There is no official code style guide, but please try to match the style of the existing code and git commit messages. All contributions must be licensed under the zlib license detailed in the LICENSE file. crazy-max-innoextract-21e1fd9/LICENSE000066400000000000000000000015661524114154100174110ustar00rootroot00000000000000 Copyright (C) 2011-2020 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. crazy-max-innoextract-21e1fd9/README.md000066400000000000000000000267221524114154100176640ustar00rootroot00000000000000 # innoextract - A tool to unpack installers created by Inno Setup [Inno Setup](https://jrsoftware.org/isinfo.php) is a tool to create installers for Microsoft Windows applications. innoextract allows to extract such installers under non-Windows systems without running the actual installer using wine. innoextract currently supports installers created by Inno Setup 1.2.10 to 7.1.0. In addition to standard Inno Setup installers, innoextract also supports some modified Inno Setup variants including Martijn Laan's My Inno Setup Extensions 1.3.10 to 3.0.6.1 as well as GOG.com's Inno Setup-based game installers. innoextract is able to unpack Wadjet Eye Games installers (to play with AGS), Arx Fatalis patches (for use with Arx Libertatis) as well as various other Inno Setup executables. innoextract is available under the ZLIB license - see the LICENSE file. See the website for [Linux packages](https://constexpr.org/innoextract/#packages). ## Contact [Website](https://constexpr.org/innoextract/) Author: [Daniel Scharrer](https://constexpr.org/) ## Dependencies * **[Boost](https://www.boost.org/) 1.37** or newer * **liblzma** from [xz-utils](https://tukaani.org/xz/) *(optional)* * **iconv** (*optional*, either as part of the system libc, as is the case with [glibc](https://www.gnu.org/software/libc/) and [uClibc](https://uclibc.org/), or as a separate [libiconv](https://www.gnu.org/software/libiconv/)) For Boost you will need the headers as well as the `iostreams`, `filesystem`, `date_time` and `program_options` libraries. Older Boost versions may work but are not actively supported. The boost `iostreams` library needs to be built with zlib and bzip2 support. While innoextract can be built without liblzma by manually setting `-DUSE_LZMA=OFF`, it is highly recommended and you won't be able to extract most installers created by newer Inno Setup versions without it. To build innoextract you will also need **[CMake](https://cmake.org/) 2.8** and a working C++ compiler, as well as the development headers for liblzma and boost. See the Website for [operating system-specific instructions](https://constexpr.org/innoextract/install). ## Compile and install To compile innoextract, run: $ mkdir -p build && cd build $ cmake .. $ make To install the binaries system-wide, run as root: # make install The default build settings are tuned for users - if you plan to make changes to Arx Libertatis you should append the `-DDEVELOPER=1` option to the `cmake` command to enable debug output and fast incremental builds. ### Build options: | Option | Default | Description | |---------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `BUILD_DECRYPTION` | `ON` | Build decryption support. | | `USE_LZMA` | `ON` | Use `liblzma`. | | `WITH_CONV` | *not set* | The charset conversion library to use. Valid values are `iconv`, `win32` and `builtin`¹. If not set, a library appropriate for the target platform will be chosen. | | `CMAKE_BUILD_TYPE` | `Release` | Set to `Debug` to enable debug output. | | `DEBUG` | `OFF`² | Enable debug output and runtime checks. | | `DEBUG_EXTRA` | `OFF` | Expensive debug options. | | `SET_WARNING_FLAGS` | `ON` | Adjust compiler warning flags. This should not affect the produced binaries but is useful to catch potential problems. | | `SET_NOISY_WARNING_FLAGS` | `OFF` | Enable warnings with false positives many cases that still need to be fixed. | | `SET_OPTIMIZATION_FLAGS` | `ON` | Adjust compiler optimization flags. | | `CXX_STD_VERSION` | `2017` | Maximum C++ standard version to enable. | | `USE_DYNAMIC_UTIMENSAT` | `OFF` | Dynamically load utimensat(2) if not available at compile time. | | `USE_STATIC_LIBS` | `OFF`³ | Turns on static linking for all libraries, using `-static` with MinGW and `-static-libgcc` / `-static-libstdc++` with other GCC-like toolchains. You can also use the individual options below: | | `LZMA_USE_STATIC_LIBS` | `OFF`⁴ | Statically link `liblzma`. | | `Boost_USE_STATIC_LIBS` | `OFF`⁴ | Statically link Boost. See also `FindBoost.cmake`. | | `ZLIB_USE_STATIC_LIBS` | `OFF`⁴ | Statically link `libz`. (used via Boost) | | `BZip2_USE_STATIC_LIBS` | `OFF`⁴ | Statically link `libbz2`. (used via Boost) | | `iconv_USE_STATIC_LIBS` | `OFF`⁴ | Statically link `libiconv`. | | `STRICT_USE` | `OFF` | Abort if there are missing optional dependencies. | | `DEVELOPER` | `OFF` | Enable build options suitable for developers⁵. | | `FASTLINK` | `OFF`⁶ | Optimize for link speed. | | `USE_LTO` | `ON`² | Use link-time code generation. | | `USE_LD` | `best`⁸ | Linker to use - `default`, `mold`, `lld`, `gold`, `bfd` or `best` | | `BUILD_TESTS` | `OFF`⁶ | Build unit tests that can be run using `make check` | | `RUN_TESTS` | `OFF`⁷ | Automatically run tests | | `RUN_TARGET` | (none) | Wrapper to run binaries produced in the build process | 1. The builtin charset conversion only supports Windows-1252 and UTF-16LE. This is normally enough for filenames, but custom message strings (which can be included in filenames) may use arbitrary encodings. 2. Enabled automatically if `CMAKE_BUILD_TYPE` is set to `Debug`. 3. Under Windows, the default is `ON`. 4. Default is `ON` if `USE_STATIC_LIBS` is enabled. 5. Currently this and enables `DEBUG`, `BUILD_TESTS`, `RUN_TESTS` and `FASTLINK` for faster incremental builds and improved debug output, unless those options have been explicitly specified by the user. 6. Enabled automatically if `DEVELOPER` is enabled. 7. Enabled automatically if `DEVELOPER` is enabled unless cross-compiling without `RUN_TARGET` set 8. Disabled automatically (set to `default`) if both `SET_OPTIMIZATION_FLAGS` and `FASTLINK` are disabled. `best` will select the most suited linker based on availability and other settings such as `USE_LTO`. Install options: | 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). | Set options by passing `-D