mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-22 03:45:51 +08:00
fix Windows build
- Updated README.md to include CMake command for installation. - Improved win-deploy.cmake to handle executable path issues and added detailed logging for deployment steps. - Introduced checks for runtime dependencies and optimized DLL copying logic to avoid unnecessary copies. - Added additional MinGW runtime DLLs required for GStreamer and FFmpeg. - Created idescriptor.rc for application versioning and resource management. - Updated resources.qrc to include application icon. - Modified AppsWidget to improve UI for install and download actions. - Adjusted dnssd_service.h to conditionally include headers based on platform. - Enhanced install_ipa.cpp with additional includes for better compatibility. - Updated main.cpp to set up environment variables for GStreamer on Windows. - Improved mainwindow.cpp to add a no devices detected page and integrate dependency checks. - Cleaned up mainwindow.ui by removing unnecessary layout elements. - Implemented check_deps.cpp and check_deps.h for verifying required dependencies on Windows. - Created diagnose_dialog.cpp and diagnose_dialog.h for a dialog to display dependency checks. - Developed diagnose_widget.cpp and diagnose_widget.h to manage and display dependency items. - Enhanced sshterminalwidget.cpp to improve terminal handling on Windows. - Updated welcomewidget.cpp to refine UI layout and spacing for better aesthetics.
This commit is contained in:
@@ -0,0 +1,173 @@
|
||||
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
|
||||
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=1757906571&Signature=af8dfce8a002130f34c0e93e17b8dd96d547ff69&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/*
|
||||
Reference in New Issue
Block a user