From 64a158e0a599d155a4add59d52137042ef362da2 Mon Sep 17 00:00:00 2001 From: Jeff Kent Date: Sat, 11 Apr 2015 22:19:32 -0500 Subject: Customize macosx app build script for Tremulous --- make-macosx-app.sh | 48 +++++++++++++----------------------------------- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/make-macosx-app.sh b/make-macosx-app.sh index 7e484dd4..13f6f70d 100755 --- a/make-macosx-app.sh +++ b/make-macosx-app.sh @@ -106,10 +106,10 @@ function symlinkArch() popd > /dev/null } -SEARCH_ARCHS=" \ - x86 \ - x86_64 \ - ppc \ +SEARCH_ARCHS=" \ + x86 \ + x86_64 \ + ppc \ " HAS_LIPO=`command -v lipo` @@ -141,16 +141,15 @@ IOQ3_MP_CGAME_ARCHS="" IOQ3_MP_GAME_ARCHS="" IOQ3_MP_UI_ARCHS="" -BASEDIR="baseq3" -MISSIONPACKDIR="missionpack" +BASEDIR="base" CGAME="cgame" -GAME="qagame" +GAME="game" UI="ui" RENDERER_OPENGL="renderer_opengl" -DEDICATED_NAME="ioq3ded" +DEDICATED_NAME="tremded" CGAME_NAME="${CGAME}.dylib" GAME_NAME="${GAME}.dylib" @@ -160,18 +159,18 @@ RENDERER_OPENGL1_NAME="${RENDERER_OPENGL}1.dylib" RENDERER_OPENGL2_NAME="${RENDERER_OPENGL}2.dylib" ICNSDIR="misc" -ICNS="quake3_flat.icns" +ICNS="Tremulous.icns" PKGINFO="APPLIOQ3" OBJROOT="build" #BUILT_PRODUCTS_DIR="${OBJROOT}/${TARGET_NAME}-darwin-${CURRENT_ARCH}" -PRODUCT_NAME="ioquake3" +PRODUCT_NAME="Tremulous" WRAPPER_EXTENSION="app" WRAPPER_NAME="${PRODUCT_NAME}.${WRAPPER_EXTENSION}" CONTENTS_FOLDER_PATH="${WRAPPER_NAME}/Contents" UNLOCALIZED_RESOURCES_FOLDER_PATH="${CONTENTS_FOLDER_PATH}/Resources" EXECUTABLE_FOLDER_PATH="${CONTENTS_FOLDER_PATH}/MacOS" -EXECUTABLE_NAME="${PRODUCT_NAME}" +EXECUTABLE_NAME="tremulous" # loop through the architectures to build string lists for each universal binary for ARCH in $SEARCH_ARCHS; do @@ -220,16 +219,6 @@ for ARCH in $SEARCH_ARCHS; do if [ -e ${BUILT_PRODUCTS_DIR}/${BASEDIR}/${IOQ3_UI} ]; then IOQ3_UI_ARCHS="${BUILT_PRODUCTS_DIR}/${BASEDIR}/${IOQ3_UI} ${IOQ3_UI_ARCHS}" fi - # missionpack - if [ -e ${BUILT_PRODUCTS_DIR}/${MISSIONPACKDIR}/${IOQ3_CGAME} ]; then - IOQ3_MP_CGAME_ARCHS="${BUILT_PRODUCTS_DIR}/${MISSIONPACKDIR}/${IOQ3_CGAME} ${IOQ3_MP_CGAME_ARCHS}" - fi - if [ -e ${BUILT_PRODUCTS_DIR}/${MISSIONPACKDIR}/${IOQ3_GAME} ]; then - IOQ3_MP_GAME_ARCHS="${BUILT_PRODUCTS_DIR}/${MISSIONPACKDIR}/${IOQ3_GAME} ${IOQ3_MP_GAME_ARCHS}" - fi - if [ -e ${BUILT_PRODUCTS_DIR}/${MISSIONPACKDIR}/${IOQ3_UI} ]; then - IOQ3_MP_UI_ARCHS="${BUILT_PRODUCTS_DIR}/${MISSIONPACKDIR}/${IOQ3_UI} ${IOQ3_MP_UI_ARCHS}" - fi #echo "valid arch: ${ARCH}" done @@ -272,15 +261,12 @@ echo "" if [ ! -d ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/$BASEDIR ]; then mkdir -p ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/$BASEDIR || exit 1; fi -if [ ! -d ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/$MISSIONPACKDIR ]; then - mkdir -p ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/$MISSIONPACKDIR || exit 1; -fi if [ ! -d ${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH} ]; then mkdir -p ${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH} || exit 1; fi # copy and generate some application bundle resources -cp code/libs/macosx/*.dylib ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH} +cp src/libs/macosx/*.dylib ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH} 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 " @@ -292,7 +278,7 @@ echo " CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile - quake3_flat + ${ICNS} CFBundleIdentifier org.ioquake.${PRODUCT_NAME} CFBundleInfoDictionaryVersion @@ -312,7 +298,7 @@ echo " LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSHumanReadableCopyright - QUAKE III ARENA Copyright © 1999-2000 id Software, Inc. All rights reserved. + Copyright © 1999-2015 Id Software LLC, a ZeniMax Media company, ioquake3, Darklegion Development, and Tremulous community contributors. NSPrincipalClass NSApplication @@ -365,11 +351,3 @@ action ${BUNDLEBINDIR}/${BASEDIR}/${UI_NAME} "${IOQ3_UI_ARCHS}" symlinkArch "${CGAME}" "${CGAME}" "" "${BUNDLEBINDIR}/${BASEDIR}" symlinkArch "${GAME}" "${GAME}" "" "${BUNDLEBINDIR}/${BASEDIR}" symlinkArch "${UI}" "${UI}" "" "${BUNDLEBINDIR}/${BASEDIR}" - -# missionpack -action ${BUNDLEBINDIR}/${MISSIONPACKDIR}/${CGAME_NAME} "${IOQ3_MP_CGAME_ARCHS}" -action ${BUNDLEBINDIR}/${MISSIONPACKDIR}/${GAME_NAME} "${IOQ3_MP_GAME_ARCHS}" -action ${BUNDLEBINDIR}/${MISSIONPACKDIR}/${UI_NAME} "${IOQ3_MP_UI_ARCHS}" -symlinkArch "${CGAME}" "${CGAME}" "" "${BUNDLEBINDIR}/${MISSIONPACKDIR}" -symlinkArch "${GAME}" "${GAME}" "" "${BUNDLEBINDIR}/${MISSIONPACKDIR}" -symlinkArch "${UI}" "${UI}" "" "${BUNDLEBINDIR}/${MISSIONPACKDIR}" -- cgit