Fix macOS app bundle with space in name

This commit is contained in:
Zack Middleton 2018-03-04 04:23:42 -06:00
parent 0d6edd227a
commit d28e667e46

View file

@ -269,20 +269,20 @@ done
echo "" echo ""
# make the application bundle directories # make the application bundle directories
if [ ! -d ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/$BASEDIR ]; then if [ ! -d "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/$BASEDIR" ]; then
mkdir -p ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/$BASEDIR || exit 1; mkdir -p "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/$BASEDIR" || exit 1;
fi fi
if [ ! -d ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/$MISSIONPACKDIR ]; then if [ ! -d "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/$MISSIONPACKDIR" ]; then
mkdir -p ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/$MISSIONPACKDIR || exit 1; mkdir -p "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/$MISSIONPACKDIR" || exit 1;
fi fi
if [ ! -d ${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH} ]; then if [ ! -d "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" ]; then
mkdir -p ${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH} || exit 1; mkdir -p "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" || exit 1;
fi fi
# copy and generate some application bundle resources # copy and generate some application bundle resources
cp code/libs/macosx/*.dylib ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH} cp code/libs/macosx/*.dylib "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}"
cp ${ICNSDIR}/${ICNS} ${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$ICNS || exit 1; cp ${ICNSDIR}/${ICNS} "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$ICNS" || exit 1;
echo -n ${PKGINFO} > ${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/PkgInfo || exit 1; echo -n ${PKGINFO} > "${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/PkgInfo" || exit 1;
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"> <!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
<plist version=\"1.0\"> <plist version=\"1.0\">
@ -317,7 +317,7 @@ echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<string>NSApplication</string> <string>NSApplication</string>
</dict> </dict>
</plist> </plist>
" > ${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Info.plist " > "${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Info.plist"
# action takes care of generating universal binaries if lipo is available # action takes care of generating universal binaries if lipo is available
# otherwise, it falls back to using a simple copy, expecting the first item in # otherwise, it falls back to using a simple copy, expecting the first item in
@ -349,27 +349,27 @@ function action()
# #
# executables # executables
action ${BUNDLEBINDIR}/${EXECUTABLE_NAME} "${IOQ3_CLIENT_ARCHS}" action "${BUNDLEBINDIR}/${EXECUTABLE_NAME}" "${IOQ3_CLIENT_ARCHS}"
action ${BUNDLEBINDIR}/${DEDICATED_NAME} "${IOQ3_SERVER_ARCHS}" action "${BUNDLEBINDIR}/${DEDICATED_NAME}" "${IOQ3_SERVER_ARCHS}"
# renderers # renderers
action ${BUNDLEBINDIR}/${RENDERER_OPENGL1_NAME} "${IOQ3_RENDERER_GL1_ARCHS}" action "${BUNDLEBINDIR}/${RENDERER_OPENGL1_NAME}" "${IOQ3_RENDERER_GL1_ARCHS}"
action ${BUNDLEBINDIR}/${RENDERER_OPENGL2_NAME} "${IOQ3_RENDERER_GL2_ARCHS}" action "${BUNDLEBINDIR}/${RENDERER_OPENGL2_NAME}" "${IOQ3_RENDERER_GL2_ARCHS}"
symlinkArch "${RENDERER_OPENGL}1" "${RENDERER_OPENGL}1" "_" "${BUNDLEBINDIR}" symlinkArch "${RENDERER_OPENGL}1" "${RENDERER_OPENGL}1" "_" "${BUNDLEBINDIR}"
symlinkArch "${RENDERER_OPENGL}2" "${RENDERER_OPENGL}2" "_" "${BUNDLEBINDIR}" symlinkArch "${RENDERER_OPENGL}2" "${RENDERER_OPENGL}2" "_" "${BUNDLEBINDIR}"
# game # game
action ${BUNDLEBINDIR}/${BASEDIR}/${CGAME_NAME} "${IOQ3_CGAME_ARCHS}" action "${BUNDLEBINDIR}/${BASEDIR}/${CGAME_NAME}" "${IOQ3_CGAME_ARCHS}"
action ${BUNDLEBINDIR}/${BASEDIR}/${GAME_NAME} "${IOQ3_GAME_ARCHS}" action "${BUNDLEBINDIR}/${BASEDIR}/${GAME_NAME}" "${IOQ3_GAME_ARCHS}"
action ${BUNDLEBINDIR}/${BASEDIR}/${UI_NAME} "${IOQ3_UI_ARCHS}" action "${BUNDLEBINDIR}/${BASEDIR}/${UI_NAME}" "${IOQ3_UI_ARCHS}"
symlinkArch "${CGAME}" "${CGAME}" "" "${BUNDLEBINDIR}/${BASEDIR}" symlinkArch "${CGAME}" "${CGAME}" "" "${BUNDLEBINDIR}/${BASEDIR}"
symlinkArch "${GAME}" "${GAME}" "" "${BUNDLEBINDIR}/${BASEDIR}" symlinkArch "${GAME}" "${GAME}" "" "${BUNDLEBINDIR}/${BASEDIR}"
symlinkArch "${UI}" "${UI}" "" "${BUNDLEBINDIR}/${BASEDIR}" symlinkArch "${UI}" "${UI}" "" "${BUNDLEBINDIR}/${BASEDIR}"
# missionpack # missionpack
action ${BUNDLEBINDIR}/${MISSIONPACKDIR}/${CGAME_NAME} "${IOQ3_MP_CGAME_ARCHS}" action "${BUNDLEBINDIR}/${MISSIONPACKDIR}/${CGAME_NAME}" "${IOQ3_MP_CGAME_ARCHS}"
action ${BUNDLEBINDIR}/${MISSIONPACKDIR}/${GAME_NAME} "${IOQ3_MP_GAME_ARCHS}" action "${BUNDLEBINDIR}/${MISSIONPACKDIR}/${GAME_NAME}" "${IOQ3_MP_GAME_ARCHS}"
action ${BUNDLEBINDIR}/${MISSIONPACKDIR}/${UI_NAME} "${IOQ3_MP_UI_ARCHS}" action "${BUNDLEBINDIR}/${MISSIONPACKDIR}/${UI_NAME}" "${IOQ3_MP_UI_ARCHS}"
symlinkArch "${CGAME}" "${CGAME}" "" "${BUNDLEBINDIR}/${MISSIONPACKDIR}" symlinkArch "${CGAME}" "${CGAME}" "" "${BUNDLEBINDIR}/${MISSIONPACKDIR}"
symlinkArch "${GAME}" "${GAME}" "" "${BUNDLEBINDIR}/${MISSIONPACKDIR}" symlinkArch "${GAME}" "${GAME}" "" "${BUNDLEBINDIR}/${MISSIONPACKDIR}"
symlinkArch "${UI}" "${UI}" "" "${BUNDLEBINDIR}/${MISSIONPACKDIR}" symlinkArch "${UI}" "${UI}" "" "${BUNDLEBINDIR}/${MISSIONPACKDIR}"