From 5d028cb00449fe994dc3e5eb2579087d05c22d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 24 Apr 2023 14:44:07 +0200 Subject: [PATCH 1/7] Upgrade SDL for Mac This removes the option to use system SDL, which seems like a trap. Also simplifies the macbundle.sh script accordingly. Buildfix Buildfix fix Moar buildfix --- CMakeLists.txt | 32 +++++++++++++---------- SDL/SDLGLGraphicsContext.h | 8 +++++- SDL/SDLJoystick.h | 6 +++-- SDL/SDLMain.cpp | 8 ++++-- SDL/SDLMain.mm | 5 ++++ SDL/SDLVulkanGraphicsContext.cpp | 4 +++ SDL/SDLVulkanGraphicsContext.h | 6 +++++ SDL/macOS | 2 +- SDL/macbundle.sh | 45 ++++++++++++-------------------- headless/SDLHeadlessHost.cpp | 8 +++++- 10 files changed, 74 insertions(+), 50 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 267e7e662ea8..088f37d2cba5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,10 +107,6 @@ if(NOT IOS) list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/sdl) endif() -if(MACOSX AND NOT USE_SYSTEM_LIBSDL2) - set(SDL2_LIBRARY ${CMAKE_SOURCE_DIR}/SDL/macOS/SDL2.framework) -endif() - include(ccache) include(GNUInstallDirs) @@ -161,7 +157,7 @@ option(USE_ARMIPS "Build with armips support in API/debugger" ON) option(USE_SYSTEM_SNAPPY "Dynamically link against system snappy" ${USE_SYSTEM_SNAPPY}) option(USE_SYSTEM_FFMPEG "Dynamically link against system FFMPEG" ${USE_SYSTEM_FFMPEG}) option(USE_SYSTEM_LIBZIP "Dynamically link against system libzip" ${USE_SYSTEM_LIBZIP}) -option(USE_SYSTEM_LIBSDL2 "Dynamically link against system SDL2" ON) +option(USE_SYSTEM_LIBSDL2 "Dynamically link against system SDL2" ON) # Ignored on Mac option(USE_SYSTEM_LIBPNG "Dynamically link against system libpng" ON) option(USE_SYSTEM_ZSTD "Dynamically link against system zstd" ${USE_SYSTEM_ZSTD}) option(USE_SYSTEM_MINIUPNPC "Dynamically link against system miniUPnPc" ${USE_SYSTEM_MINIUPNPC}) @@ -241,9 +237,16 @@ if(USING_EGL) set(OPENGL_LIBRARIES ${OPENGL_LIBRARIES} ${EGL_LIBRARIES}) endif() -if(NOT LIBRETRO AND NOT IOS) +if(NOT LIBRETRO AND NOT IOS AND NOT MACOSX) find_package(SDL2) endif() + +if(MACOSX AND NOT IOS) + find_library(SDL2Fwk SDL2 REQUIRED PATHS SDL/macOS) + message(STATUS "found SDL2Fwk=${SDL2Fwk}") + add_definitions(-DHAVE_SYSCTLBYNAME) +endif() + include(FindThreads) if(APPLE) @@ -1252,7 +1255,8 @@ elseif(WIN32) else() link_directories(dx9sdk/Lib/x86) endif() -elseif(TARGET SDL2::SDL2) +elseif(LIBRETRO) +else() set(TargetBin PPSSPPSDL) # Require SDL add_definitions(-DSDL) @@ -1267,7 +1271,6 @@ elseif(TARGET SDL2::SDL2) SDL/SDLVulkanGraphicsContext.cpp ) endif() - set(nativeExtraLibs ${nativeExtraLibs} SDL2::SDL2) if(APPLE) set(nativeExtra ${nativeExtra} SDL/SDLMain.h @@ -1290,11 +1293,12 @@ elseif(TARGET SDL2::SDL2) set_source_files_properties(SDL/PPSSPPAboutViewController.m PROPERTIES COMPILE_FLAGS -fobjc-arc) set_source_files_properties(Common/Battery/AppleBatteryClient.m PROPERTIES COMPILE_FLAGS -fobjc-arc) set(nativeExtraLibs ${nativeExtraLibs} ${COCOA_LIBRARY} ${QUARTZ_CORE_LIBRARY} ${IOKIT_LIBRARY}) + set(nativeExtraLibs ${nativeExtraLibs} ${SDL2Fwk}) elseif(USING_EGL) - set(nativeExtraLibs ${nativeExtraLibs} pthread) + set(nativeExtraLibs ${nativeExtraLibs} pthread SDL2::SDL2) + else() + set(nativeExtraLibs ${nativeExtraLibs} SDL2::SDL2) endif() -elseif(NOT LIBRETRO) - message(FATAL_ERROR "Could not find SDL2. Failing.") endif() if(WIN32) @@ -2547,10 +2551,10 @@ if(TargetBin) else() add_executable(${TargetBin} MACOSX_BUNDLE ${ICON_PATH_ABS} ${NativeAssets} ${BigFontAssets} ${SHADER_FILES} ${THEME_FILE} ${DEBUGGER_FILES} ${FLASH0_FILES} ${LANG_FILES} ${NativeAppSource}) file(INSTALL "${CMAKE_SOURCE_DIR}/ext/vulkan/macOS/Frameworks/libMoltenVK.dylib" DESTINATION "${CMAKE_BINARY_DIR}/PPSSPPSDL.app/Contents/Frameworks/") - if(TARGET SDL2::SDL2 AND NOT USING_QT_UI) - add_custom_command(TARGET ${TargetBin} POST_BUILD COMMAND /bin/bash "${CMAKE_SOURCE_DIR}/SDL/macbundle.sh" "${CMAKE_BINARY_DIR}/PPSSPPSDL.app") - elseif(USING_QT_UI) + if(USING_QT_UI) add_custom_command(TARGET ${TargetBin} POST_BUILD COMMAND /bin/bash "${CMAKE_SOURCE_DIR}/Qt/macbundle.sh" "${CMAKE_BINARY_DIR}/PPSSPPQt.app") + else() + add_custom_command(TARGET ${TargetBin} POST_BUILD COMMAND /bin/bash "${CMAKE_SOURCE_DIR}/SDL/macbundle.sh" "${CMAKE_BINARY_DIR}/PPSSPPSDL.app") endif() endif() elseif(WIN32) diff --git a/SDL/SDLGLGraphicsContext.h b/SDL/SDLGLGraphicsContext.h index 06832470a795..95d627deda1f 100644 --- a/SDL/SDLGLGraphicsContext.h +++ b/SDL/SDLGLGraphicsContext.h @@ -1,5 +1,11 @@ -#include "SDL_syswm.h" +#include "ppsspp_config.h" +#if PPSSPP_PLATFORM(MAC) +#include "SDL2/SDL.h" +#include "SDL2/SDL_syswm.h" +#else #include "SDL.h" +#include "SDL_syswm.h" +#endif #include "Common/GPU/OpenGL/GLRenderManager.h" #include "Common/GPU/OpenGL/GLCommon.h" diff --git a/SDL/SDLJoystick.h b/SDL/SDLJoystick.h index 4ab237ae1235..d7494f829606 100644 --- a/SDL/SDLJoystick.h +++ b/SDL/SDLJoystick.h @@ -1,10 +1,12 @@ #pragma once #ifdef _MSC_VER #include "SDL/SDL.h" -#include "SDL/SDL_thread.h" +#else +#if PPSSPP_PLATFORM(MAC) +#include "SDL2/SDL.h" #else #include "SDL.h" -#include "SDL_thread.h" +#endif #endif #include diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp index 8a690407aadd..ce35297811e8 100644 --- a/SDL/SDLMain.cpp +++ b/SDL/SDLMain.cpp @@ -7,7 +7,13 @@ #include #include "ppsspp_config.h" +#if PPSSPP_PLATFORM(MAC) +#include "SDL2/SDL.h" +#include "SDL2/SDL_syswm.h" +#else #include "SDL.h" +#include "SDL_syswm.h" +#endif #include "SDL/SDLJoystick.h" SDLJoystick *joystick = NULL; @@ -35,8 +41,6 @@ SDLJoystick *joystick = NULL; #include "Common/GPU/OpenGL/GLRenderManager.h" #include "Common/Profiler/Profiler.h" -#include "SDL_syswm.h" - #if defined(VK_USE_PLATFORM_XLIB_KHR) #include #include diff --git a/SDL/SDLMain.mm b/SDL/SDLMain.mm index 4709e8f5f8b9..a53ccc375280 100644 --- a/SDL/SDLMain.mm +++ b/SDL/SDLMain.mm @@ -5,7 +5,12 @@ Feel free to customize this file to suit your needs */ +#include "ppsspp_config.h" +#if PPSSPP_PLATFORM(MAC) +#include "SDL2/SDL.h" +#else #include "SDL.h" +#endif #include "SDLMain.h" #include "Common/Profiler/Profiler.h" #include diff --git a/SDL/SDLVulkanGraphicsContext.cpp b/SDL/SDLVulkanGraphicsContext.cpp index 608ad3dbbd13..b46858068f43 100644 --- a/SDL/SDLVulkanGraphicsContext.cpp +++ b/SDL/SDLVulkanGraphicsContext.cpp @@ -10,7 +10,11 @@ #include "Common/Data/Text/Parsers.h" #include "Core/System.h" +#if PPSSPP_PLATFORM(MAC) +#include "SDL2/SDL_vulkan.h" +#else #include "SDL_vulkan.h" +#endif #include "SDLVulkanGraphicsContext.h" #if defined(VK_USE_PLATFORM_METAL_EXT) diff --git a/SDL/SDLVulkanGraphicsContext.h b/SDL/SDLVulkanGraphicsContext.h index f97b52876492..d309e685d5bc 100644 --- a/SDL/SDLVulkanGraphicsContext.h +++ b/SDL/SDLVulkanGraphicsContext.h @@ -1,5 +1,11 @@ +#include "ppsspp_config.h" +#if PPSSPP_PLATFORM(MAC) +#include "SDL2/SDL.h" +#include "SDL2/SDL_syswm.h" +#else #include "SDL.h" #include "SDL_syswm.h" +#endif #include "Common/GraphicsContext.h" #include "Common/GPU/Vulkan/VulkanContext.h" diff --git a/SDL/macOS b/SDL/macOS index f19a1d54b8a5..c387d93ab591 160000 --- a/SDL/macOS +++ b/SDL/macOS @@ -1 +1 @@ -Subproject commit f19a1d54b8a5af6cc378ea307e0ec676922eb4cc +Subproject commit c387d93ab5910b5a6be78b4840a5bbbc452f3ac8 diff --git a/SDL/macbundle.sh b/SDL/macbundle.sh index d54a0517ae39..b1ab6d5c8184 100755 --- a/SDL/macbundle.sh +++ b/SDL/macbundle.sh @@ -3,39 +3,25 @@ PPSSPP="${1}" PPSSPPSDL="${PPSSPP}/Contents/MacOS/PPSSPPSDL" +ls ${PPSSPPSDL} + if [ ! -f "${PPSSPPSDL}" ]; then echo "No such file: ${PPSSPPSDL}!" exit 0 fi -SDL=$(otool -L "${PPSSPPSDL}" | grep -v @executable_path | grep -Eo /.+libSDL.+dylib) -if [ "${SDL}" != "" ]; then - if [ ! -f "${SDL}" ]; then - echo "Cannot locate SDL: ${SDL}!" - exit 0 - fi - - echo "Installing SDL from ${SDL}..." - - SDLNAME=$(basename "${SDL}") - mkdir -p "${PPSSPP}/Contents/Frameworks" || exit 0 - cp -r "$SDL" "${PPSSPP}/Contents/Frameworks" || exit 0 - install_name_tool -change "${SDL}" "@executable_path/../Frameworks/${SDLNAME}" "${PPSSPPSDL}" || exit 0 -elif [ "$(otool -L "${PPSSPPSDL}" | grep @rpath/SDL)" != "" ]; then - cd "$(dirname "$0")" - RPATH="$(pwd)/macOS" - cd - - 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 - install_name_tool -rpath "${RPATH}" "@executable_path/../Frameworks" "${PPSSPPSDL}" || echo "Already patched." -fi +# We only support using the local SDL framework. +# All the old detection code has been eliminated. +SDL=../SDL/macOS/SDL2.framework + +echo "Copying SDL2.framework..." + +mkdir -p "${PPSSPP}/Contents/Frameworks" || exit 0 +cp -r "$SDL" "${PPSSPP}/Contents/Frameworks" || exit 0 + +install_name_tool -change "${SDL}" "@executable_path/../Frameworks/${SDLNAME}" "${PPSSPPSDL}" || exit 0 + +echo "Done." GIT_VERSION_LINE=$(grep "PPSSPP_GIT_VERSION = " "$(dirname "${0}")/../git-version.cpp") echo "Setting version to '${GIT_VERSION_LINE}'..." @@ -50,4 +36,5 @@ else fi # AdHoc codesign is required for Apple Silicon. -codesign -fs - --deep "${PPSSPP}" || exit 1 +echo "Signing..." +#codesign -fs - --deep "${PPSSPP}" || exit 1 diff --git a/headless/SDLHeadlessHost.cpp b/headless/SDLHeadlessHost.cpp index 8aa0741782d5..7333e46460c4 100644 --- a/headless/SDLHeadlessHost.cpp +++ b/headless/SDLHeadlessHost.cpp @@ -18,7 +18,13 @@ #ifdef SDL #include -#include + +#include "ppsspp_config.h" +#if PPSSPP_PLATFORM(MAC) +#include "SDL2/SDL.h" +#else +#include "SDL.h" +#endif #include "headless/SDLHeadlessHost.h" #include "Common/GPU/OpenGL/GLCommon.h" From b9267de215b4adb7c8109fba9b39cc5633248901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 24 Apr 2023 16:16:47 +0200 Subject: [PATCH 2/7] Upgrade cpu_features submodule --- ext/cpu_features | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/cpu_features b/ext/cpu_features index c74a85d64a64..75ec988188f6 160000 --- a/ext/cpu_features +++ b/ext/cpu_features @@ -1 +1 @@ -Subproject commit c74a85d64a64594fab865c8fd86865be8ac2bf87 +Subproject commit 75ec988188f62281efe7bf1d133338751369bb4c From 81ef230b562656e8117d262e9b05a3f6fdeca61a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 24 Apr 2023 22:23:27 +0200 Subject: [PATCH 3/7] Specify the executable in Info.plist directly (temp, should be injected) --- macOS/Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macOS/Info.plist b/macOS/Info.plist index e79312293aaf..a5950ee0844c 100644 --- a/macOS/Info.plist +++ b/macOS/Info.plist @@ -54,7 +54,7 @@ CFBundleExecutable - $(EXECUTABLE_NAME) + Contents/MacOS/PPSSPPSDL CFBundleGetInfoString CFBundleIconFile From dc6c30a82564c920e1e8a2d93d109767d1c1e2ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 25 Apr 2023 10:08:49 +0200 Subject: [PATCH 4/7] rpath work --- SDL/macbundle.sh | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/SDL/macbundle.sh b/SDL/macbundle.sh index b1ab6d5c8184..7a7f9387fc02 100755 --- a/SDL/macbundle.sh +++ b/SDL/macbundle.sh @@ -1,5 +1,7 @@ #!/bin/bash +echo "Hello" + PPSSPP="${1}" PPSSPPSDL="${PPSSPP}/Contents/MacOS/PPSSPPSDL" @@ -10,16 +12,25 @@ if [ ! -f "${PPSSPPSDL}" ]; then exit 0 fi -# We only support using the local SDL framework. -# All the old detection code has been eliminated. -SDL=../SDL/macOS/SDL2.framework - -echo "Copying SDL2.framework..." +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 -r "$SDL" "${PPSSPP}/Contents/Frameworks" || exit 0 - -install_name_tool -change "${SDL}" "@executable_path/../Frameworks/${SDLNAME}" "${PPSSPPSDL}" || 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." @@ -37,4 +48,5 @@ fi # AdHoc codesign is required for Apple Silicon. echo "Signing..." -#codesign -fs - --deep "${PPSSPP}" || exit 1 +codesign -fs - --options runtime --entitlements ../macOS/Entitlements.plist --timestamp "${PPSSPPSDL}" || exit 1 +codesign -fs - --options runtime --entitlements ../macOS/Entitlements.plist --timestamp "${PPSSPP}" || exit 1 From b125040944d3fcca9cd510f01e6817923245937b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 25 Apr 2023 11:44:37 +0200 Subject: [PATCH 5/7] git-version hack --- SDL/macbundle.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SDL/macbundle.sh b/SDL/macbundle.sh index 7a7f9387fc02..bd68a1111243 100755 --- a/SDL/macbundle.sh +++ b/SDL/macbundle.sh @@ -35,6 +35,11 @@ install_name_tool -rpath "${RPATH}" "@executable_path/../Frameworks" "${PPSSPPSD echo "Done." GIT_VERSION_LINE=$(grep "PPSSPP_GIT_VERSION = " "$(dirname "${0}")/../git-version.cpp") +# Hack, need to do something better here. +if [ -z "$GIT_VERSION_LINE" ]; then + GIT_VERSION_LINE=$(grep "PPSSPP_GIT_VERSION = " "$(dirname "${0}")/../build/git-version.cpp") +fi + echo "Setting version to '${GIT_VERSION_LINE}'..." SHORT_VERSION_MATCH='.*"v([0-9\.]+(-[0-9]+)?).*";' LONG_VERSION_MATCH='.*"v(.*)";' From 108c8cd26a586f8b51fd09ce95b108db229be4de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 25 Apr 2023 16:33:46 +0200 Subject: [PATCH 6/7] Remove hardened requirement on the development code signing When we do real releases, we override this signing anyway. --- SDL/macbundle.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SDL/macbundle.sh b/SDL/macbundle.sh index bd68a1111243..1a62948414e6 100755 --- a/SDL/macbundle.sh +++ b/SDL/macbundle.sh @@ -53,5 +53,5 @@ fi # AdHoc codesign is required for Apple Silicon. echo "Signing..." -codesign -fs - --options runtime --entitlements ../macOS/Entitlements.plist --timestamp "${PPSSPPSDL}" || exit 1 -codesign -fs - --options runtime --entitlements ../macOS/Entitlements.plist --timestamp "${PPSSPP}" || exit 1 +codesign -fs - --entitlements ../macOS/Entitlements.plist --timestamp "${PPSSPPSDL}" || echo "Failed signing" +codesign -fs - --entitlements ../macOS/Entitlements.plist --timestamp "${PPSSPP}" || echo "Failed signing" From 6332e61e262da575fc586c75ecc6e47a20ed2593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 25 Apr 2023 16:34:23 +0200 Subject: [PATCH 7/7] Fix Gold filenames, more gold prep for mac --- CMakeLists.txt | 22 +++++-- SDL/macbundle.sh | 3 +- macOS/InfoGold.plist | 135 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 153 insertions(+), 7 deletions(-) create mode 100644 macOS/InfoGold.plist diff --git a/CMakeLists.txt b/CMakeLists.txt index 088f37d2cba5..0f7bd266c290 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1257,7 +1257,11 @@ elseif(WIN32) endif() elseif(LIBRETRO) else() - set(TargetBin PPSSPPSDL) + if(GOLD) + set(TargetBin PPSSPPGold) + else() + set(TargetBin PPSSPPSDL) + endif() # Require SDL add_definitions(-DSDL) set(nativeExtra ${nativeExtra} @@ -2550,11 +2554,11 @@ if(TargetBin) file(INSTALL "${CMAKE_SOURCE_DIR}/ext/vulkan/iOS/Frameworks/libMoltenVK.dylib" DESTINATION "${CMAKE_BINARY_DIR}/PPSSPP.app/Frameworks/") else() add_executable(${TargetBin} MACOSX_BUNDLE ${ICON_PATH_ABS} ${NativeAssets} ${BigFontAssets} ${SHADER_FILES} ${THEME_FILE} ${DEBUGGER_FILES} ${FLASH0_FILES} ${LANG_FILES} ${NativeAppSource}) - file(INSTALL "${CMAKE_SOURCE_DIR}/ext/vulkan/macOS/Frameworks/libMoltenVK.dylib" DESTINATION "${CMAKE_BINARY_DIR}/PPSSPPSDL.app/Contents/Frameworks/") + file(INSTALL "${CMAKE_SOURCE_DIR}/ext/vulkan/macOS/Frameworks/libMoltenVK.dylib" DESTINATION "${CMAKE_BINARY_DIR}/${TargetBin}.app/Contents/Frameworks/") if(USING_QT_UI) add_custom_command(TARGET ${TargetBin} POST_BUILD COMMAND /bin/bash "${CMAKE_SOURCE_DIR}/Qt/macbundle.sh" "${CMAKE_BINARY_DIR}/PPSSPPQt.app") else() - add_custom_command(TARGET ${TargetBin} POST_BUILD COMMAND /bin/bash "${CMAKE_SOURCE_DIR}/SDL/macbundle.sh" "${CMAKE_BINARY_DIR}/PPSSPPSDL.app") + add_custom_command(TARGET ${TargetBin} POST_BUILD COMMAND /bin/bash "${CMAKE_SOURCE_DIR}/SDL/macbundle.sh" "${CMAKE_BINARY_DIR}/${TargetBin}.app" "${TargetBin}") endif() endif() elseif(WIN32) @@ -2620,9 +2624,15 @@ if(IOS AND NOT LIBRETRO) endif() if(MACOSX) -set_target_properties(${TargetBin} PROPERTIES - MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/macOS/Info.plist" - ) + if(GOLD) + set_target_properties(${TargetBin} PROPERTIES + MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/macOS/InfoGold.plist" + ) + else() + set_target_properties(${TargetBin} PROPERTIES + MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/macOS/Info.plist" + ) + endif() endif() if(UNIX AND NOT ANDROID AND NOT APPLE) diff --git a/SDL/macbundle.sh b/SDL/macbundle.sh index 1a62948414e6..9c67205efcf8 100755 --- a/SDL/macbundle.sh +++ b/SDL/macbundle.sh @@ -3,7 +3,8 @@ echo "Hello" PPSSPP="${1}" -PPSSPPSDL="${PPSSPP}/Contents/MacOS/PPSSPPSDL" +PPSSPP_SHORTNAME="${2}" +PPSSPPSDL="${PPSSPP}/Contents/MacOS/${PPSSPP_SHORTNAME}" ls ${PPSSPPSDL} diff --git a/macOS/InfoGold.plist b/macOS/InfoGold.plist new file mode 100644 index 000000000000..0d8a4b0173b1 --- /dev/null +++ b/macOS/InfoGold.plist @@ -0,0 +1,135 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes + + + CFBundleTypeName + PSP ISO Image + CFBundleTypeRole + Viewer + LSHandlerRank + Default + LSItemContentTypes + + public.iso-image + + NSDocumentClass + + + + CFBundleTypeExtensions + + cso + + CFBundleTypeName + PSP CSO Image + CFBundleTypeRole + Viewer + LSHandlerRank + Default + LSItemContentTypes + + org.ppsspp.csoimg + + + + CFBundleTypeExtensions + + pbp + + CFBundleTypeName + PSP PBP Image + CFBundleTypeRole + Viewer + LSHandlerRank + Default + LSItemContentTypes + + org.ppsspp.pbp + + + + CFBundleExecutable + Contents/MacOS/PPSSPPGold + CFBundleGetInfoString + + CFBundleIconFile + ppsspp_gold.icns + CFBundleIdentifier + org.ppsspp.ppssppgold + CFBundleInfoDictionaryVersion + 6.0 + CFBundleLongVersionString + + CFBundleName + PPSSPPGold + CFBundlePackageType + APPL + CFBundleShortVersionString + + CFBundleSignature + ???? + CFBundleURLTypes + + + CFBundleTypeRole + Editor + CFBundleURLName + org.ppsspp.openpspgame + CFBundleURLSchemes + + ppsspp + + + + CFBundleVersion + + CSResourcesFileMapped + + NSHumanReadableCopyright + + UTExportedTypeDeclarations + + + UTTypeDescription + PSP CSO Image + UTTypeIcons + + UTTypeIconText + PSP CSO Image + + UTTypeIdentifier + org.ppsspp.csoimg + UTTypeTagSpecification + + public.filename-extension + + cso + + + + + UTTypeDescription + PBP File + UTTypeIcons + + UTTypeIconText + PSP PBP Image + + UTTypeIdentifier + org.ppsspp.pbp + UTTypeTagSpecification + + public.filename-extension + + pbp + + + + + +