Skip to content

Commit

Permalink
Modify Info.plist automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Feb 4, 2020
1 parent 55bb58e commit ace88bf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Expand Up @@ -2013,6 +2013,8 @@ if(TargetBin)
add_executable(${TargetBin} MACOSX_BUNDLE ${ICON_PATH_ABS} ${NativeAssets} ${SHADER_FILES} ${FLASH0_FILES} ${LANG_FILES} ${NativeAppSource})
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)
add_custom_command(TARGET ${TargetBin} POST_BUILD COMMAND /bin/bash "${CMAKE_SOURCE_DIR}/Qt/macbundle.sh" "${CMAKE_BINARY_DIR}/PPSSPPQt.app")
endif()
endif()
elseif(WIN32)
Expand Down
14 changes: 14 additions & 0 deletions Qt/macbundle.sh
@@ -0,0 +1,14 @@
#!/bin/bash

PPSSPP="${1}"
PPSSPPQt="${PPSSPP}/Contents/MacOS/PPSSPPQt"

if [ ! -f "${PPSSPPQt}" ]; then
echo "No such file: ${PPSSPPQt}!"
exit 0
fi

plutil -replace NSPrincipalClass -string NSApplication ${PPSSPP}/Contents/Info.plist
plutil -replace NSHighResolutionCapable -bool YES ${PPSSPP}/Contents/Info.plist

# TODO: install SDL and Qt frameworks

0 comments on commit ace88bf

Please sign in to comment.