UE4 命令工具打包

用cmd进入UE4引擎的目录:\Engine\Build\BatchFiles找到RunUAT.bat,cmd中输入以下命令:

 

RunUAT BuildCookRun -project="F:/VidaUpdater/VidaUpdater.uproject" -noP4 -platform=Win64 -clientconfig=Shipping -cook -allmaps -stage -build -archive -archivedirectory="D:\Packages" -utf8output

 

-archivedirectory="D:\Packages"   //打包路径

-clientconfig=Shipping   //打包shipping包,对应的还有Development包,区别比较多,比如

①development下崩溃的提示比较详细,shipping没有任何代码提示,只有fatel error。

②development下可以调用控制台,而shipping下不可以。

 

Git上的:

::Buildclient

 

RunUAT BuildCookRun -project="full_path.uproject"^

 

-noP4 -platform=Win64^

 

-clientconfig=Development -serverconfig=Development^

 

-cook -allmaps -build -stage^

 

-pak -archive -archivedirectory="Output Directory"

 

 

 

:: Cook client

 

RunUAT BuildCookRun -project="full_project_path_and_project_name".uproject^

 

-noP4 -platform=Win64^

 

-clientconfig=Development -serverconfig=Development^

 

-cook -allmaps -NoCompile -stage^

 

-pak -archive -archivedirectory="Output Directory"

 

 

 

:: Build server

 

RunUAT BuildCookRun -project="full_project_path_and_project_name".uproject^

 

-noP4 -platform=Win64^

 

-clientconfig=Development -serverconfig=Development^

 

-cook -server -serverplatform=Win64 -noclient -build -stage^

 

-pak -archive -archivedirectory="Output Directory"

 

 

 

:: Cook server

 

RunUAT BuildCookRun -project="full_project_path_and_project_name".uproject^

 

-noP4 -platform=Win64^

 

-clientconfig=Development -serverconfig=Development^

 

-cook -server -serverplatform=Win64 -noclient -NoCompile -stage^

 

-pak -archive -archivedirectory="Output Directory"

 

 

后记:

1.如果是shipping包不需要调试的话,删除WindowsNoEditor\项目\Binaries\Win64下的pdb文件。

2.打包之前最好先把代码在VS里development模式下编译下。

你可能感兴趣的:(UE4)