CMake: Add IOS_APP_STORE build option, which will enable required restrictions.

This commit is contained in:
Henrik Rydgård 2024-05-02 17:15:23 +02:00
parent 830f3a5fe6
commit 45f094569a
3 changed files with 20 additions and 0 deletions

View File

@ -134,6 +134,13 @@ else()
message("Normal Build")
endif()
if(IOS_APP_STORE)
add_definitions(-DPPSSPP_PLATFORM_IOS_APP_STORE)
message("iOS App Store build")
else()
message("iOS sideload build")
endif()
# User-editable options (go into CMakeCache.txt)
# :: Processors
option(ARMV7 "Set to ON if targeting an ARMv7 processor" ${ARMV7_DEVICE})

View File

@ -1269,11 +1269,13 @@ void MainScreen::CreateViews() {
if (!vertical) {
rightColumnChoices->Add(new Choice(mm->T("www.ppsspp.org")))->OnClick.Handle(this, &MainScreen::OnPPSSPPOrg);
#if !PPSSPP_PLATFORM(IOS_APP_STORE)
if (!System_GetPropertyBool(SYSPROP_APP_GOLD) && (System_GetPropertyInt(SYSPROP_DEVICE_TYPE) != DEVICE_TYPE_VR)) {
Choice *gold = rightColumnChoices->Add(new Choice(mm->T("Buy PPSSPP Gold")));
gold->OnClick.Handle(this, &MainScreen::OnSupport);
gold->SetIcon(ImageID("I_ICONGOLD"), 0.5f);
}
#endif
}
rightColumnChoices->Add(new Spacer(25.0));

11
b-appstore.sh Executable file
View File

@ -0,0 +1,11 @@
# Build script for iOS app store
mkdir build-ios
pushd build-ios
cmake .. -DIOS_APP_STORE=ON -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchains/ios.cmake -DIOS_PLATFORM=OS -GXcode
# TODO: Get a MoltenVK somewhere.
#cp ../MoltenVK/iOS/Frameworks/libMoltenVK.dylib PPSSPP.app/Frameworks
popd
# To open the xcode project:
# open build-ios/PPSSPP.xcodeproj