ue4program
ue4program copied to clipboard
Program类型无法编译Engine模块,UnrealEd模块等
using UnrealBuildTool;
public class EditorProgram : ModuleRules { public EditorProgram(ReadOnlyTargetRules Target) : base(Target) { PublicIncludePaths.AddRange( new string[] { "Runtime/Launch/Public", "Programs/EditorProgram/Source/Public", }); PrivateIncludePaths.AddRange( new string[] { "Runtime/Launch/Private", // For LaunchEngineLoop.cpp include "Programs/EditorProgram/Source/Private" });
PrivateDependencyModuleNames.AddRange(
new string[] {
"AppFramework",
"Core",
"ApplicationCore",
"Projects",
"Slate",
"SlateCore",
"InputCore",
"SlateReflector",
"StandaloneRenderer",
"Engine"
}
);
}
}
加入“Engine”等模块,编译会失败
using UnrealBuildTool; using System.Collections.Generic;
[SupportedPlatforms(UnrealPlatformClass.All)] public class EditorProgramTarget : TargetRules { public EditorProgramTarget(TargetInfo Target) : base(Target) { Type = TargetType.Program; LinkType = TargetLinkType.Monolithic; LaunchModuleName = "EditorProgram"; ExtraModuleNames.Add("EditorStyle");
// Lean and mean
bCompileLeanAndMeanUE = true;
// Whether to compile WITH_EDITORONLY_DATA disabled. Only Windows will use this, other platforms force this to false.
//bBuildWithEditorOnlyData = false;
// Compile out references from Core to the rest of the engine
bCompileAgainstEngine = true;
// Enabled for all builds that include the CoreUObject project. Disabled only when building standalone apps that only link with Core.
bCompileAgainstCoreUObject = false;
// Whether to include plugin support.
bCompileWithPluginSupport = true;
// Enable exceptions for all modules
bForceEnableExceptions = false;
// Enable RTTI for all modules.
// bForceEnableRTTI = true;
// If ture the program entrance is WinMain,otherwise entrance is main
bIsBuildingConsoleApplication = false;
}
}
1>------ Build started: Project: EditorProgram, Configuration: Development_Program x64 ------ 1>Creating makefile for EditorProgram (changes to target files) 1>Using Visual Studio 2017 14.26.28801 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10). 1>Building UnrealHeaderTool... 1>Target is up to date 1>Total build time: 0.10 seconds (NoActionsToExecute executor: 0.00 seconds) 1>Parsing headers for EditorProgram 1> Running UnrealHeaderTool EditorProgram "E:\UE4\UnrealEngine-4.21.2-release\Engine\Intermediate\Build\Win64\EditorProgram\Development\EditorProgram.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors 1>EXEC : error : Couldn't find parent type for 'MovieScene2DTransformTrack' named 'UMovieScenePropertyTrack' in current module or any other module parsed so far. 1>EXEC : error : UnrealHeaderTool failed for target 'EditorProgram' (platform: Win64, module info: E:\UE4\UnrealEngine-4.21.2-release\Engine\Intermediate\Build\Win64\EditorProgram\Development\EditorProgram.uhtmanifest, exit code: OtherCompilationError (5)). 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3075: The command "chcp 65001 >NUL && ....\Build\BatchFiles\Build.bat EditorProgram Win64 Development -WaitMutex -FromMsBuild" exited with code 5. Please verify that you have sufficient rights to run this command. 1>Done building project "EditorProgram.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========
理论上,program类型可以依赖编译任何模块进行测试,但是我随便依赖引擎相关的模块都是失败了,请教下如何解决?