From 45f094569a1b61b9f8d0bc482fab707dd95e33a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 2 May 2024 17:15:23 +0200 Subject: [PATCH] CMake: Add IOS_APP_STORE build option, which will enable required restrictions. --- CMakeLists.txt | 7 +++++++ UI/MainScreen.cpp | 2 ++ b-appstore.sh | 11 +++++++++++ 3 files changed, 20 insertions(+) create mode 100755 b-appstore.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d1207d5c1..739393c178 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}) diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 751cf8cd5a..4a8b032a74 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -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)); diff --git a/b-appstore.sh b/b-appstore.sh new file mode 100755 index 0000000000..079a4b2340 --- /dev/null +++ b/b-appstore.sh @@ -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 \ No newline at end of file