适配 luban-next 最新版本的配表结构,新增 Mac 设备相关的 shell 脚本支持

This commit is contained in:
feng
2024-11-30 23:09:45 +08:00
parent d571a937f8
commit c089eb32ba
8 changed files with 108 additions and 0 deletions

18
BuildCLI/build_android.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
cd "$(dirname "$0")"
source ./path_define.sh
"${UNITYEDITOR_PATH}/Unity" "${WORKSPACE}" \
-logFile "${BUILD_LOGFILE}" \
-executeMethod TEngine.ReleaseTools.AutomationBuildAndroid \
-quit -batchmode \
-CustomArgs:Language=en_US "${WORKSPACE}"
while IFS= read -r line; do
echo "$line"
done < "${BUILD_LOGFILE}"
echo "按任意键继续..."
read -k1

14
BuildCLI/path_define.sh Normal file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
cd "$(dirname "$0")"
export WORKSPACE="/Users/your_user/github/TEngine/UnityProject" # 请替换为 macOS 上的实际路径
export UNITYEDITOR_PATH="/Applications/Unity/Hub/Editor/2021.3.20f1c1/Unity.app/Contents/MacOS" # 请替换为 macOS 上的 Unity 路径
export BUILD_DLL_LOGFILE="./build_dll.log"
export BUILD_LOGFILE="./build.log"
echo "环境变量已设置:"
echo "WORKSPACE=${WORKSPACE}"
echo "UNITYEDITOR_PATH=${UNITYEDITOR_PATH}"
echo "BUILD_DLL_LOGFILE=${BUILD_DLL_LOGFILE}"
echo "BUILD_LOGFILE=${BUILD_LOGFILE}"