1 Star 0 Fork 1

孤花暗香/OpenRA-YRSC

forked from zgrsgr/OpenRA-YRSC 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
launch-game.sh 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
Cook Green 提交于 2019-09-07 21:09 . Update build toolchain
#!/bin/sh
set -e
command -v python >/dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires python."; exit 1; }
command -v mono >/dev/null 2>&1 || { echo >&2 "The OpenRA mod template requires mono."; exit 1; }
require_variables() {
missing=""
for i in "$@"; do
eval check="\$$i"
[ -z "${check}" ] && missing="${missing} ${i}\n"
done
if [ ! -z "${missing}" ]; then
echo "Required mod.config variables are missing:\n${missing}Repair your mod.config (or user.config) and try again."
exit 1
fi
}
TEMPLATE_LAUNCHER=$(python -c "import os; print(os.path.realpath('$0'))")
TEMPLATE_ROOT=$(dirname "${TEMPLATE_LAUNCHER}")
MOD_SEARCH_PATHS="${TEMPLATE_ROOT}/mods,./mods"
# shellcheck source=mod.config
. "${TEMPLATE_ROOT}/mod.config"
if [ -f "${TEMPLATE_ROOT}/user.config" ]; then
# shellcheck source=user.config
. "${TEMPLATE_ROOT}/user.config"
fi
require_variables "MOD_ID" "ENGINE_VERSION" "ENGINE_DIRECTORY"
cd "${TEMPLATE_ROOT}"
if [ ! -f "${ENGINE_DIRECTORY}/OpenRA.Game.exe" ] || [ "$(cat "${ENGINE_DIRECTORY}/VERSION")" != "${ENGINE_VERSION}" ]; then
echo "Required engine files not found."
echo "Run \`make\` in the mod directory to fetch and build the required files, then try again.";
exit 1
fi
cd "${ENGINE_DIRECTORY}"
mono OpenRA.Game.exe Engine.LaunchPath="${TEMPLATE_LAUNCHER}" "Engine.ModSearchPaths=${MOD_SEARCH_PATHS}" Game.Mod="${MOD_ID}" "$@"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/mybbsky_admin_admin/open-ra-yrsc.git
[email protected]:mybbsky_admin_admin/open-ra-yrsc.git
mybbsky_admin_admin
open-ra-yrsc
OpenRA-YRSC
SC

搜索帮助