本文整理汇总了C#中UnrealBuildTool.FileItem类的典型用法代码示例。如果您正苦于以下问题:C# FileItem类的具体用法?C# FileItem怎么用?C# FileItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FileItem类属于UnrealBuildTool命名空间,在下文中一共展示了FileItem类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Load
/// <summary>
/// Loads the cache from disk
/// </summary>
/// <param name="Cache">The file to load</param>
/// <returns>The loaded instance</returns>
public static FlatCPPIncludeDependencyCache Load(FileItem Cache)
{
FlatCPPIncludeDependencyCache Result = null;
try
{
using (FileStream Stream = new FileStream(Cache.AbsolutePath, FileMode.Open, FileAccess.Read))
{
// @todo ubtmake: We can store the cache in a cheaper/smaller way using hash file names and indices into included headers, but it might actually slow down load times
// @todo ubtmake: If we can index PCHs here, we can avoid storing all of the PCH's included headers (PCH's action should have been invalidated, so we shouldn't even have to report the PCH's includes as our indirect includes)
BinaryFormatter Formatter = new BinaryFormatter();
Result = Formatter.Deserialize(Stream) as FlatCPPIncludeDependencyCache;
Result.CacheFileItem = Cache;
Result.bIsDirty = false;
}
}
catch (Exception Ex)
{
// Don't bother failing if the file format has changed, simply abort the cache load
if (Ex.Message.Contains( "cannot be converted to type" )) // To catch serialization differences added when we added the DependencyInfo struct
{
Console.Error.WriteLine("Failed to read FlatCPPIncludeDependencyCache: {0}", Ex.Message);
}
}
return Result;
}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:30,代码来源:FlatCPPIncludeDepencencyCache.cs
示例2: GenerateDebugInfo
/**
* Generates debug info for a given executable
*
* @param Executable FileItem describing the executable to generate debug info for
*/
public static FileItem GenerateDebugInfo(FileItem Executable)
{
// Make a file item for the source and destination files
string FullDestPathRoot = Executable.AbsolutePath + ".app.dSYM";
string FullDestPath = FullDestPathRoot;
FileItem DestFile = FileItem.GetRemoteItemByPath(FullDestPath, UnrealTargetPlatform.IOS);
// Make the compile action
Action GenDebugAction = new Action(ActionType.GenerateDebugInfo);
if (!Utils.IsRunningOnMono)
{
GenDebugAction.ActionHandler = new Action.BlockingActionHandler(RPCUtilHelper.RPCActionHandler);
}
GenDebugAction.WorkingDirectory = GetMacDevSrcRoot();
GenDebugAction.CommandPath = "sh";
// note that the source and dest are switched from a copy command
GenDebugAction.CommandArguments = string.Format("-c '{0}/usr/bin/dsymutil {1} -o {2}; cd {2}/..; zip -r -y -1 {3}.app.dSYM.zip {3}.app.dSYM'",
DeveloperDir,
Executable.AbsolutePath,
FullDestPathRoot,
Path.GetFileName(Executable.AbsolutePath));
GenDebugAction.PrerequisiteItems.Add(Executable);
GenDebugAction.ProducedItems.Add(DestFile);
GenDebugAction.StatusDescription = GenDebugAction.CommandArguments;// string.Format("Generating debug info for {0}", Path.GetFileName(Executable.AbsolutePath));
GenDebugAction.bCanExecuteRemotely = false;
return DestFile;
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:34,代码来源:IOSToolChain.cs
示例3: PrecompileHeaderEnvironment
public PrecompileHeaderEnvironment( string InitModuleName, string InitPCHHeaderNameInCode, FileItem InitPrecompiledHeaderIncludeFilename, CPPCLRMode InitCLRMode, ModuleRules.CodeOptimization InitOptimizeCode )
{
ModuleName = InitModuleName;
PCHHeaderNameInCode = InitPCHHeaderNameInCode;
PrecompiledHeaderIncludeFilename = InitPrecompiledHeaderIncludeFilename;
CLRMode = InitCLRMode;
OptimizeCode = InitOptimizeCode;
}
开发者ID:colwalder,项目名称:unrealengine,代码行数:8,代码来源:UEBuildModule.cs
示例4: AddFile
public void AddFile(FileItem File)
{
Files.Add(File);
long FileLength = File.Info.Length;
TotalLength += FileLength;
VirtualLength += FileLength;
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:8,代码来源:Unity.cs
示例5: AddFile
/// <summary>
/// Adds a file to the current unity file. If splitting is required and the total size of the
/// unity file exceeds the split limit, then a new file is automatically started.
/// </summary>
/// <param name="File">The file to add.</param>
public void AddFile(FileItem File)
{
CurrentCollection.AddFile(File);
if (SplitLength != -1 && CurrentCollection.TotalLength > SplitLength)
{
EndCurrentUnityFile();
}
}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:13,代码来源:Unity.cs
示例6: DependencyCache
/**
* Constructor
*
* @param Cache File associated with this cache
*/
protected DependencyCache(FileItem Cache)
{
CacheCreateDate = DateTimeOffset.Now;
CacheUpdateDate = DateTimeOffset.Now;
CachePath = Cache.AbsolutePath;
DependencyMap = new Dictionary<string, DependencyInfo>(StringComparer.InvariantCultureIgnoreCase);
bIsDirty = false;
CreateFileExistsInfo();
}
开发者ID:Art1stical,项目名称:AHRUnrealEngine,代码行数:14,代码来源:DependencyCache.cs
示例7: DependencyCache
/**
* Constructor
*
* @param Cache File associated with this cache
*/
protected DependencyCache(FileItem Cache)
{
CacheCreateDate = DateTimeOffset.Now;
CacheUpdateDate = DateTimeOffset.Now;
CachePath = Cache.AbsolutePath;
DependencyMap = new Dictionary<string, DependencyInfo>();
bIsDirty = false;
CreateFileExistsInfo();
}
开发者ID:colwalder,项目名称:unrealengine,代码行数:14,代码来源:DependencyCache.cs
示例8: GenerateDebugInfo
/**
* Generates debug info for a given executable
*
* @param Executable FileItem describing the executable to generate debug info for
*/
public static FileItem GenerateDebugInfo(FileItem Executable)
{
// Make a file item for the source and destination files
string FullDestPathRoot = Executable.AbsolutePath + ".dSYM";
string FullDestPath = FullDestPathRoot;
FileItem DestFile;
if (!Utils.IsRunningOnMono && BuildHostPlatform.Current.Platform != UnrealTargetPlatform.Mac)
{
DestFile = FileItem.GetRemoteItemByPath (FullDestPath, UnrealTargetPlatform.IOS);
}
else
{
DestFile = FileItem.GetItemByPath (FullDestPath);
}
// Make the compile action
Action GenDebugAction = new Action(ActionType.GenerateDebugInfo);
if (!Utils.IsRunningOnMono)
{
GenDebugAction.ActionHandler = new Action.BlockingActionHandler(RPCUtilHelper.RPCActionHandler);
}
IOSToolChain Toolchain = UEToolChain.GetPlatformToolChain(CPPTargetPlatform.IOS) as IOSToolChain;
GenDebugAction.WorkingDirectory = Toolchain.GetMacDevSrcRoot();
GenDebugAction.CommandPath = "sh";
// note that the source and dest are switched from a copy command
if (!Utils.IsRunningOnMono && BuildHostPlatform.Current.Platform != UnrealTargetPlatform.Mac)
{
GenDebugAction.CommandArguments = string.Format("-c '/usr/bin/dsymutil \"{0}\" -f -o \"{1}\"; cd \"{1}/..\"; zip -r -y -1 {2}.dSYM.zip {2}.dSYM'",
Executable.AbsolutePath,
FullDestPathRoot,
Path.GetFileName(Executable.AbsolutePath));
}
else
{
GenDebugAction.CommandArguments = string.Format("-c '/usr/bin/dsymutil \"{0}\" -f -o \"{1}\"'",
Executable.AbsolutePath,
FullDestPathRoot);
}
GenDebugAction.PrerequisiteItems.Add(Executable);
GenDebugAction.ProducedItems.Add(DestFile);
GenDebugAction.StatusDescription = GenDebugAction.CommandArguments;// string.Format("Generating debug info for {0}", Path.GetFileName(Executable.AbsolutePath));
GenDebugAction.bCanExecuteRemotely = false;
return DestFile;
}
开发者ID:mymei,项目名称:UE4,代码行数:54,代码来源:IOSToolChain.cs
示例9: BatchFileInfo
public static void BatchFileInfo(FileItem[] Files)
{
// build a list of file paths to get info about
StringBuilder FileList = new StringBuilder();
foreach (FileItem File in Files)
{
FileList.AppendFormat("{0}\n", File.AbsolutePath);
}
// execute the command!
Int64[] FileSizeAndDates = RPCUtility.CommandHelper.RPCBatchFileInfo(GetSocket(), FileList.ToString());
// now update the source times
for (int Index = 0; Index < Files.Length; Index++)
{
Files[Index].Length = FileSizeAndDates[Index * 2 + 0];
Files[Index].LastWriteTime = new DateTimeOffset(RPCUtility.CommandHelper.FromRemoteTime(FileSizeAndDates[Index * 2 + 1]));
Files[Index].bExists = FileSizeAndDates[Index * 2 + 0] >= 0;
}
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:20,代码来源:RPCUtilHelper.cs
示例10: GetResponseFileName
/// <summary>
/// Get the name of the response file for the current linker environment and output file
/// </summary>
/// <param name="LinkEnvironment"></param>
/// <param name="OutputFile"></param>
/// <returns></returns>
public static string GetResponseFileName( LinkEnvironment LinkEnvironment, FileItem OutputFile )
{
// Construct a relative path for the intermediate response file
string ResponseFileName = Path.Combine( LinkEnvironment.Config.IntermediateDirectory, Path.GetFileName( OutputFile.AbsolutePath ) + ".response" );
if (UnrealBuildTool.HasUProjectFile())
{
// If this is the uproject being built, redirect the intermediate
if (Utils.IsFileUnderDirectory( OutputFile.AbsolutePath, UnrealBuildTool.GetUProjectPath() ))
{
ResponseFileName = Path.Combine(
UnrealBuildTool.GetUProjectPath(),
BuildConfiguration.PlatformIntermediateFolder,
Path.GetFileNameWithoutExtension(UnrealBuildTool.GetUProjectFile()),
LinkEnvironment.Config.TargetConfiguration.ToString(),
Path.GetFileName(OutputFile.AbsolutePath) + ".response");
}
}
// Convert the relative path to an absolute path
ResponseFileName = Path.GetFullPath( ResponseFileName );
return ResponseFileName;
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:28,代码来源:UEToolChain.cs
示例11: Load
/// <summary>
/// Loads the cache from disk
/// </summary>
/// <param name="Cache">The file to load</param>
/// <returns>The loaded instance</returns>
public static FlatCPPIncludeDependencyCache Load(FileItem Cache)
{
FlatCPPIncludeDependencyCache Result = null;
try
{
string CacheBuildMutexPath = Cache.AbsolutePath + ".buildmutex";
// If the .buildmutex file for the cache is present, it means that something went wrong between loading
// and saving the cache last time (most likely the UBT process being terminated), so we don't want to load
// it.
if (!File.Exists(CacheBuildMutexPath))
{
using (File.Create(CacheBuildMutexPath))
{
}
using (FileStream Stream = new FileStream(Cache.AbsolutePath, FileMode.Open, FileAccess.Read))
{
// @todo ubtmake: We can store the cache in a cheaper/smaller way using hash file names and indices into included headers, but it might actually slow down load times
// @todo ubtmake: If we can index PCHs here, we can avoid storing all of the PCH's included headers (PCH's action should have been invalidated, so we shouldn't even have to report the PCH's includes as our indirect includes)
BinaryFormatter Formatter = new BinaryFormatter();
Result = Formatter.Deserialize(Stream) as FlatCPPIncludeDependencyCache;
Result.CacheFileItem = Cache;
Result.bIsDirty = false;
}
}
}
catch (Exception Ex)
{
// Don't bother failing if the file format has changed, simply abort the cache load
if (Ex.Message.Contains( "cannot be converted to type" )) // To catch serialization differences added when we added the DependencyInfo struct
{
Console.Error.WriteLine("Failed to read FlatCPPIncludeDependencyCache: {0}", Ex.Message);
}
}
return Result;
}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:42,代码来源:FlatCPPIncludeDepencencyCache.cs
示例12: PostBuild
public virtual ICollection<FileItem> PostBuild(FileItem Executable, LinkEnvironment ExecutableLinkEnvironment)
{
return new List<FileItem>();
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:4,代码来源:UEToolChain.cs
示例13: GetResponseFileName
/// <summary>
/// Get the name of the response file for the current linker environment and output file
/// </summary>
/// <param name="LinkEnvironment"></param>
/// <param name="OutputFile"></param>
/// <returns></returns>
public static FileReference GetResponseFileName(LinkEnvironment LinkEnvironment, FileItem OutputFile)
{
// Construct a relative path for the intermediate response file
return FileReference.Combine(LinkEnvironment.Config.IntermediateDirectory, OutputFile.Reference.GetFileName() + ".response");
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:11,代码来源:UEToolChain.cs
示例14: AddPrerequisiteSourceFile
protected void AddPrerequisiteSourceFile(UEBuildTarget Target, UEBuildPlatform BuildPlatform, CPPEnvironment CompileEnvironment, FileItem SourceFile, List<FileItem> PrerequisiteItems)
{
PrerequisiteItems.Add(SourceFile);
RemoteToolChain RemoteThis = this as RemoteToolChain;
bool bAllowUploading = RemoteThis != null && BuildHostPlatform.Current.Platform != UnrealTargetPlatform.Mac; // Don't use remote features when compiling from a Mac
if (bAllowUploading)
{
RemoteThis.QueueFileForBatchUpload(SourceFile);
}
if (!BuildConfiguration.bUseUBTMakefiles) // In fast build iteration mode, we'll gather includes later on
{
// @todo ubtmake: What if one of the prerequisite files has become missing since it was updated in our cache? (usually, because a coder eliminated the source file)
// -> Two CASES:
// 1) NOT WORKING: Non-unity file went away (SourceFile in this context). That seems like an existing old use case. Compile params or Response file should have changed?
// 2) WORKING: Indirect file went away (unity'd original source file or include). This would return a file that no longer exists and adds to the prerequiteitems list
List<FileItem> IncludedFileList = CPPEnvironment.FindAndCacheAllIncludedFiles(Target, SourceFile, BuildPlatform, CompileEnvironment.Config.CPPIncludeInfo, bOnlyCachedDependencies: BuildConfiguration.bUseUBTMakefiles);
if (IncludedFileList != null)
{
foreach (FileItem IncludedFile in IncludedFileList)
{
PrerequisiteItems.Add(IncludedFile);
if (bAllowUploading &&
!BuildConfiguration.bUseUBTMakefiles) // With fast dependency scanning, we will not have an exhaustive list of dependencies here. We rely on PostCodeGeneration() to upload these files.
{
RemoteThis.QueueFileForBatchUpload(IncludedFile);
}
}
}
}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:33,代码来源:UEToolChain.cs
示例15: GatherPrerequisiteActions
/**
* Determines the full set of actions that must be built to produce an item.
* @param OutputItem - The item to be built.
* @param PrerequisiteActions - The actions that must be built and the root action are
*/
public static void GatherPrerequisiteActions(
FileItem OutputItem,
ref HashSet<Action> PrerequisiteActions
)
{
if (OutputItem != null && OutputItem.ProducingAction != null)
{
if (!PrerequisiteActions.Contains(OutputItem.ProducingAction))
{
PrerequisiteActions.Add(OutputItem.ProducingAction);
foreach (FileItem PrerequisiteItem in OutputItem.ProducingAction.PrerequisiteItems)
{
GatherPrerequisiteActions(PrerequisiteItem, ref PrerequisiteActions);
}
}
}
}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:22,代码来源:ActionGraph.cs
示例16: CopyBundleResource
FileItem CopyBundleResource(UEBuildBundleResource Resource, FileItem Executable)
{
Action CopyAction = new Action(ActionType.CreateAppBundle);
CopyAction.WorkingDirectory = Path.GetFullPath(".");
CopyAction.CommandPath = "/bin/sh";
CopyAction.CommandDescription = "";
string BundlePath = Executable.AbsolutePath.Substring(0, Executable.AbsolutePath.IndexOf(".app") + 4);
string SourcePath = Path.Combine(CopyAction.WorkingDirectory, Resource.ResourcePath);
string TargetPath = Path.Combine(BundlePath, "Contents", Resource.BundleContentsSubdir, Path.GetFileName(Resource.ResourcePath));
FileItem TargetItem;
if(BuildHostPlatform.Current.Platform == UnrealTargetPlatform.Mac)
{
TargetItem = FileItem.GetItemByPath(TargetPath);
}
else
{
TargetItem = FileItem.GetRemoteItemByPath(TargetPath, RemoteToolChainPlatform);
}
CopyAction.CommandArguments = string.Format("-c 'cp -f -R \"{0}\" \"{1}\"; touch -c \"{2}\"'", ConvertPath(SourcePath), Path.GetDirectoryName(TargetPath).Replace('\\', '/') + "/", TargetPath.Replace('\\', '/'));
CopyAction.PrerequisiteItems.Add(Executable);
CopyAction.ProducedItems.Add(TargetItem);
CopyAction.bShouldOutputStatusDescription = Resource.bShouldLog;
CopyAction.StatusDescription = string.Format("Copying {0} to app bundle", Path.GetFileName(Resource.ResourcePath));
CopyAction.bCanExecuteRemotely = false;
if (BuildHostPlatform.Current.Platform != UnrealTargetPlatform.Mac)
{
CopyAction.ActionHandler = new Action.BlockingActionHandler(RPCUtilHelper.RPCActionHandler);
}
if (Directory.Exists(Resource.ResourcePath))
{
foreach (string ResourceFile in Directory.GetFiles(Resource.ResourcePath, "*", SearchOption.AllDirectories))
{
QueueFileForBatchUpload(FileItem.GetItemByFullPath(Path.GetFullPath(ResourceFile)));
}
}
else
{
QueueFileForBatchUpload(FileItem.GetItemByFullPath(SourcePath));
}
return TargetItem;
}
开发者ID:unrealengine47,项目名称:UnrealEngine4,代码行数:47,代码来源:MacToolChain.cs
示例17: CacheResolvedIncludeFullPath
/// <summary>
/// Caches the fully resolved path of the include.
/// TODO: This method should be more tightly coupled with the Resolve step itself so we don't have to reach into the cache externally
/// using internal details like the list index.
/// </summary>
/// <param name="File">The file whose include is being resolved</param>
/// <param name="DirectlyIncludedFileNameIndex">Index in the resolve list to quickly find the include in question in the existing cache.</param>
/// <param name="DirectlyIncludedFileNameFullPath">Full path name of the resolve include.</param>
public void CacheResolvedIncludeFullPath(FileItem File, int DirectlyIncludedFileNameIndex, string DirectlyIncludedFileNameFullPath)
{
if (BuildConfiguration.bUseIncludeDependencyResolveCache)
{
var Includes = DependencyMap[File.AbsolutePath.ToLowerInvariant()].Includes;
var IncludeToResolve = Includes[DirectlyIncludedFileNameIndex];
if (BuildConfiguration.bTestIncludeDependencyResolveCache)
{
// test whether there are resolve conflicts between modules with different include paths.
if (IncludeToResolve.IncludeResolvedName != null && IncludeToResolve.IncludeResolvedName != DirectlyIncludedFileNameFullPath)
{
throw new BuildException("Found directly included file that resolved differently in different modules. File ({0}) had previously resolved to ({1}) and now resolves to ({2}).",
File.AbsolutePath, IncludeToResolve.IncludeResolvedName, DirectlyIncludedFileNameFullPath);
}
}
Includes[DirectlyIncludedFileNameIndex].IncludeResolvedName = DirectlyIncludedFileNameFullPath;
if (!String.IsNullOrEmpty(DirectlyIncludedFileNameFullPath))
{
bIsDirty = true;
}
}
}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:30,代码来源:DependencyCache.cs
示例18: GetCachedDirectDependencies
/**
* Returns the direct dependencies of the specified FileItem if it exists in the cache and if the
* file has a last write time before the creation time of the cache.
*
* The code also keeps track of whether dependencies have been successfully accessed for a given
* file.
*
* @param File File to try to find dependencies in cache
* @param Result [out] List of dependencies if successful, null otherwise
* @param HasUObjects True if the file was found to have UObject classes, otherwise false
*/
public bool GetCachedDirectDependencies(FileItem File, out List<DependencyInclude> Result, out bool HasUObjects)
{
Result = null;
HasUObjects = false;
// Check whether File is in cache.
DependencyInfo? DependencyInfo = GetCachedDependencyInfo(File);
if( DependencyInfo != null )
{
// Check if any of the resolved includes is missing
foreach (var Include in DependencyInfo.Value.Includes)
{
if (!String.IsNullOrEmpty(Include.IncludeResolvedName))
{
bool bIncludeExists = false;
string FileExistsKey = Include.IncludeResolvedName.ToLowerInvariant();
if (FileExistsInfo.TryGetValue(FileExistsKey, out bIncludeExists) == false)
{
bIncludeExists = System.IO.File.Exists(Include.IncludeResolvedName);
FileExistsInfo.Add(FileExistsKey, bIncludeExists);
}
if (!bIncludeExists)
{
// Remove entry from cache as it's stale, as well as the include which no longer exists
RemoveFileFromCache(Include.IncludeResolvedName);
RemoveFileFromCache(File.AbsolutePath);
return false;
}
}
}
// Cached version is up to date, return it.
Result = DependencyInfo.Value.Includes;
HasUObjects = DependencyInfo.Value.HasUObjects;
return true;
}
// Not in cache.
else
{
return false;
}
}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:52,代码来源:DependencyCache.cs
示例19: ApplySharedPCH
private PrecompileHeaderEnvironment ApplySharedPCH(CPPEnvironment GlobalCompileEnvironment, CPPEnvironment CompileEnvironment, CPPEnvironment ModuleCompileEnvironment, List<FileItem> CPPFiles, ref FileItem SharedPCHHeaderFile)
{
// Check to see if we have a PCH header already setup that we can use
var SharedPCHHeaderFileCopy = SharedPCHHeaderFile;
var SharedPCHEnvironment = GlobalCompileEnvironment.SharedPCHEnvironments.Find(Env => Env.PrecompiledHeaderIncludeFilename == SharedPCHHeaderFileCopy);
if (SharedPCHEnvironment == null)
{
return null;
}
// Don't mix CLR modes
if (SharedPCHEnvironment.CLRMode != ModuleCompileEnvironment.Config.CLRMode)
{
Log.TraceVerbose("Module {0} cannot use existing Shared PCH '{1}' (from module '{2}') because CLR modes don't match", Name, SharedPCHEnvironment.PrecompiledHeaderIncludeFilename.AbsolutePath, SharedPCHEnvironment.ModuleName);
SharedPCHHeaderFile = null;
return null;
}
// Don't mix RTTI modes
if (bUseRTTI)
{
Log.TraceVerbose("Module {0} cannot use existing Shared PCH '{1}' (from module '{2}') because RTTI modes don't match", Name, SharedPCHEnvironment.PrecompiledHeaderIncludeFilename.AbsolutePath, SharedPCHEnvironment.ModuleName);
SharedPCHHeaderFile = null;
return null;
}
// Don't mix non-optimized code with optimized code (PCHs won't be compatible)
var SharedPCHCodeOptimization = SharedPCHEnvironment.OptimizeCode;
var ModuleCodeOptimization = ModuleCompileEnvironment.Config.OptimizeCode;
if (CompileEnvironment.Config.Target.Configuration != CPPTargetConfiguration.Debug)
{
if (SharedPCHCodeOptimization == ModuleRules.CodeOptimization.InNonDebugBuilds)
{
SharedPCHCodeOptimization = ModuleRules.CodeOptimization.Always;
}
if (ModuleCodeOptimization == ModuleRules.CodeOptimization.InNonDebugBuilds)
{
ModuleCodeOptimization = ModuleRules.CodeOptimization.Always;
}
}
if (SharedPCHCodeOptimization != ModuleCodeOptimization)
{
Log.TraceVerbose("Module {0} cannot use existing Shared PCH '{1}' (from module '{2}') because optimization levels don't match", Name, SharedPCHEnvironment.PrecompiledHeaderIncludeFilename.AbsolutePath, SharedPCHEnvironment.ModuleName);
SharedPCHHeaderFile = null;
return null;
}
return SharedPCHEnvironment;
}
开发者ID:colwalder,项目名称:unrealengine,代码行数:51,代码来源:UEBuildModule.cs
示例20: Load
/**
* Loads the cache from the passed in file.
*
* @param Cache File to deserialize from
*/
public static DependencyCache Load(FileItem Cache)
{
DependencyCache Result = null;
try
{
using (FileStream Stream = new FileStream(Cache.AbsolutePath, FileMode.Open, FileAccess.Read))
{
BinaryFormatter Formatter = new BinaryFormatter();
Result = Formatter.Deserialize(Stream) as DependencyCache;
}
Result.CreateFileExistsInfo();
Result.ResetUnresolvedDependencies();
}
catch (Exception Ex)
{
// Don't bother logging this expected error.
// It's due to a change in the CacheCreateDate type.
if (Ex.Message != "Object of type 'System.DateTime' cannot be converted to type 'System.DateTimeOffset'" &&
Ex.Message != "Object of type 'System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.List`1[System.String]]' cannot be converted to type 'System.Collections.Generic.Dictionary`2[System.String,UnrealBuildTool.DependencyInfo]'.") // To catch serialization differences added when we added the DependencyInfo struct
{
Console.Error.WriteLine("Failed to read dependency cache: {0}", Ex.Message);
}
}
return Result;
}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:30,代码来源:DependencyCache.cs
注:本文中的UnrealBuildTool.FileItem类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论