Skip to content

Commit

Permalink
tvOS: Fix creation of frameworks for App Store build
Browse files Browse the repository at this point in the history
  • Loading branch information
warmenhoven committed Oct 2, 2024
1 parent d5c6a4f commit 8ae1729
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/apple/iOS/fw.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>MinimumOSVersion</key>
<string>14.2</string>
<string>12.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand Down
10 changes: 8 additions & 2 deletions pkg/apple/make-frameworks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ echo "${CODE_SIGN_IDENTITY_FOR_ITEMS}"
if [ "$PLATFORM_FAMILY_NAME" = "tvOS" ] ; then
BASE_DIR="tvOS"
SUFFIX="_tvos"
PLATFORM="tvos"
DEPLOYMENT_TARGET="${TVOS_DEPLOYMENT_TARGET}"
elif [ "$PLATFORM_FAMILY_NAME" = "iOS" ] ; then
BASE_DIR="iOS"
SUFFIX="_ios"
PLATFORM="ios"
DEPLOYMENT_TARGET="${IPHONEOS_DEPLOYMENT_TARGET}"
elif [ "$PLATFORM_FAMILY_NAME" = "macOS" ] ; then
BASE_DIR="OSX"
SUFFIX=
PLATFORM=
DEPLOYMENT_TARGET=
fi

if [ -n "$BUILT_PRODUCTS_DIR" -a -n "$FRAMEWORKS_FOLDER_PATH" ] ; then
Expand All @@ -40,9 +46,9 @@ for dylib in $(find "$BASE_DIR"/modules -maxdepth 1 -type f -regex '.*libretro.*

fwDir="${OUTDIR}/${fwName}.framework"
mkdir -p "$fwDir"
if [ "$PLATFORM_FAMILY_NAME" = "iOS" ] ; then
if [ "$PLATFORM_FAMILY_NAME" = "iOS" -o "$PLATFORM_FAMILY_NAME" = "tvOS" ] ; then
build_sdk=$(vtool -show-build "$dylib" | grep sdk | awk '{print $2}')
vtool -set-build-version ios "${IPHONEOS_DEPLOYMENT_TARGET}" "${build_sdk}" -set-source-version 0.0 -replace -output "$dylib" "$dylib"
vtool -set-build-version "${PLATFORM}" "${DEPLOYMENT_TARGET}" "${build_sdk}" -set-build-tool "$PLATFORM" ld 1115.7.3 -set-source-version 0.0 -replace -output "$dylib" "$dylib"
fi
lipo -create "$dylib" -output "$fwDir/$fwName"
sed -e "s,%CORE%,$fwName," -e "s,%BUNDLE%,$fwName," -e "s,%IDENTIFIER%,$fwName," iOS/fw.tmpl > "$fwDir/Info.plist"
Expand Down

0 comments on commit 8ae1729

Please sign in to comment.