mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-21 19:35:49 +08:00
fix(build): add libarchive dependency and improve WinFsp installation retries
This commit is contained in:
@@ -68,6 +68,7 @@ jobs:
|
||||
mingw-w64-x86_64-gst-plugins-ugly
|
||||
mingw-w64-x86_64-gst-libav
|
||||
mingw-w64-x86_64-libheif
|
||||
mingw-w64-x86_64-libarchive
|
||||
|
||||
- uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
@@ -92,7 +93,31 @@ jobs:
|
||||
- name: Install WinFsp
|
||||
shell: pwsh
|
||||
run: |
|
||||
choco install winfsp -y
|
||||
$maxRetries = 3
|
||||
$retryDelaySeconds = 10
|
||||
$attempt = 0
|
||||
$success = $false
|
||||
|
||||
while ($attempt -lt $maxRetries -and -not $success) {
|
||||
$attempt++
|
||||
Write-Host "Attempt $attempt to install WinFsp..."
|
||||
choco install winfsp -y
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Host "WinFsp installed successfully on attempt $attempt."
|
||||
$success = $true
|
||||
} else {
|
||||
Write-Warning "WinFsp installation failed on attempt $attempt (exit code: $LASTEXITCODE)."
|
||||
if ($attempt -lt $maxRetries) {
|
||||
Write-Host "Retrying in $retryDelaySeconds seconds..."
|
||||
Start-Sleep -Seconds $retryDelaySeconds
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $success) {
|
||||
Write-Error "Failed to install WinFsp after $maxRetries attempts."
|
||||
exit 1 # Explicitly fail the step if all retries fail
|
||||
}
|
||||
|
||||
- name: Download and Extract Bonjour SDK
|
||||
run: |
|
||||
|
||||
+9
-1
@@ -1,6 +1,10 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(iDescriptor VERSION 0.1.2 LANGUAGES CXX)
|
||||
|
||||
if(WIN32)
|
||||
set(PKG_CONFIG_EXECUTABLE "C:/msys64/mingw64/bin/pkg-config.exe" CACHE FILEPATH "" FORCE)
|
||||
endif()
|
||||
|
||||
# Feature options
|
||||
option(ENABLE_RECOVERY_DEVICE_SUPPORT "Enable recovery device support (requires libirecovery)" ON)
|
||||
set(PACKAGE_MANAGER_HINT "" CACHE STRING "Name of package manager(s) used to manage this build (e.g. paru, yay, pamac)")
|
||||
@@ -115,11 +119,14 @@ find_library(TATSU_LIBRARY
|
||||
REQUIRED
|
||||
)
|
||||
|
||||
# Add QR code generation library
|
||||
pkg_check_modules(QRENCODE REQUIRED IMPORTED_TARGET libqrencode)
|
||||
pkg_check_modules(HEIF REQUIRED IMPORTED_TARGET libheif)
|
||||
pkg_check_modules(ZIP REQUIRED IMPORTED_TARGET libzip)
|
||||
|
||||
if(WIN32)
|
||||
pkg_check_modules(LIBARCHIVE REQUIRED IMPORTED_TARGET libarchive)
|
||||
endif()
|
||||
|
||||
# Add FFmpeg libraries for video thumbnail generation
|
||||
pkg_check_modules(AVFORMAT REQUIRED IMPORTED_TARGET libavformat)
|
||||
pkg_check_modules(AVCODEC REQUIRED IMPORTED_TARGET libavcodec)
|
||||
@@ -304,6 +311,7 @@ if(APPLE)
|
||||
${CORE_SERVICES_FRAMEWORK})
|
||||
message(STATUS "Using macOS Bonjour framework for network service discovery")
|
||||
elseif (WIN32)
|
||||
target_link_libraries(iDescriptor PRIVATE PkgConfig::LIBARCHIVE)
|
||||
find_path(DNSSD_INCLUDE_DIR dns_sd.h HINTS ${BONJOUR_SDK}/Include )
|
||||
# $<$<COMPILE_LANGUAGE:CXX> fixes winres compiler errors
|
||||
target_include_directories(iDescriptor PRIVATE
|
||||
|
||||
+1
-1
Submodule lib/uxplay updated: bd5e2de5c2...f8459c25ec
Reference in New Issue
Block a user