Delete Makefile
This commit is contained in:
parent
7ac92951f2
commit
76043c78b9
51
.github/workflows/build.yml
vendored
51
.github/workflows/build.yml
vendored
|
|
@ -17,57 +17,6 @@ jobs:
|
|||
echo "VERSION: ${VERSION}"
|
||||
echo "result=${VERSION}" >> $GITHUB_OUTPUT
|
||||
|
||||
linux-legacy:
|
||||
name: Linux (Legacy Makefile)
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install libsdl2-dev
|
||||
- name: Compile
|
||||
run: |
|
||||
echo I_ACKNOWLEDGE_THE_MAKEFILE_IS_DEPRECATED=1 > Makefile.local
|
||||
make release -j$(nproc)
|
||||
windows-legacy:
|
||||
name: Windows (Legacy Makefile)
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Compile
|
||||
run: |
|
||||
echo I_ACKNOWLEDGE_THE_MAKEFILE_IS_DEPRECATED=1 > Makefile.local
|
||||
make release -j $env:NUMBER_OF_PROCESSORS
|
||||
macos-legacy:
|
||||
name: macOS (Legacy Makefile)
|
||||
runs-on: macos-13
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Compile
|
||||
run: |
|
||||
echo I_ACKNOWLEDGE_THE_MAKEFILE_IS_DEPRECATED=1 > Makefile.local
|
||||
make release -j$(sysctl -n hw.logicalcpu)
|
||||
emscripten-legacy:
|
||||
name: Emscripten (Legacy Makefile)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: emscripten-core/emsdk
|
||||
path: emsdk
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
cd emsdk
|
||||
./emsdk install 4.0.18
|
||||
./emsdk activate 4.0.18
|
||||
- name: Compile
|
||||
run: |
|
||||
echo I_ACKNOWLEDGE_THE_MAKEFILE_IS_DEPRECATED=1 > Makefile.local
|
||||
source emsdk/emsdk_env.sh
|
||||
emmake make release -j$(nproc)
|
||||
|
||||
linux:
|
||||
name: Linux
|
||||
runs-on: ubuntu-22.04
|
||||
|
|
|
|||
|
|
@ -1,465 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Let's make the user give us a target to work with.
|
||||
# architecture is assumed universal if not specified, and is optional.
|
||||
# if arch is defined, it we will store the .app bundle in the target arch build directory
|
||||
if [ $# == 0 ] || [ $# -gt 2 ]; then
|
||||
echo "Usage: $0 target <arch>"
|
||||
echo "Example: $0 release x86"
|
||||
echo "Valid targets are:"
|
||||
echo " release"
|
||||
echo " debug"
|
||||
echo
|
||||
echo "Optional architectures are:"
|
||||
echo " x86"
|
||||
echo " x86_64"
|
||||
echo " ppc"
|
||||
echo " arm64"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# validate target name
|
||||
if [ "$1" == "release" ]; then
|
||||
TARGET_NAME="release"
|
||||
elif [ "$1" == "debug" ]; then
|
||||
TARGET_NAME="debug"
|
||||
else
|
||||
echo "Invalid target: $1"
|
||||
echo "Valid targets are:"
|
||||
echo " release"
|
||||
echo " debug"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CURRENT_ARCH=""
|
||||
|
||||
# validate the architecture if it was specified
|
||||
if [ "$2" != "" ]; then
|
||||
if [ "$2" == "x86" ]; then
|
||||
CURRENT_ARCH="x86"
|
||||
elif [ "$2" == "x86_64" ]; then
|
||||
CURRENT_ARCH="x86_64"
|
||||
elif [ "$2" == "ppc" ]; then
|
||||
CURRENT_ARCH="ppc"
|
||||
elif [ "$2" == "arm64" ]; then
|
||||
CURRENT_ARCH="arm64"
|
||||
else
|
||||
echo "Invalid architecture: $2"
|
||||
echo "Valid architectures are:"
|
||||
echo " x86"
|
||||
echo " x86_64"
|
||||
echo " ppc"
|
||||
echo " arm64"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# symlinkArch() creates a symlink with the architecture suffix.
|
||||
# meant for universal binaries, but also handles the way this script generates
|
||||
# application bundles for a single architecture as well.
|
||||
function symlinkArch()
|
||||
{
|
||||
EXT="dylib"
|
||||
SEP="${3}"
|
||||
SRCFILE="${1}"
|
||||
DSTFILE="${2}${SEP}"
|
||||
DSTPATH="${4}"
|
||||
|
||||
if [ ! -e "${DSTPATH}/${SRCFILE}.${EXT}" ]; then
|
||||
echo "**** ERROR: missing ${SRCFILE}.${EXT} from ${MACOS}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "${DSTPATH}" ]; then
|
||||
echo "**** ERROR: path not found ${DSTPATH}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pushd "${DSTPATH}" > /dev/null
|
||||
|
||||
IS32=`file "${SRCFILE}.${EXT}" | grep "i386"`
|
||||
IS64=`file "${SRCFILE}.${EXT}" | grep "x86_64"`
|
||||
ISPPC=`file "${SRCFILE}.${EXT}" | grep "ppc"`
|
||||
ISARM=`file "${SRCFILE}.${EXT}" | grep "arm64"`
|
||||
|
||||
if [ "${IS32}" != "" ]; then
|
||||
if [ ! -L "${DSTFILE}x86.${EXT}" ]; then
|
||||
ln -s "${SRCFILE}.${EXT}" "${DSTFILE}x86.${EXT}"
|
||||
fi
|
||||
elif [ -L "${DSTFILE}x86.${EXT}" ]; then
|
||||
rm "${DSTFILE}x86.${EXT}"
|
||||
fi
|
||||
|
||||
if [ "${IS64}" != "" ]; then
|
||||
if [ ! -L "${DSTFILE}x86_64.${EXT}" ]; then
|
||||
ln -s "${SRCFILE}.${EXT}" "${DSTFILE}x86_64.${EXT}"
|
||||
fi
|
||||
elif [ -L "${DSTFILE}x86_64.${EXT}" ]; then
|
||||
rm "${DSTFILE}x86_64.${EXT}"
|
||||
fi
|
||||
|
||||
if [ "${ISPPC}" != "" ]; then
|
||||
if [ ! -L "${DSTFILE}ppc.${EXT}" ]; then
|
||||
ln -s "${SRCFILE}.${EXT}" "${DSTFILE}ppc.${EXT}"
|
||||
fi
|
||||
elif [ -L "${DSTFILE}ppc.${EXT}" ]; then
|
||||
rm "${DSTFILE}ppc.${EXT}"
|
||||
fi
|
||||
|
||||
if [ "${ISARM}" != "" ]; then
|
||||
if [ ! -L "${DSTFILE}arm64.${EXT}" ]; then
|
||||
ln -s "${SRCFILE}.${EXT}" "${DSTFILE}arm64.${EXT}"
|
||||
fi
|
||||
elif [ -L "${DSTFILE}arm64.${EXT}" ]; then
|
||||
rm "${DSTFILE}arm64.${EXT}"
|
||||
fi
|
||||
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
SEARCH_ARCHS=" \
|
||||
x86 \
|
||||
x86_64 \
|
||||
ppc \
|
||||
arm64 \
|
||||
"
|
||||
|
||||
HAS_LIPO=`command -v lipo`
|
||||
HAS_CP=`command -v cp`
|
||||
|
||||
# if lipo is not available, we cannot make a universal binary, print a warning
|
||||
if [ ! -x "${HAS_LIPO}" ] && [ "${CURRENT_ARCH}" == "" ]; then
|
||||
CURRENT_ARCH=`uname -m`
|
||||
if [ "${CURRENT_ARCH}" == "i386" ]; then CURRENT_ARCH="x86"; fi
|
||||
echo "$0 cannot make a universal binary, falling back to architecture ${CURRENT_ARCH}"
|
||||
fi
|
||||
|
||||
# if the optional arch parameter is used, replace SEARCH_ARCHS to only work with one
|
||||
if [ "${CURRENT_ARCH}" != "" ]; then
|
||||
SEARCH_ARCHS="${CURRENT_ARCH}"
|
||||
fi
|
||||
|
||||
# select SDL run-time dylib
|
||||
if [ "${MACOSX_DEPLOYMENT_TARGET}" = "10.5" ] \
|
||||
|| [ "${MACOSX_DEPLOYMENT_TARGET}" = "10.6" ] \
|
||||
|| [ "${MACOSX_DEPLOYMENT_TARGET}" = "10.7" ] \
|
||||
|| [ "${MACOSX_DEPLOYMENT_TARGET}" = "10.8" ]; then
|
||||
UNIVERSAL_BINARY=1
|
||||
else
|
||||
UNIVERSAL_BINARY=2
|
||||
fi
|
||||
|
||||
AVAILABLE_ARCHS=""
|
||||
|
||||
IOQ3_VERSION=`grep '^VERSION=' Makefile | sed -e 's/.*=\(.*\)/\1/'`
|
||||
IOQ3_CLIENT_ARCHS=""
|
||||
IOQ3_SERVER_ARCHS=""
|
||||
IOQ3_RENDERER_GL1_ARCHS=""
|
||||
IOQ3_RENDERER_GL2_ARCHS=""
|
||||
IOQ3_CGAME_ARCHS=""
|
||||
IOQ3_GAME_ARCHS=""
|
||||
IOQ3_UI_ARCHS=""
|
||||
IOQ3_MP_CGAME_ARCHS=""
|
||||
IOQ3_MP_GAME_ARCHS=""
|
||||
IOQ3_MP_UI_ARCHS=""
|
||||
|
||||
BASEDIR="baseq3"
|
||||
MISSIONPACKDIR="missionpack"
|
||||
|
||||
CGAME="cgame"
|
||||
GAME="qagame"
|
||||
UI="ui"
|
||||
|
||||
RENDERER_OPENGL="renderer_opengl"
|
||||
|
||||
DEDICATED_NAME="ioq3ded"
|
||||
|
||||
CGAME_NAME="${CGAME}.dylib"
|
||||
GAME_NAME="${GAME}.dylib"
|
||||
UI_NAME="${UI}.dylib"
|
||||
|
||||
RENDERER_OPENGL1_NAME="${RENDERER_OPENGL}1.dylib"
|
||||
RENDERER_OPENGL2_NAME="${RENDERER_OPENGL}2.dylib"
|
||||
|
||||
ICNSDIR="misc"
|
||||
ICNS="quake3_flat.icns"
|
||||
PKGINFO="APPLIOQ3"
|
||||
|
||||
OBJROOT="build"
|
||||
#BUILT_PRODUCTS_DIR="${OBJROOT}/${TARGET_NAME}-darwin-${CURRENT_ARCH}"
|
||||
PRODUCT_NAME="ioquake3"
|
||||
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}"
|
||||
PROTOCOL_HANDLER="quake3"
|
||||
|
||||
# loop through the architectures to build string lists for each universal binary
|
||||
for ARCH in $SEARCH_ARCHS; do
|
||||
CURRENT_ARCH=${ARCH}
|
||||
BUILT_PRODUCTS_DIR="${OBJROOT}/${TARGET_NAME}-darwin-${CURRENT_ARCH}"
|
||||
IOQ3_CLIENT="${EXECUTABLE_NAME}.${CURRENT_ARCH}"
|
||||
IOQ3_SERVER="${DEDICATED_NAME}.${CURRENT_ARCH}"
|
||||
IOQ3_RENDERER_GL1="${RENDERER_OPENGL}1_${CURRENT_ARCH}.dylib"
|
||||
IOQ3_RENDERER_GL2="${RENDERER_OPENGL}2_${CURRENT_ARCH}.dylib"
|
||||
IOQ3_CGAME="${CGAME}${CURRENT_ARCH}.dylib"
|
||||
IOQ3_GAME="${GAME}${CURRENT_ARCH}.dylib"
|
||||
IOQ3_UI="${UI}${CURRENT_ARCH}.dylib"
|
||||
|
||||
if [ ! -d ${BUILT_PRODUCTS_DIR} ]; then
|
||||
CURRENT_ARCH=""
|
||||
BUILT_PRODUCTS_DIR=""
|
||||
continue
|
||||
fi
|
||||
|
||||
# executables
|
||||
if [ -e ${BUILT_PRODUCTS_DIR}/${IOQ3_CLIENT} ]; then
|
||||
IOQ3_CLIENT_ARCHS="${BUILT_PRODUCTS_DIR}/${IOQ3_CLIENT} ${IOQ3_CLIENT_ARCHS}"
|
||||
VALID_ARCHS="${ARCH} ${VALID_ARCHS}"
|
||||
else
|
||||
continue
|
||||
fi
|
||||
if [ -e ${BUILT_PRODUCTS_DIR}/${IOQ3_SERVER} ]; then
|
||||
IOQ3_SERVER_ARCHS="${BUILT_PRODUCTS_DIR}/${IOQ3_SERVER} ${IOQ3_SERVER_ARCHS}"
|
||||
fi
|
||||
|
||||
# renderers
|
||||
if [ -e ${BUILT_PRODUCTS_DIR}/${IOQ3_RENDERER_GL1} ]; then
|
||||
IOQ3_RENDERER_GL1_ARCHS="${BUILT_PRODUCTS_DIR}/${IOQ3_RENDERER_GL1} ${IOQ3_RENDERER_GL1_ARCHS}"
|
||||
fi
|
||||
if [ -e ${BUILT_PRODUCTS_DIR}/${IOQ3_RENDERER_GL2} ]; then
|
||||
IOQ3_RENDERER_GL2_ARCHS="${BUILT_PRODUCTS_DIR}/${IOQ3_RENDERER_GL2} ${IOQ3_RENDERER_GL2_ARCHS}"
|
||||
fi
|
||||
|
||||
# game
|
||||
if [ -e ${BUILT_PRODUCTS_DIR}/${BASEDIR}/${IOQ3_CGAME} ]; then
|
||||
IOQ3_CGAME_ARCHS="${BUILT_PRODUCTS_DIR}/${BASEDIR}/${IOQ3_CGAME} ${IOQ3_CGAME_ARCHS}"
|
||||
fi
|
||||
if [ -e ${BUILT_PRODUCTS_DIR}/${BASEDIR}/${IOQ3_GAME} ]; then
|
||||
IOQ3_GAME_ARCHS="${BUILT_PRODUCTS_DIR}/${BASEDIR}/${IOQ3_GAME} ${IOQ3_GAME_ARCHS}"
|
||||
fi
|
||||
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
|
||||
|
||||
# final preparations and checks before attempting to make the application bundle
|
||||
cd `dirname $0`
|
||||
|
||||
if [ ! -f Makefile ]; then
|
||||
echo "$0 must be run from the ioquake3 build directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "${IOQ3_CLIENT_ARCHS}" == "" ]; then
|
||||
echo "$0: no ioquake3 binary architectures were found for target '${TARGET_NAME}'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# set the final application bundle output directory
|
||||
if [ "${2}" == "" ]; then
|
||||
if [ -n "${MACOSX_DEPLOYMENT_TARGET_ARM64}" ]; then
|
||||
BUILT_PRODUCTS_DIR="${OBJROOT}/${TARGET_NAME}-darwin-universal2"
|
||||
else
|
||||
BUILT_PRODUCTS_DIR="${OBJROOT}/${TARGET_NAME}-darwin-universal"
|
||||
fi
|
||||
if [ ! -d ${BUILT_PRODUCTS_DIR} ]; then
|
||||
mkdir -p ${BUILT_PRODUCTS_DIR} || exit 1;
|
||||
fi
|
||||
else
|
||||
BUILT_PRODUCTS_DIR="${OBJROOT}/${TARGET_NAME}-darwin-${CURRENT_ARCH}"
|
||||
fi
|
||||
|
||||
BUNDLEBINDIR="${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}"
|
||||
|
||||
|
||||
# here we go
|
||||
echo "Creating bundle '${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}'"
|
||||
echo "with architectures:"
|
||||
for ARCH in ${VALID_ARCHS}; do
|
||||
echo " ${ARCH}"
|
||||
done
|
||||
echo ""
|
||||
|
||||
# make the application bundle directories
|
||||
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
|
||||
if [ $UNIVERSAL_BINARY -eq 2 ]; then
|
||||
cp code/libs/macosx-ub2/*.dylib "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}"
|
||||
else
|
||||
cp code/libs/macosx-ub/*.dylib "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}"
|
||||
fi
|
||||
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;
|
||||
|
||||
# create Info.Plist
|
||||
PLIST="<?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\">
|
||||
<plist version=\"1.0\">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>quake3_flat</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.ioquake.${PRODUCT_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${IOQ3_VERSION}</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${IOQ3_VERSION}</string>
|
||||
<key>CGDisableCoalescedUpdates</key>
|
||||
<true/>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>"
|
||||
|
||||
if [ -n "${MACOSX_DEPLOYMENT_TARGET_PPC}" ] || [ -n "${MACOSX_DEPLOYMENT_TARGET_X86}" ] || [ -n "${MACOSX_DEPLOYMENT_TARGET_X86_64}" ] || [ -n "${MACOSX_DEPLOYMENT_TARGET_ARM64}" ]; then
|
||||
PLIST="${PLIST}
|
||||
<key>LSMinimumSystemVersionByArchitecture</key>
|
||||
<dict>"
|
||||
|
||||
if [ -n "${MACOSX_DEPLOYMENT_TARGET_PPC}" ]; then
|
||||
PLIST="${PLIST}
|
||||
<key>ppc</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET_PPC}</string>"
|
||||
fi
|
||||
|
||||
if [ -n "${MACOSX_DEPLOYMENT_TARGET_X86}" ]; then
|
||||
PLIST="${PLIST}
|
||||
<key>i386</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET_X86}</string>"
|
||||
fi
|
||||
|
||||
if [ -n "${MACOSX_DEPLOYMENT_TARGET_X86_64}" ]; then
|
||||
PLIST="${PLIST}
|
||||
<key>x86_64</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET_X86_64}</string>"
|
||||
fi
|
||||
|
||||
if [ -n "${MACOSX_DEPLOYMENT_TARGET_ARM64}" ]; then
|
||||
PLIST="${PLIST}
|
||||
<key>arm64</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET_ARM64}</string>"
|
||||
fi
|
||||
|
||||
PLIST="${PLIST}
|
||||
</dict>"
|
||||
fi
|
||||
|
||||
if [ -n "${PROTOCOL_HANDLER}" ]; then
|
||||
PLIST="${PLIST}
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>${PROTOCOL_HANDLER}</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>"
|
||||
fi
|
||||
|
||||
PLIST="${PLIST}
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>QUAKE III ARENA Copyright © 1999-2000 id Software, Inc. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<false/>
|
||||
<key>NSRequiresAquaSystemAppearance</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
"
|
||||
echo -e "${PLIST}" > "${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Info.plist"
|
||||
|
||||
# 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
|
||||
# the second parameter list to be the desired architecture
|
||||
function action()
|
||||
{
|
||||
COMMAND=""
|
||||
|
||||
if [ -x "${HAS_LIPO}" ]; then
|
||||
COMMAND="${HAS_LIPO} -create -o"
|
||||
$HAS_LIPO -create -o "${1}" ${2} # make sure $2 is treated as a list of files
|
||||
elif [ -x ${HAS_CP} ]; then
|
||||
COMMAND="${HAS_CP}"
|
||||
SRC="${2// */}" # in case there is a list here, use only the first item
|
||||
$HAS_CP "${SRC}" "${1}"
|
||||
else
|
||||
"$0 cannot create an application bundle."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#echo "${COMMAND}" "${1}" "${2}"
|
||||
}
|
||||
|
||||
#
|
||||
# the meat of universal binary creation
|
||||
# destination file names do not have architecture suffix.
|
||||
# action will handle merging universal binaries if supported.
|
||||
# symlink appropriate architecture names for universal (fat) binary support.
|
||||
#
|
||||
|
||||
# executables
|
||||
action "${BUNDLEBINDIR}/${EXECUTABLE_NAME}" "${IOQ3_CLIENT_ARCHS}"
|
||||
action "${BUNDLEBINDIR}/${DEDICATED_NAME}" "${IOQ3_SERVER_ARCHS}"
|
||||
|
||||
# renderers
|
||||
action "${BUNDLEBINDIR}/${RENDERER_OPENGL1_NAME}" "${IOQ3_RENDERER_GL1_ARCHS}"
|
||||
action "${BUNDLEBINDIR}/${RENDERER_OPENGL2_NAME}" "${IOQ3_RENDERER_GL2_ARCHS}"
|
||||
symlinkArch "${RENDERER_OPENGL}1" "${RENDERER_OPENGL}1" "_" "${BUNDLEBINDIR}"
|
||||
symlinkArch "${RENDERER_OPENGL}2" "${RENDERER_OPENGL}2" "_" "${BUNDLEBINDIR}"
|
||||
|
||||
# game
|
||||
action "${BUNDLEBINDIR}/${BASEDIR}/${CGAME_NAME}" "${IOQ3_CGAME_ARCHS}"
|
||||
action "${BUNDLEBINDIR}/${BASEDIR}/${GAME_NAME}" "${IOQ3_GAME_ARCHS}"
|
||||
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}"
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
#!/bin/bash
|
||||
CC=gcc-4.0
|
||||
|
||||
cd `dirname $0`
|
||||
if [ ! -f Makefile ]; then
|
||||
echo "This script must be run from the ioquake3 build directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# we want to use the oldest available SDK for max compatibility. However 10.4 and older
|
||||
# can not build 64bit binaries, making 10.5 the minimum version. This has been tested
|
||||
# with xcode 3.1 (xcode31_2199_developerdvd.dmg). It contains the 10.5 SDK and a decent
|
||||
# enough gcc to actually compile ioquake3
|
||||
# For PPC macs, G4's or better are required to run ioquake3.
|
||||
|
||||
unset X86_64_SDK
|
||||
unset X86_64_CFLAGS
|
||||
unset X86_64_MACOSX_VERSION_MIN
|
||||
unset X86_SDK
|
||||
unset X86_CFLAGS
|
||||
unset X86_MACOSX_VERSION_MIN
|
||||
unset PPC_SDK
|
||||
unset PPC_CFLAGS
|
||||
unset PPC_MACOSX_VERSION_MIN
|
||||
|
||||
if [ -d /Developer/SDKs/MacOSX10.5.sdk ]; then
|
||||
X86_64_SDK=/Developer/SDKs/MacOSX10.5.sdk
|
||||
X86_64_CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
|
||||
X86_64_MACOSX_VERSION_MIN="10.5"
|
||||
|
||||
X86_SDK=/Developer/SDKs/MacOSX10.5.sdk
|
||||
X86_CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
|
||||
X86_MACOSX_VERSION_MIN="10.5"
|
||||
|
||||
PPC_SDK=/Developer/SDKs/MacOSX10.5.sdk
|
||||
PPC_CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
|
||||
PPC_MACOSX_VERSION_MIN="10.5"
|
||||
fi
|
||||
|
||||
# SDL 2.0.5+ (x86, x86_64) only supports MacOSX 10.6 and later
|
||||
if [ -d /Developer/SDKs/MacOSX10.6.sdk ]; then
|
||||
X86_64_SDK=/Developer/SDKs/MacOSX10.6.sdk
|
||||
X86_64_CFLAGS="-isysroot /Developer/SDKs/MacOSX10.6.sdk"
|
||||
X86_64_MACOSX_VERSION_MIN="10.6"
|
||||
|
||||
X86_SDK=/Developer/SDKs/MacOSX10.6.sdk
|
||||
X86_CFLAGS="-isysroot /Developer/SDKs/MacOSX10.6.sdk"
|
||||
X86_MACOSX_VERSION_MIN="10.6"
|
||||
else
|
||||
# Don't try to compile with 10.5 version min
|
||||
X86_64_SDK=
|
||||
X86_SDK=
|
||||
fi
|
||||
# end SDL 2.0.5
|
||||
|
||||
if [ -z $X86_64_SDK ] || [ -z $X86_SDK ] || [ -z $PPC_SDK ]; then
|
||||
echo "\
|
||||
ERROR: This script is for building a Universal Binary. You cannot build
|
||||
for a different architecture unless you have the proper Mac OS X SDKs
|
||||
installed. If you just want to to compile for your own system run
|
||||
'make-macosx.sh' instead of this script.
|
||||
|
||||
In order to build a binary with maximum compatibility you must
|
||||
build on Mac OS X 10.6 and have the MacOSX10.5 and MacOSX10.6
|
||||
SDKs installed from the Xcode install disk Packages folder."
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Building X86_64 Client/Dedicated Server against \"$X86_64_SDK\""
|
||||
echo "Building X86 Client/Dedicated Server against \"$X86_SDK\""
|
||||
echo "Building PPC Client/Dedicated Server against \"$PPC_SDK\""
|
||||
echo
|
||||
|
||||
# For parallel make on multicore boxes...
|
||||
SYSCTL_PATH=`command -v sysctl 2> /dev/null`
|
||||
if [ -n "$SYSCTL_PATH" ]; then
|
||||
NCPU=`sysctl -n hw.ncpu`
|
||||
else
|
||||
# osxcross on linux
|
||||
NCPU=`nproc`
|
||||
fi
|
||||
|
||||
# x86_64 client and server
|
||||
#if [ -d build/release-release-x86_64 ]; then
|
||||
# rm -r build/release-darwin-x86_64
|
||||
#fi
|
||||
(PLATFORM=darwin ARCH=x86_64 CC=gcc-4.0 CFLAGS=$X86_64_CFLAGS MACOSX_VERSION_MIN=$X86_64_MACOSX_VERSION_MIN make -j$NCPU) || exit 1;
|
||||
|
||||
echo;echo
|
||||
|
||||
# x86 client and server
|
||||
#if [ -d build/release-darwin-x86 ]; then
|
||||
# rm -r build/release-darwin-x86
|
||||
#fi
|
||||
(PLATFORM=darwin ARCH=x86 CC=gcc-4.0 CFLAGS=$X86_CFLAGS MACOSX_VERSION_MIN=$X86_MACOSX_VERSION_MIN make -j$NCPU) || exit 1;
|
||||
|
||||
echo;echo
|
||||
|
||||
# PPC client and server
|
||||
#if [ -d build/release-darwin-ppc ]; then
|
||||
# rm -r build/release-darwin-ppc
|
||||
#fi
|
||||
(PLATFORM=darwin ARCH=ppc CC=gcc-4.0 CFLAGS=$PPC_CFLAGS MACOSX_VERSION_MIN=$PPC_MACOSX_VERSION_MIN make -j$NCPU) || exit 1;
|
||||
|
||||
echo
|
||||
|
||||
# use the following shell script to build a universal application bundle
|
||||
export MACOSX_DEPLOYMENT_TARGET="10.5"
|
||||
export MACOSX_DEPLOYMENT_TARGET_PPC="$PPC_MACOSX_VERSION_MIN"
|
||||
export MACOSX_DEPLOYMENT_TARGET_X86="$X86_MACOSX_VERSION_MIN"
|
||||
export MACOSX_DEPLOYMENT_TARGET_X86_64="$X86_64_MACOSX_VERSION_MIN"
|
||||
"./make-macosx-app.sh" release
|
||||
|
|
@ -1,159 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd `dirname $0`
|
||||
if [ ! -f Makefile ]; then
|
||||
echo "This script must be run from the ioquake3 build directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# This script is to build a Universal 2 binary
|
||||
# (Apple's term for an x86_64 and arm64 binary)
|
||||
|
||||
unset X86_64_SDK
|
||||
unset X86_64_CFLAGS
|
||||
unset X86_64_MACOSX_VERSION_MIN
|
||||
unset ARM64_SDK
|
||||
unset ARM64_CFLAGS
|
||||
unset ARM64_MACOSX_VERSION_MIN
|
||||
|
||||
X86_64_MACOSX_VERSION_MIN="10.9"
|
||||
ARM64_MACOSX_VERSION_MIN="11.0"
|
||||
|
||||
echo "Building X86_64 Client/Dedicated Server"
|
||||
echo "Building ARM64 Client/Dedicated Server"
|
||||
echo
|
||||
|
||||
if [ "$1" == "" ]; then
|
||||
echo "Run script with a 'notarize' flag to perform signing and notarization."
|
||||
fi
|
||||
|
||||
# For parallel make on multicore boxes...
|
||||
SYSCTL_PATH=`command -v sysctl 2> /dev/null`
|
||||
if [ -n "$SYSCTL_PATH" ]; then
|
||||
NCPU=`sysctl -n hw.ncpu`
|
||||
else
|
||||
# osxcross on linux
|
||||
NCPU=`nproc`
|
||||
fi
|
||||
|
||||
# x86_64 client and server
|
||||
#if [ -d build/release-release-x86_64 ]; then
|
||||
# rm -r build/release-darwin-x86_64
|
||||
#fi
|
||||
(PLATFORM=darwin ARCH=x86_64 CFLAGS=$X86_64_CFLAGS MACOSX_VERSION_MIN=$X86_64_MACOSX_VERSION_MIN make -j$NCPU) || exit 1;
|
||||
|
||||
echo;echo
|
||||
|
||||
# arm64 client and server
|
||||
#if [ -d build/release-release-arm64 ]; then
|
||||
# rm -r build/release-darwin-arm64
|
||||
#fi
|
||||
(PLATFORM=darwin ARCH=arm64 CFLAGS=$ARM64_CFLAGS MACOSX_VERSION_MIN=$ARM64_MACOSX_VERSION_MIN make -j$NCPU) || exit 1;
|
||||
|
||||
echo
|
||||
|
||||
# use the following shell script to build a universal 2 application bundle
|
||||
export MACOSX_DEPLOYMENT_TARGET="10.9"
|
||||
export MACOSX_DEPLOYMENT_TARGET_X86_64="$X86_64_MACOSX_VERSION_MIN"
|
||||
export MACOSX_DEPLOYMENT_TARGET_ARM64="$ARM64_MACOSX_VERSION_MIN"
|
||||
|
||||
if [ -d build/release-darwin-universal2 ]; then
|
||||
rm -r build/release-darwin-universal2
|
||||
fi
|
||||
"./make-macosx-app.sh" release
|
||||
|
||||
if [ "$1" == "notarize" ]; then
|
||||
# user-specific values
|
||||
# specify the actual values in a separate file called make-macosx-values.local
|
||||
|
||||
# ****************************************************************************************
|
||||
# identity as specified in Keychain
|
||||
SIGNING_IDENTITY="Developer ID Application: Your Name (XXXXXXXXX)"
|
||||
|
||||
ASC_USERNAME="your@apple.id"
|
||||
|
||||
# signing password is app-specific (https://appleid.apple.com/account/manage) and stored in Keychain (as "notarize-app" in this case)
|
||||
ASC_PASSWORD="@keychain:notarize-app"
|
||||
|
||||
# ProviderShortname can be found with
|
||||
# xcrun altool --list-providers -u your@apple.id -p "@keychain:notarize-app"
|
||||
ASC_PROVIDER="XXXXXXXXX"
|
||||
# ****************************************************************************************
|
||||
|
||||
source make-macosx-values.local
|
||||
|
||||
# release build location
|
||||
RELEASE_LOCATION="build/release-darwin-universal2"
|
||||
|
||||
# release build name
|
||||
RELEASE_BUILD="ioquake3.app"
|
||||
|
||||
# Pre-notarized zip file (not what is shipped)
|
||||
PRE_NOTARIZED_ZIP="ioquake3_prenotarized.zip"
|
||||
|
||||
# Post-notarized zip file (shipped)
|
||||
POST_NOTARIZED_ZIP="ioquake3_notarized.zip"
|
||||
|
||||
BUNDLE_ID="org.ioquake3.ioquake3"
|
||||
|
||||
# allows for unsigned executable memory in hardened runtime
|
||||
# see: https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_allow-unsigned-executable-memory
|
||||
ENTITLEMENTS_FILE="misc/xcode/ioquake3/ioquake3.entitlements"
|
||||
|
||||
# sign the resulting app bundle
|
||||
echo "signing..."
|
||||
codesign --force --options runtime --deep --entitlements "${ENTITLEMENTS_FILE}" --sign "${SIGNING_IDENTITY}" ${RELEASE_LOCATION}/${RELEASE_BUILD}
|
||||
|
||||
cd ${RELEASE_LOCATION}
|
||||
|
||||
# notarize app
|
||||
# script taken from https://github.com/rednoah/notarize-app
|
||||
|
||||
# create the zip to send to the notarization service
|
||||
echo "zipping..."
|
||||
ditto -c -k --sequesterRsrc --keepParent ${RELEASE_BUILD} ${PRE_NOTARIZED_ZIP}
|
||||
|
||||
# create temporary files
|
||||
NOTARIZE_APP_LOG=$(mktemp -t notarize-app)
|
||||
NOTARIZE_INFO_LOG=$(mktemp -t notarize-info)
|
||||
|
||||
# delete temporary files on exit
|
||||
function finish {
|
||||
rm "$NOTARIZE_APP_LOG" "$NOTARIZE_INFO_LOG"
|
||||
}
|
||||
trap finish EXIT
|
||||
|
||||
echo "submitting..."
|
||||
# submit app for notarization
|
||||
if xcrun altool --notarize-app --primary-bundle-id "$BUNDLE_ID" --asc-provider "$ASC_PROVIDER" --username "$ASC_USERNAME" --password "$ASC_PASSWORD" -f "$PRE_NOTARIZED_ZIP" > "$NOTARIZE_APP_LOG" 2>&1; then
|
||||
cat "$NOTARIZE_APP_LOG"
|
||||
RequestUUID=$(awk -F ' = ' '/RequestUUID/ {print $2}' "$NOTARIZE_APP_LOG")
|
||||
|
||||
# check status periodically
|
||||
while sleep 60 && date; do
|
||||
# check notarization status
|
||||
if xcrun altool --notarization-info "$RequestUUID" --asc-provider "$ASC_PROVIDER" --username "$ASC_USERNAME" --password "$ASC_PASSWORD" > "$NOTARIZE_INFO_LOG" 2>&1; then
|
||||
cat "$NOTARIZE_INFO_LOG"
|
||||
|
||||
# once notarization is complete, run stapler and exit
|
||||
if ! grep -q "Status: in progress" "$NOTARIZE_INFO_LOG"; then
|
||||
xcrun stapler staple "$RELEASE_BUILD"
|
||||
break
|
||||
fi
|
||||
else
|
||||
cat "$NOTARIZE_INFO_LOG" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
else
|
||||
cat "$NOTARIZE_APP_LOG" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "notarized"
|
||||
echo "zipping notarized..."
|
||||
|
||||
ditto -c -k --sequesterRsrc --keepParent ${RELEASE_BUILD} ${POST_NOTARIZED_ZIP}
|
||||
|
||||
echo "done. ${POST_NOTARIZED_ZIP} contains notarized ${RELEASE_BUILD} build."
|
||||
fi
|
||||
129
make-macosx.sh
129
make-macosx.sh
|
|
@ -1,129 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
|
||||
# Let's make the user give us a target build system
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $0 target_architecture"
|
||||
echo "Example: $0 x86"
|
||||
echo "other valid options are arm64, x86_64 or ppc"
|
||||
echo
|
||||
echo "If you don't know or care about architectures please consider using make-macosx-ub.sh instead of this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" == "x86" ]; then
|
||||
BUILDARCH=x86
|
||||
elif [ "$1" == "x86_64" ]; then
|
||||
BUILDARCH=x86_64
|
||||
elif [ "$1" == "ppc" ]; then
|
||||
BUILDARCH=ppc
|
||||
elif [ "$1" == "arm64" ]; then
|
||||
BUILDARCH=arm64
|
||||
else
|
||||
echo "Invalid architecture: $1"
|
||||
echo "Valid architectures are arm64, x86_64, x86, or ppc"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CC=gcc-4.0
|
||||
DESTDIR=build/release-darwin-${BUILDARCH}
|
||||
|
||||
cd `dirname $0`
|
||||
if [ ! -f Makefile ]; then
|
||||
echo "This script must be run from the ioquake3 build directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# we want to use the oldest available SDK for max compatibility. However 10.4 and older
|
||||
# can not build 64bit binaries, making 10.5 the minimum version. This has been tested
|
||||
# with xcode 3.1 (xcode31_2199_developerdvd.dmg). It contains the 10.5 SDK and a decent
|
||||
# enough gcc to actually compile ioquake3
|
||||
# For PPC macs, G4's or better are required to run ioquake3.
|
||||
|
||||
unset ARCH_SDK
|
||||
unset ARCH_CFLAGS
|
||||
unset ARCH_MACOSX_VERSION_MIN
|
||||
|
||||
# SDL 2.0.1 (ppc) supports MacOSX 10.5
|
||||
# SDL 2.0.5+ (x86, x86_64) supports MacOSX 10.6 and later
|
||||
if [ $BUILDARCH = "ppc" ]; then
|
||||
if [ -d /Developer/SDKs/MacOSX10.5.sdk ]; then
|
||||
ARCH_SDK=/Developer/SDKs/MacOSX10.5.sdk
|
||||
ARCH_CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
|
||||
fi
|
||||
ARCH_MACOSX_VERSION_MIN="10.5"
|
||||
elif [ $BUILDARCH = "x86" ]; then
|
||||
if [ -d /Developer/SDKs/MacOSX10.6.sdk ]; then
|
||||
ARCH_SDK=/Developer/SDKs/MacOSX10.6.sdk
|
||||
ARCH_CFLAGS="-isysroot /Developer/SDKs/MacOSX10.6.sdk"
|
||||
fi
|
||||
ARCH_MACOSX_VERSION_MIN="10.6"
|
||||
elif [ $BUILDARCH = "x86_64" ]; then
|
||||
if [ -d /Developer/SDKs/MacOSX10.6.sdk ]; then
|
||||
ARCH_SDK=/Developer/SDKs/MacOSX10.6.sdk
|
||||
ARCH_CFLAGS="-isysroot /Developer/SDKs/MacOSX10.6.sdk"
|
||||
ARCH_MACOSX_VERSION_MIN="10.6"
|
||||
else
|
||||
if [ -n "$MACOSX_VERSION_MIN" ]; then
|
||||
DEFAULT_SDK=$MACOSX_VERSION_MIN
|
||||
else
|
||||
# trying to find default SDK version is hard
|
||||
# macOS 10.15 requires -sdk macosx but 10.11 doesn't support it
|
||||
# macOS 10.6 doesn't have -show-sdk-version
|
||||
DEFAULT_SDK=`xcrun -sdk macosx -show-sdk-version 2> /dev/null`
|
||||
if [ -z "$DEFAULT_SDK" ]; then
|
||||
DEFAULT_SDK=`xcrun -show-sdk-version 2> /dev/null`
|
||||
fi
|
||||
if [ -z "$DEFAULT_SDK" ]; then
|
||||
echo "Error: Unable to determine macOS SDK version."
|
||||
echo "On macOS 10.6 to 10.8 run:"
|
||||
echo " MACOSX_VERSION_MIN=10.6 $0 $BUILDARCH"
|
||||
echo "On macOS 10.9 or later run:"
|
||||
echo " MACOSX_VERSION_MIN=10.9 $0 $BUILDARCH"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$DEFAULT_SDK" = "10.6" ] \
|
||||
|| [ "$DEFAULT_SDK" = "10.7" ] \
|
||||
|| [ "$DEFAULT_SDK" = "10.8" ]; then
|
||||
ARCH_MACOSX_VERSION_MIN="10.6"
|
||||
else
|
||||
ARCH_MACOSX_VERSION_MIN="10.9"
|
||||
fi
|
||||
fi
|
||||
elif [ $BUILDARCH = "arm64" ]; then
|
||||
ARCH_MACOSX_VERSION_MIN="11.0"
|
||||
fi
|
||||
|
||||
|
||||
echo "Building ${BUILDARCH} Client/Dedicated Server against \"$ARCH_SDK\""
|
||||
sleep 3
|
||||
|
||||
if [ ! -d $DESTDIR ]; then
|
||||
mkdir -p $DESTDIR
|
||||
fi
|
||||
|
||||
# For parallel make on multicore boxes...
|
||||
SYSCTL_PATH=`command -v sysctl 2> /dev/null`
|
||||
if [ -n "$SYSCTL_PATH" ]; then
|
||||
NCPU=`sysctl -n hw.ncpu`
|
||||
else
|
||||
# osxcross on linux
|
||||
NCPU=`nproc`
|
||||
fi
|
||||
|
||||
# intel client and server
|
||||
#if [ -d build/release-darwin-${BUILDARCH} ]; then
|
||||
# rm -r build/release-darwin-${BUILDARCH}
|
||||
#fi
|
||||
(PLATFORM=darwin ARCH=${BUILDARCH} CFLAGS=$ARCH_CFLAGS MACOSX_VERSION_MIN=$ARCH_MACOSX_VERSION_MIN make -j$NCPU) || exit 1;
|
||||
|
||||
# use the following shell script to build an application bundle
|
||||
export MACOSX_DEPLOYMENT_TARGET="${ARCH_MACOSX_VERSION_MIN}"
|
||||
export MACOSX_DEPLOYMENT_TARGET_PPC=
|
||||
export MACOSX_DEPLOYMENT_TARGET_X86=
|
||||
export MACOSX_DEPLOYMENT_TARGET_X86_64=
|
||||
export MACOSX_DEPLOYMENT_TARGET_ARM64=
|
||||
"./make-macosx-app.sh" release ${BUILDARCH}
|
||||
Loading…
Reference in New Issue
Block a user