The ffmpeg submodule held prebuilt libraries for every platform next to the sources (about 1.5 GB checked out), and nothing uses those any more. Only the needed sources are copied in, from the submodule's commit, along with every header and template they include. The path is new, so checking out commits on either side of this works. It's also cut down to what PPSSPP uses: the H.264, AAC, MP3, ATRAC3 and ATRAC3+ decoders, the H.264 parser, the demuxers as before, and the FFV1 encoder, AVI muxer and file protocol for AVI dumping. config.h takes its CONFIG_ values from FFmpeg 3.0.2's own configure run with just those enabled. The raw H.264 demuxer stays even though nothing opens raw H.264: probing PSMF data uses it to identify the video stream's codec, which otherwise comes out as none. On top of that: - The files nothing links (configure would build them, but they're never pulled out of the static library, going by the GCC link map) are left out: mostly libavutil's crypto and hashing and the alternative DCT/IDCT/FFT versions. - libswresample isn't built, now that nothing uses it. - The H.264 decoder only does 8-bit video, which is all the PSP has. The SPS parser rejects any other bit depth, and the DSP files no longer build their 9- to 16-bit variants, which the linker kept because the init functions pick one by bit depth at run time. That's 160 files to compile instead of 277, and 391 of FFmpeg's vendored, about 5.8 MB. The README in ext/ffmpeg has what was done, the PPSSPP patches in the copy, how to add a component, and the tradeoffs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Updating with a self-built MoltenVK
Probably won't be needed again.
cp -r ../dev/build-molten/MoltenVK/Package/Release/MoltenVK/static/MoltenVK.xcframework ios/MoltenVK
The Old iOS Build Instructions
Important Notes
These instructions have not been updated for a long time and may be outdated.
Prerequisites:
- Xcode (from the Mac App Store) with command line tools installed
- MacPorts (from macports.org); easiest to install with their package installers
- cmake build system (from MacPorts); run "sudo port install cmake" from the command line
If you need to build ffmpeg yourself too, then you'll also need:
-
gas-preprocessor; download the zip from https://github.com/mansr/gas-preprocessor, unzip and from the command line run:
sudo cp gas-preprocessor.pl /usr/bin/ sudo chmod +rw /usr/bin/gas-preprocessor.pl -
you may need pkg-config (from MacPorts); run "sudo port install pkgconfig" from the command line
Most of this is done from the command line:
Change directory to wherever you want to install ppsspp (eg. "cd ~"), and then clone the main ppsspp repository:
git clone https://github.com/hrydgard/ppsspp.git
Change directory to the newly created ppsspp directory and run:
git submodule update --init
The above command will pull in the submodules required by PPSSPP, such as the lang directory. FFmpeg is built as part of PPSSPP, from ext/ffmpeg.
Then do the following:
mkdir build-ios
cd build-ios
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchains/ios.cmake -GXcode ..
You now should have an Xcode project file in the build-ios directory named PPSSPP.xcodeproj. Open it up in Xcode and do Product->Build to build the debug version, or Product->Build For->Archiving to build the release version (which is much faster). If your iOS device is plugged in, you may be able to just Run in Xcode to install and test it. Otherwise, copy the PPSSPP app from build-ios/Debug-iphoneos/PPSSPP.app or build-ios/Release-iphoneos/PPSSPP.app to the /Applications directory on your device and from ssh or MobileTerminal do a "chmod +x PPSSPP" inside the PPSSPP.app directory. If this is the first time you've installed the PPSSPP app, you'll have to respring or restart your device for the icon to show up.