name: Build Windows on: workflow_dispatch: env: QT_VERSION: "6.7.2" GO_VERSION: "1.23.0" LIBPLIST_VER: "2.7.0" LIBTATSU_VER: "1.0.5" LIBIMOBILEDEVICE_GLUE_VER: "1.3.2" LIBIMOBILEDEVICE_VER: "1.4.0" LIBIRECOVERY_VER: "1.3.1" LIBUSBMUXD_VER: "2.1.1" jobs: build-windows: runs-on: windows-2022 defaults: run: shell: msys2 {0} steps: - name: Checkout repository uses: actions/checkout@v4 with: submodules: "recursive" token: ${{ secrets.PAT }} - name: Setup MSYS2 uses: msys2/setup-msys2@v2 with: msystem: mingw64 release: false update: false install: >- coreutils base-devel git mingw-w64-x86_64-gcc make libtool autoconf automake-wrapper mingw-w64-x86_64-cmake mingw-w64-x86_64-qt6-base mingw-w64-x86_64-qt6-svg mingw-w64-x86_64-qt6-multimedia mingw-w64-x86_64-qt6-location mingw-w64-x86_64-qt6-positioning mingw-w64-x86_64-qt6-serialport mingw-w64-x86_64-pugixml mingw-w64-x86_64-libusb mingw-w64-x86_64-qrencode mingw-w64-x86_64-curl mingw-w64-x86_64-openssl mingw-w64-x86_64-libzip mingw-w64-x86_64-go mingw-w64-x86_64-nsis p7zip mingw-w64-x86_64-gstreamer mingw-w64-x86_64-gst-plugins-base mingw-w64-x86_64-gst-plugins-good mingw-w64-x86_64-gst-plugins-bad mingw-w64-x86_64-gst-plugins-ugly mingw-w64-x86_64-gst-libav - name: Setup .NET SDK uses: actions/setup-dotnet@v4 with: dotnet-version: "8.x" - name: Install WiX Toolset shell: pwsh run: dotnet tool install --global wix - name: Download and Extract Bonjour SDK run: | wget "https://gsf-fl.softonic.com/b18/d44/cbdcd43ad683cf6760d45ce891c3035044/bonjoursdksetup.exe?Expires=1761322683&Signature=7ffbc70604387c58f196c962d9e54e890e3aadd0&url=https://bonjour.en.softonic.com/&Filename=bonjoursdksetup.exe" -O bonjour-sdk.exe EXPECTED_HASH="4ff2aae8205aec31b06743782cfcadce" ACTUAL_HASH=$(md5sum bonjour-sdk.exe | awk '{print $1}') echo "Expected MD5: $EXPECTED_HASH" echo "Actual MD5: $ACTUAL_HASH" if [ "$ACTUAL_HASH" != "$EXPECTED_HASH" ]; then echo "::error::Checksum mismatch!" exit 1 fi echo "Checksum verified. Extracting installer..." 7z x bonjour-sdk.exe -oBonjourInstaller - name: Install Bonjour Runtime shell: powershell run: | $currentPath = Get-Location $msiFilePath = Join-Path -Path $currentPath -ChildPath "BonjourInstaller\Bonjour64.msi" $msiexecArguments = "/i `"$msiFilePath`" /qn" Write-Host "Installing Bonjour Runtime..." Start-Process msiexec -ArgumentList $msiexecArguments -NoNewWindow -Wait - name: Install Bonjour SDK shell: powershell run: | $currentPath = Get-Location $msiFilePath = Join-Path -Path $currentPath -ChildPath "BonjourInstaller\BonjourSDK64.msi" $msiexecArguments = "/i `"$msiFilePath`" /qn" Write-Host "Installing Bonjour SDK..." Start-Process msiexec -ArgumentList $msiexecArguments -NoNewWindow -Wait "BONJOUR_SDK_HOME=C:/Program Files/Bonjour SDK" | Out-File -FilePath $env:GITHUB_ENV -Append - name: Build libimobiledevice suite (versioned tarballs) run: | set -euo pipefail workspace="$PWD" tmp="$PWD/_tmp_libs" mkdir -p "$tmp" cd "$tmp" base_url="https://github.com/libimobiledevice" libs=( "libplist" "libtatsu" "libimobiledevice-glue" "libimobiledevice" "libirecovery" "libusbmuxd" ) for name in "${libs[@]}"; do ver_var=$(echo "${name^^}_VER" | sed 's/-/_/g') ver="${!ver_var:-}" if [ -z "$ver" ]; then echo "Version for $name not set (env var $ver_var)" exit 1 fi archive="${name}-${ver}.tar.bz2" url="${base_url}/${name}/releases/download/${ver}/${archive}" echo "=== Processing $name $ver ===" echo "URL: $url" curl -L -o "$archive" "$url" echo "Extracting $archive" tar xjf "$archive" srcdir="${name}-${ver}" pushd "$srcdir" ./configure --without-cython make -j"$(nproc)" make install popd echo "Installed $name $ver" done # cleanup cd "$workspace" rm -rf "$tmp" - name: Configure CMake run: | cmake -B build -S . -DCMAKE_BUILD_TYPE=Release - name: Build with CMake run: cmake --build build --config Release - name: Install & CPack working-directory: build run: | cmake --install . cpack . - name: Upload Artifact uses: actions/upload-artifact@v4 with: name: iDescriptor-Windows-Installer path: build/artifacts/*