mirror of
https://github.com/libretro/RetroArch
synced 2024-12-26 21:29:08 +00:00
iOS: Last bits of iOS 12 support, including loading an older MoltenVK library (#16982)
This commit is contained in:
parent
c961e79a0c
commit
cfbfd01f38
@ -2329,7 +2329,10 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk,
|
||||
#ifdef _WIN32
|
||||
vulkan_library = dylib_load("vulkan-1.dll");
|
||||
#elif __APPLE__
|
||||
vulkan_library = dylib_load("MoltenVK");
|
||||
if (__builtin_available(macOS 10.15, iOS 13, tvOS 12, *))
|
||||
vulkan_library = dylib_load("MoltenVK");
|
||||
if (!vulkan_library)
|
||||
vulkan_library = dylib_load("MoltenVK-v1.2.7.framework");
|
||||
#else
|
||||
vulkan_library = dylib_load("libvulkan.so.1");
|
||||
if (!vulkan_library)
|
||||
|
@ -637,7 +637,7 @@ static bool cocoa_input_set_sensor_state(void *data, unsigned port,
|
||||
return false;
|
||||
|
||||
#ifdef HAVE_MFI
|
||||
if (@available(iOS 14.0, macOS 11.0, *))
|
||||
if (@available(iOS 14.0, macOS 11.0, tvOS 14.0, *))
|
||||
{
|
||||
for (GCController *controller in [GCController controllers])
|
||||
{
|
||||
|
@ -1943,7 +1943,7 @@
|
||||
INFOPLIST_KEY_CFBundleDisplayName = RetroArch;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment";
|
||||
IOS_BUNDLE_IDENTIFIER = com.libretro.RetroArchiOS11;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(PROJECT_DIR)/iOS/modules",
|
||||
"@executable_path/Frameworks",
|
||||
@ -2005,7 +2005,7 @@
|
||||
INFOPLIST_KEY_CFBundleDisplayName = RetroArch;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment";
|
||||
IOS_BUNDLE_IDENTIFIER = com.libretro.RetroArchiOS11;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(PROJECT_DIR)/iOS/modules",
|
||||
"@executable_path/Frameworks",
|
||||
|
@ -17,5 +17,5 @@ IOS_CODE_SIGN_ENTITLEMENTS = iOS/RetroArchiOS.entitlements
|
||||
TVOS_CODE_SIGN_ENTITLEMENTS = tvOS/RetroArchTV.entitlements
|
||||
TVOS_TOPSHELF_CODE_SIGN_ENTITLEMENTS = tvOS/RetroArchTopShelf.entitlements
|
||||
|
||||
RA_IPHONEOS_DEPLOYMENT_TARGET = 14.2
|
||||
RA_IPHONEOS_DEPLOYMENT_TARGET = 12.0
|
||||
TVOS_DEPLOYMENT_TARGET = 14.2
|
||||
|
@ -41,6 +41,10 @@ for dylib in $(find "$BASE_DIR"/modules -maxdepth 1 -type f -regex '.*libretro.*
|
||||
fwDir="${OUTDIR}/${fwName}.framework"
|
||||
mkdir -p "$fwDir"
|
||||
lipo -create "$dylib" -output "$fwDir/$fwName"
|
||||
if [ "$PLATFORM_FAMILY_NAME" = "iOS" ] ; then
|
||||
build_sdk=$(vtool -show-build "$dylib" | grep sdk | awk '{print $2}')
|
||||
vtool -set-version-min ios "${IPHONEOS_DEPLOYMENT_TARGET}" "${build_sdk}" -replace -output "$fwDir/$fwName" "$fwDir/$fwName"
|
||||
fi
|
||||
sed -e "s,%CORE%,$fwName," -e "s,%BUNDLE%,$fwName," -e "s,%IDENTIFIER%,$fwName," iOS/fw.tmpl > "$fwDir/Info.plist"
|
||||
echo "signing $fwName"
|
||||
codesign --force --verbose --sign "${CODE_SIGN_IDENTITY_FOR_ITEMS}" "$fwDir"
|
||||
@ -60,3 +64,11 @@ if [ -d "${MOLTENVK_XCFRAMEWORK}/${MVK_PLATFORM_SUBDIR}/MoltenVK.framework" ] ;
|
||||
cp -r "${MOLTENVK_XCFRAMEWORK}/${MVK_PLATFORM_SUBDIR}/MoltenVK.framework" "${OUTDIR}"
|
||||
codesign --force --verbose --sign "${CODE_SIGN_IDENTITY_FOR_ITEMS}" "${OUTDIR}/MoltenVK.framework"
|
||||
fi
|
||||
|
||||
# iOS 12 needs an older version of MoltenVK
|
||||
if [ -n "$MOLTENVK_LEGACY_XCFRAMEWORK_PATH" -a -d "${MOLTENVK_LEGACY_XCFRAMEWORK_PATH}/${MVK_PLATFORM_SUBDIR}/MoltenVK-${MOLTENVK_LEGACY_VERSION}.framework" ] ; then
|
||||
echo copying legacy moltenvk from "${MOLTENVK_LEGACY_XCFRAMEWORK_PATH}/${MVK_PLATFORM_SUBDIR}/MoltenVK-${MOLTENVK_LEGACY_VERSION}.framework"
|
||||
cp -r "${MOLTENVK_LEGACY_XCFRAMEWORK_PATH}/${MVK_PLATFORM_SUBDIR}/MoltenVK-${MOLTENVK_LEGACY_VERSION}.framework" "${OUTDIR}"
|
||||
codesign --force --verbose --sign "${CODE_SIGN_IDENTITY_FOR_ITEMS}" "${OUTDIR}/MoltenVK-${MOLTENVK_LEGACY_VERSION}.framework/MoltenVK-${MOLTENVK_LEGACY_VERSION}"
|
||||
codesign --force --verbose --sign "${CODE_SIGN_IDENTITY_FOR_ITEMS}" "${OUTDIR}/MoltenVK-${MOLTENVK_LEGACY_VERSION}.framework"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user