mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-21 18:29:05 +02:00
The iOS and tvOS apps no longer link the static MoltenVK (the ios/MoltenVK submodule is gone), so Vulkan can't load there and Metal is the only backend. Without the static case, Vulkan's functions are now always loaded at runtime (PPSSPP_VK_STATIC is gone). The Mac app no longer bundles libMoltenVK.dylib (ext/vulkan/macOS is gone). Metal is the default on Apple Silicon (Intel Macs stay on OpenGL), but Vulkan still works with a separately installed MoltenVK, the Vulkan SDK's or Homebrew's, which is useful for comparisons. A saved Vulkan setting falls back to the default when there's none. The libretro cores are unchanged: they get MoltenVK from the frontend. frametests.py's --ios and --adb default to Metal on a Mac host. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
56 lines
1.9 KiB
Bash
Executable File
56 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "SDL macbundle.sh"
|
|
|
|
PPSSPP="${1}"
|
|
PPSSPP_SHORTNAME="${2}"
|
|
PPSSPPSDL="${PPSSPP}/Contents/MacOS/${PPSSPP_SHORTNAME}"
|
|
|
|
ls ${PPSSPPSDL}
|
|
|
|
if [ ! -f "${PPSSPPSDL}" ]; then
|
|
echo "No such file: ${PPSSPPSDL}!"
|
|
exit 0
|
|
fi
|
|
|
|
echo pwd=`pwd`
|
|
echo PPSSPP=$PPSSPP
|
|
echo PPSSPPSDL=$PPSSPPSDL
|
|
|
|
cd "$(dirname "$0")"
|
|
RPATH="$(pwd)/macOS"
|
|
cd -
|
|
echo RPATH=$RPATH
|
|
SDL="${RPATH}/SDL2.framework"
|
|
if [ ! -d "${SDL}" ]; then
|
|
echo "Cannot locate SDL.framework: ${SDL}!"
|
|
exit 0
|
|
fi
|
|
|
|
rm -rf "${PPSSPP}/Contents/Frameworks/SDL2.framework" || exit 0
|
|
mkdir -p "${PPSSPP}/Contents/Frameworks" || exit 0
|
|
cp -a "$SDL" "${PPSSPP}/Contents/Frameworks" || exit 0
|
|
echo install_name_tool -rpath "${RPATH}" "@executable_path/../Frameworks" "${PPSSPPSDL}" || echo "Already patched."
|
|
install_name_tool -rpath "${RPATH}" "@executable_path/../Frameworks" "${PPSSPPSDL}" || echo "Already patched."
|
|
|
|
echo "Done."
|
|
|
|
GIT_VERSION_LINE=$(grep "PPSSPP_GIT_VERSION = " "$(dirname "${0}")/../build/git-version.cpp")
|
|
|
|
echo "Setting version to '${GIT_VERSION_LINE}'..."
|
|
SHORT_VERSION_MATCH='.*"v([0-9\.]+(-[0-9]+)?).*";'
|
|
LONG_VERSION_MATCH='.*"v(.*)";'
|
|
if [[ "${GIT_VERSION_LINE}" =~ ^${SHORT_VERSION_MATCH}$ ]]; then
|
|
plutil -replace CFBundleShortVersionString -string $(echo ${GIT_VERSION_LINE} | perl -pe "s/${SHORT_VERSION_MATCH}/\$1/g") ${PPSSPP}/Contents/Info.plist
|
|
plutil -replace CFBundleVersion -string $(echo ${GIT_VERSION_LINE} | perl -pe "s/${LONG_VERSION_MATCH}/\$1/g") ${PPSSPP}/Contents/Info.plist
|
|
else
|
|
plutil -replace CFBundleShortVersionString -string "" ${PPSSPP}/Contents/Info.plist
|
|
plutil -replace CFBundleVersion -string "" ${PPSSPP}/Contents/Info.plist
|
|
fi
|
|
|
|
# AdHoc codesign is required for Apple Silicon.
|
|
echo "Signing..."
|
|
|
|
codesign -fs - --entitlements ../macOS/Entitlements.plist --timestamp "${PPSSPPSDL}" || echo "Failed signing PPSSPPSDL"
|
|
codesign -fs - --entitlements ../macOS/Entitlements.plist --timestamp "${PPSSPP}" || echo "Failed signing PPSSPP"
|