编译udk源码

先编译UnrealBuildTool,再编译UDKGame Win32,会将各个项目中的文件打包到Unity_*EtAl.cpp类似的文件中,后续只要编译这些文件即可。

在Development\Src\UnrealBuildTool\System\LocalExecutor.cs:141中添加:

Console.WriteLine("Executing: {0} {1}", ActionStartInfo.FileName, ActionStartInfo.Arguments);
再生成UDKGame Win32项目,将输出窗口中的调试信息如:

E:\TOOLS\VS2010\Common7\Tools\../../VC/bin/cl.exe  /nologo /Oi /Zp4 /Gy /fp:fast /c /Zm400 /bigobj /wd4819 /Ox /Ot /Ob2 /arch:SSE /errorReport:prompt /EHsc /MD /I "Core/Inc/Epic" /I "Core/Inc/Licensee" /I "Core/Inc" /I "Engine/Inc" /I "GameFramework/Inc" /I "IpDrv/Inc" /I "UnrealEd/Inc" /I "UnrealEd/FaceFX" /I "UnrealEdCLR/Inc" /I "UnrealSwarm/Inc" /I "../External/FaceFX/Studio/Main/Inc" /I "../External/FaceFX/Studio/Widgets/Inc" /I "../External/FaceFX/Studio/Framework/Audio/Inc" /I "../External/FaceFX/Studio/Framework/Commands/Inc" /I "../External/FaceFX/Studio/Framework/Console/Inc" /I "../External/FaceFX/Studio/Framework/GUI/Inc" /I "../External/FaceFX/Studio/Framework/Misc/Extensions/Inc" /I "../External/FaceFX/Studio/Framework/Misc/Inc" /I "../External/FaceFX/Studio/Framework/Proxies/Inc" /I "../External/FaceFX/Studio/" /I "../External/FaceFX/Studio/Framework/Gestures/Inc" /I "../External/FaceFX/Studio/External/OpenAL/include" /I "../External/FaceFX/Studio/External/libresample-0.1.3/include" /I "../External/tinyXML" /I "E:/TOOLS/VS2010/VC/atlmfc/include" /I "E:/TOOLS/VS2010/VC/include" /I "../External/SpeedTree/Include" /I "GFxUI/Inc" /I "OnlineSubsystemPC/Inc" /I "WinDrv/Inc" /I "D3D9Drv/Inc" /I "D3D11Drv/Inc" /I "OpenGLDrv/Inc" /I "ES2Drv/Inc" /I "XAudio2/Inc" /I "Launch/Inc" /I "../Tools/UnrealLightmass/Public" /I "C:\Program Files\Common Files" /I "OnlineSubsystemSteamworks/Inc" /I "../External/ES2Emulation/NVIDIA/include" /I "../External/wxWidgets/include" /I "../External/wxWidgets/lib/vc_dll" /I "../External/wxExtended/wxDockit/include" /I "GFxUIEditor/Inc" /I "UnrealEd\Src" /I "../External/PhysX/SDKs/Foundation/include" /I "../External/PhysX/SDKs/Physics/include" /I "../External/PhysX/SDKs/Physics/include/fluids" /I "../External/PhysX/SDKs/Physics/include/softbody" /I "../External/PhysX/SDKs/Physics/include/cloth" /I "../External/PhysX/SDKs/Cooking/include" /I "../External/PhysX/SDKs/PhysXLoader/include" /I "../External/PhysX/SDKs/PhysXExtensions/include" /I "../External/PhysX/SDKs/TetraMaker/NxTetra" /I "../External/PhysX/Nxd/include" /I "../External/PhysX/PxFoundation" /I "../External/PhysX/PxFoundation/legacy" /I "../External/PhysX/PxRenderDebug" /I "../External/PhysX/PxTask" /I "../External/PhysX/PxFoundation/windows" /I "../External/PhysX/APEX/framework/public" /I "../External/PhysX/APEX/NxParameterized/public" /I "../External/PhysX/APEX/EditorWidgets" /I "../External/PhysX/APEX/module/clothing/public" /I "../External/PhysX/APEX/module/destructible/public" /I "../External/PhysX/APEX/module/emitter/public" /I "../External/PhysX/APEX/module/explosion/public" /I "../External/PhysX/APEX/module/forcefield/public" /I "../External/PhysX/APEX/module/iofx/public" /I "../External/PhysX/APEX/module/basicios/public" /I "../External/PhysX/APEX/module/particles/public" /I "../External/FaceFX/FxSDK/Inc" /I "../External/FaceFX/FxCG/Inc" /I "../External/FaceFX/FxAnalysis/Inc" /I "../External/GFx/Include" /I "../External/GFx/Src" /I "../External/GFx/Src/GFx" /I "../External/GFx/Src/GFx/AMP" /I "../External/GFx/Src/GFx/AS2" /I "../External/GFx/Src/GFx/AS3" /I "../External/GFx/Src/GFx/Audio" /I "../External/GFx/Src/GFx/IME" /I "../External/GFx/Src/GFx/Text" /I "../External/GFx/Src/GFx/XML" /I "../External/GFx/Src/Kernel" /I "../External/GFx/Src/Render" /I "../External/GFx/Src/Render/ImageFiles" /I "../External/Recast/UE3/include" /I "../External/OpenGL" /I "../External/Steamworks/sdk/public" /I "../External/libPNG" /I "../External/DirectShow/DirectShow" /I "../External/nvapi" /I "../External/nvtesslib/inc" /I "../External/lzopro/include" /I "../External/zlib/inc" /I "../External/FBX/2012.1/include" /I "../External/FBX/2012.1/include/fbxfilesdk" /I "../External/EasyHook" /I "F:/SDK/DirectX9.0c/include" /I "../External/nvTextureTools-2.0.6/src/src" /I "../External/kiss_fft129" /I "../External/libogg-1.2.2/include" /I "../External/libvorbis-1.3.2/include" /D "UNICODE" /D "_UNICODE" /D "__UNREAL__" /D "USE_BINK_CODEC=0" /D "WITH_GFx=1" /D "WITH_GFx_AUDIO=0" /D "WITH_GFx_VIDEO=0" /D "WITH_GFx_IME=1" /D "WITH_RECAST=1" /D "UE3_LEAN_AND_MEAN=0" /D "WITH_EDITOR=1" /D "WITH_PERFORCE=1" /D "_WINDOWS=1" /D "WIN32=1" /D "_WIN32_WINNT=0x0502" /D "WINVER=0x0502" /D "USE_DYNAMIC_ES2_RHI=1" /D "WITH_STEAMWORKS=1" /D "DEDICATED_SERVER=0" /D "PNG_NO_FLOATING_POINT_SUPPORTED=1" /D "WXUSINGDLL" /D "wxUSE_NO_MANIFEST" /D "WITH_FBX=1" /D "WITH_KISSFFT=1" /D "XDKINSTALLED=0" /D "WITH_SPEEDTREE=0" /D "DWTRIOVIZSDK=0" /D "WITH_MANAGED_CODE=1" /D "NDEBUG=1" /D "FINAL_RELEASE=0" /Yu"UnrealEd.h" /Fp"C:\UDK\UDK-2012-01\Development\Intermediate\UDKGame\Win32\Release\UnrealEd\UnrealEd.h.pch" "C:\UDK\UDK-2012-01\Development\Intermediate\UDKGame\Win32\Release\UnrealEd\Unity_UnScrComEtAl.cpp" /Fo"C:\UDK\UDK-2012-01\Development\Intermediate\UDKGame\Win32\Release\UnrealEd\Unity_UnScrComEtAl.cpp.obj" /Fd"C:\UDK\UDK-2012-01\Development\Intermediate\UDKGame\Win32\Release\UnrealEd\UnrealEd.h.pdb" /TP /GR- /WX /W4
复制黏贴到vs2010命令行中,手动生成。

最后有一个link命令能生成UDKGame.exe


你可能感兴趣的:(UDK)