Create a .xcassets folder for the icons, link it properly

This commit is contained in:
Henrik Rydgård 2024-05-07 21:48:56 +02:00
parent b1f6647fa6
commit 27f9bd0919
9 changed files with 71 additions and 24 deletions

View File

@ -2782,7 +2782,12 @@ if(TargetBin)
endif()
if(IOS)
add_executable(${TargetBin} MACOSX_BUNDLE ${ICON_PATH_ABS} ${NativeAssets} ${BigFontAssets} ${SHADER_FILES} ${THEME_FILE} ${DEBUGGER_FILES} ${FLASH0_FILES} ${LANG_FILES} ${NativeAppSource} "ios/Settings.bundle" "ios/Launch Screen.storyboard")
set(AssetCatalog "")
if(IOS_APP_STORE)
message("Adding asset catalog to build")
set(AssetCatalog "${CMAKE_SOURCE_DIR}/ios/assets.xcassets")
endif()
add_executable(${TargetBin} MACOSX_BUNDLE ${ICON_PATH_ABS} ${NativeAssets} ${BigFontAssets} ${AssetCatalog} ${SHADER_FILES} ${THEME_FILE} ${DEBUGGER_FILES} ${FLASH0_FILES} ${LANG_FILES} ${NativeAppSource} "ios/Settings.bundle" "ios/Launch Screen.storyboard")
if(NOT IOS_APP_STORE)
file(INSTALL "${CMAKE_SOURCE_DIR}/ext/vulkan/iOS/Frameworks/libMoltenVK.dylib" DESTINATION "${CMAKE_BINARY_DIR}/PPSSPP.app/Frameworks/")
endif()
@ -2831,8 +2836,8 @@ if(IOS AND NOT LIBRETRO)
if(IOS_DEBUG)
file(INSTALL pspautotests DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/assets)
endif()
set(RSRC_XIB_FILES assets/Icon@2x.png)
set(RSRC_XIB_FILES "Launch Screen.storyboard")
set(RSRC_XIB_FILES assets/Icon@2x.png "Launch Screen.storyboard" ${CMAKE_CURRENT_SOURCE_DIR}/ios/assets.xcassets)
set_source_files_properties(${RSRC_XIB_FILES}
PROPERTIES MACOSX_PACKAGE_LOCATION Resources
)
@ -2849,12 +2854,12 @@ if(IOS AND NOT LIBRETRO)
if(GOLD)
set(BUNDLE_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/ios/PPSSPP-AppStoreGold.plist")
set(BUNDLE_IDENTIFIER "org.ppsspp.ppsspp-gold")
set(ICON_NAME "IconGold")
set(ICON_NAME "AppIconGold")
set(PRODUCT_NAME "PPSSPP")
else()
set(BUNDLE_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/ios/PPSSPP-AppStore.plist")
set(BUNDLE_IDENTIFIER "org.ppsspp.ppsspp-free")
set(ICON_NAME "Icon")
set(ICON_NAME "AppIcon")
set(PRODUCT_NAME "PPSSPP")
endif()
message(STATUS "DevTeam: ${DEVELOPMENT_TEAM_ID} Icon: ${ICON_NAME} Target: ${TargetBin}")
@ -2875,6 +2880,7 @@ if(IOS AND NOT LIBRETRO)
XCODE_GENERATE_SCHEME YES # Avoid the scheme bloat in XCode by only setting it to YES for this target.
RESOURCE "ios/Launch Screen.storyboard"
RESOURCE "ios/Settings.bundle"
RESOURCE "ios/assets.xcassets"
RESOURCE "ext/vulkan/iOS/Frameworks"
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER ${BUNDLE_IDENTIFIER}
XCODE_ATTRIBUTE_PRODUCT_NAME ${PRODUCT_NAME}

View File

@ -28,6 +28,16 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>assets</string>
</array>
</dict>
</dict>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
@ -50,13 +60,6 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleIconFiles</key>
<array>
<string>assets/Icon-72.png</string>
<string>assets/Icon-72@2x.png</string>
<string>assets/Icon.png</string>
<string>assets/Icon@2x.png</string>
</array>
<key>UILaunchImageFile</key>
<string>Default.png</string>
<key>UIFileSharingEnabled</key>

View File

@ -28,6 +28,16 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>assets</string>
</array>
</dict>
</dict>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
@ -50,22 +60,10 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleIconFiles</key>
<array>
<string>assets/IconGold-72.png</string>
<string>assets/IconGold-72@2x.png</string>
<string>assets/IconGold.png</string>
<string>assets/IconGold@2x.png</string>
</array>
<key>UILaunchImageFile</key>
<string>Default.png</string>
<key>UIFileSharingEnabled</key>
<true/>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UILaunchStoryboardName</key>
<string>Launch Screen</string>
<key>CFBundleDocumentTypes</key>

View File

@ -35,6 +35,8 @@
#include <sys/sysctl.h>
#include <mach/machine.h>
// This stuff reads directly from _gsEvent which is not allowed on the App Store.
#ifndef IS_IOS7
#define IS_IOS7 ([[UIDevice currentDevice].systemVersion floatValue]>=7.0)
#endif
@ -63,6 +65,8 @@
@implementation PPSSPPUIApplication
#if !PPSSPP_PLATFORM(IOS_APP_STORE)
- (void)decodeKeyEvent:(NSInteger *)eventMem {
NSInteger eventType = eventMem[GSEVENT_TYPE];
NSInteger eventScanCode = eventMem[GSEVENTKEY_KEYCODE];
@ -108,4 +112,6 @@
}
}
#endif // IOS_APP_STORE
@end

View File

@ -0,0 +1,14 @@
{
"images" : [
{
"filename" : "icon_backfill_1024.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

Before

Width:  |  Height:  |  Size: 141 KiB

After

Width:  |  Height:  |  Size: 141 KiB

View File

@ -0,0 +1,14 @@
{
"images" : [
{
"filename" : "icon_gold_backfill_1024.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 153 KiB

View File

@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}