ue4 setup排除
2020-05-27 15:19 kk20161206 阅读(638) 评论(0) 编辑 收藏 举报@echo off //关闭回显功能
setlocal //让程序对于系统变量的改变只在程序内起作用
pushd "%~dp0"// 保存当前目录并切换至当前目录
rem Figure out if we should append the -prompt argument
set PROMPT_ARGUMENT=
for %%P in (%*) do if /I "%%P" == "--prompt" goto no_prompt_argument
for %%P in (%*) do if /I "%%P" == "--force" goto no_prompt_argument
set PROMPT_ARGUMENT=--prompt // 优化位置
:no_prompt_argument
rem Sync the dependencies...
.\Engine\Binaries\DotNET\GitDependencies.exe %PROMPT_ARGUMENT% %*
if ERRORLEVEL 1 goto error
rem Setup the git hooks...
if not exist .git\hooks goto no_git_hooks_directory
echo Registering git hooks...
echo #!/bin/sh >.git\hooks\post-checkout
echo Engine/Binaries/DotNET/GitDependencies.exe %* >>.git\hooks\post-checkout
echo #!/bin/sh >.git\hooks\post-merge
echo Engine/Binaries/DotNET/GitDependencies.exe %* >>.git\hooks\post-merge
:no_git_hooks_directory
rem Install prerequisites...
echo Installing prerequisites...
start /wait Engine\Extras\Redist\en-us\UE4PrereqSetup_x64.exe /quiet
rem Register the engine installation...
if not exist .\Engine\Binaries\Win64\UnrealVersionSelector-Win64-Shipping.exe goto :no_unreal_version_selector
.\Engine\Binaries\Win64\UnrealVersionSelector-Win64-Shipping.exe /register
:no_unreal_version_selector
rem Done!
goto :EOF
rem Error happened. Wait for a keypress before quitting.
:error
pause
可设置优化参数:
--exclude=<XXX> (这些选项前的双横线也可以用单横线)
排除掉自己不需要的平台和VS版本,例如: setup.bat -exclude=Linux -exclude=IOS -exclude=HTML5 -exclude=Android -exclude=VS2013
平台可选的参数:Win32, Win64, osx32,osx64, Linux, Android, IOS, HTML5
VS版本可选参数:VS2012,VS2013,VS2015
警告: 不要排除Win32 和 VS2012, 不然后期编译会遇到问题
--threads=<N>
多线程下载,速度倍增。例如:setup.bat --threads=2
--cache=<PATH>
把下载的内容缓存在指定的目录,这样如果有多人需要,就可以只下载一次,然后分享给大家,例如:setup.bat --cache=D:\Temp
--proxy=<user:password@url>
使用代理下载
参考链接:https://www.jianshu.com/p/f8de7d59dd0e