You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
866 B
40 lines
866 B
#!/bin/sh
|
|
|
|
SHDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
UNITY_PATH=$MAC_UNITY_PATH
|
|
PROJECT_PATH=${SHDIR}/..
|
|
OUT_PATH=${SHDIR}/build-ios-output
|
|
LOG_FILE=$OUT_PATH/archive_log.txt
|
|
UNITY_METHOD_NAME=H3DBuild.ContentPipeline.BuildPlayerCmd
|
|
TARGET=$BUILD_PLAYER_NAME
|
|
BUILD_PATH=$PROJECT_PATH/XcodeProject
|
|
CACHE=/Users/h3d/Library/Developer/Xcode/DerivedData
|
|
|
|
BUILD_FILE=ipaExportor.py
|
|
|
|
|
|
# kill unity
|
|
pkill -9 Unity
|
|
|
|
# clean env file
|
|
rm -Rf $BUILD_PATH
|
|
rm -Rf $CACHE/Unity-iPhone-*
|
|
rm -f $LOG_FILE
|
|
touch $LOG_FILE
|
|
|
|
# make xcode workpace
|
|
$UNITY_PATH -quit -batchmode -logFile $LOG_FILE -projectPath $PROJECT_PATH -executeMethod $UNITY_METHOD_NAME -buildName $TARGET -buildTarget iOS
|
|
|
|
echo "cd $BUILD_PATH"
|
|
cd $BUILD_PATH
|
|
|
|
chmod +x $BUILD_FILE
|
|
|
|
|
|
# build arch and make ipa
|
|
echo "build ipa..."
|
|
rm -f ../../framw-unity.ipa
|
|
./$BUILD_FILE $BUILD_TYPE framw-unity
|
|
|
|
|
|
|
|
|