Skip to content

Commit

Permalink
Merge pull request #24541 from kambala-decapitator/tvos-framework-gen
Browse files Browse the repository at this point in the history
[tvOS] fix assigning bundle ID to the generated frameworks
  • Loading branch information
kambala-decapitator committed Jan 20, 2024
2 parents 835caf6 + 1461597 commit e007eb0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tools/darwin/Support/copyframeworks-dylibs2frameworks.command
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# along with MrMC; see the file COPYING. If not, see
# <http://www.gnu.org/licenses/>.

#set -x
set -x

TARGET_CONTENTS="${TARGET_BUILD_DIR}/${EXECUTABLE_FOLDER_PATH}"
TARGET_FRAMEWORKS=$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH
Expand Down Expand Up @@ -47,11 +47,7 @@ function convert2framework
install_name_tool -change @executable_path/Frameworks/${DYLIB_BASENAME} @executable_path/Frameworks/${DYLIB_LIBNAME}.framework/${DYLIB_LIBNAME} ${TARGET_BUILD_DIR}/${EXECUTABLE_FOLDER_PATH}/${EXECUTABLE_NAME}
install_name_tool -add_rpath @executable_path/Frameworks/${DYLIB_LIBNAME}.framework ${TARGET_BUILD_DIR}/${EXECUTABLE_FOLDER_PATH}/${EXECUTABLE_NAME}

BUNDLEID=`mdls -raw -name kMDItemCFBundleIdentifier ${TARGET_BUILD_DIR}/${EXECUTABLE_FOLDER_PATH}`
if [ "${BUNDLEID}" == "(null)" ] ; then
BUNDLEID=`/usr/libexec/PlistBuddy -c 'Print CFBundleIdentifier' ${TARGET_BUILD_DIR}/${EXECUTABLE_FOLDER_PATH}/Info.plist`
fi

BUNDLEID=$(/usr/libexec/PlistBuddy -c 'Print CFBundleIdentifier' ${TARGET_BUILD_DIR}/${EXECUTABLE_FOLDER_PATH}/Info.plist)
FRAMEWORKBUNDLEID="${BUNDLEID}.framework.${DYLIB_LIBNAME}"
echo "CFBundleIdentifier is ${FRAMEWORKBUNDLEID}"
echo "convert ${DYLIB_BASENAME} to ${DYLIB_LIBNAME}.framework"
Expand Down

0 comments on commit e007eb0

Please sign in to comment.