Skip to content

Commit a7a590e

Browse files
committed
Fix missing frameworks on build
1 parent df5b5ee commit a7a590e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

scripts/build.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,33 @@ function notarize_package() {
519519

520520
print_success "Notarized executable is ready for distribution"
521521

522+
# Ensure Frameworks directory exists for final package
523+
print_info "Preparing Frameworks directory for final package..."
524+
if [ ! -d "${BUILD_OUTPUT_DIR}/Frameworks" ]; then
525+
print_info "Frameworks directory not found, recreating from XCFrameworks..."
526+
mkdir -p "${BUILD_OUTPUT_DIR}/Frameworks"
527+
528+
# Extract frameworks from XCFrameworks for deployment
529+
for xcframework in "${BUILD_OUTPUT_DIR}/XCFrameworks"/*.xcframework; do
530+
if [ -d "$xcframework" ]; then
531+
local framework_name=$(basename "$xcframework" .xcframework)
532+
print_info "Extracting ${framework_name}.framework from XCFramework..."
533+
534+
# Find the macOS framework inside the XCFramework
535+
local macos_framework=$(find "$xcframework" -name "${framework_name}.framework" -path "*/macos-*" | head -1)
536+
if [ -d "$macos_framework" ]; then
537+
cp -R "$macos_framework" "${BUILD_OUTPUT_DIR}/Frameworks/"
538+
print_info "Copied ${framework_name}.framework to Frameworks directory"
539+
else
540+
print_warning "Could not find macOS framework in ${xcframework}"
541+
fi
542+
fi
543+
done
544+
print_success "Frameworks directory recreated from XCFrameworks"
545+
else
546+
print_info "Frameworks directory already exists"
547+
fi
548+
522549
# Create final deployment package in temporary directory
523550
print_info "Creating final deployment package..."
524551
local final_package_name="AXe-Final-$(date +%Y%m%d-%H%M%S)"

0 commit comments

Comments
 (0)