Files
UnrealEngineUWP/Engine/Source/Programs/AutomationTool/Localization/LocalizationProvider.cs

149 lines
5.1 KiB
C#
Raw Normal View History

Copying //UE4/Orion-Staging to //UE4/Main (Origin: //Orion/Dev-General @2826496) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2826201 on 2016/01/13 by Zabir.Hoque Add more verbose logging to try to understand #OR-11297 #lockdown Andrew.Grant #CodeReview Marcus.Wassmer #RB none #TESTS compiled Win64 debug editor, ran agora_p Change 2826170 on 2016/01/13 by Marcus.Wassmer Flush unloaded resource properly in LoadMap #codereview Gil.Gribb #rb none #test cycling game. memory is freed properly now. #lockdown Andrew.Grant Change 2826135 on 2016/01/12 by Michael.Noland Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation - Disabled async streaming for the duration of the QOS ping measurement to avoid hitches - Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future) - Added logging of the current average frame time when the datacenter ping is finalized - Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4) #jira OR-12453 #rb paul.moore #tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc... Merging CL# 2826128 using //Orion/Main_to_//Orion/Dev-General Change 2826131 on 2016/01/12 by Michael.Noland #UE4 - added print out of MS/FPS during Qos ping evaluation #rb michael.noland #tests loaded up through login screen to see output Merging CL# 2825678 using //Orion/Main_to_//Orion/Dev-General Change 2826128 on 2016/01/12 by Michael.Noland Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation - Disabled async streaming for the duration of the QOS ping measurement to avoid hitches - Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future) - Added logging of the current average frame time when the datacenter ping is finalized - Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4) #jira OR-12453 #rb paul.moore #tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc... Merging CL# 2826116 using //Orion/Release-Next->//Orion/Main Change 2826116 on 2016/01/12 by Michael.Noland Orion: Improve login screen on PC to reduce the potential impact of framerate on data center ping calculation - Disabled async streaming for the duration of the QOS ping measurement to avoid hitches - Added a circular throbber in the top left corner of the login screen indicating that something is async streaming (as a diagnostic tool for users affected by the datacenter ping, can be removed in the future) - Added logging of the current average frame time when the datacenter ping is finalized - Added a 'Pick Ideal Settings' button to the login screen (note: on the actual screen, not the login widget, so it will not appear on PS4) #jira OR-12453 #rb paul.moore #tests Ran a QOS server and client and verified that the new logging is occurring, tried out the new benchmark button, etc... #lockdown andrew.grant #codereview josh.markiewicz Change 2825772 on 2016/01/12 by Dmitry.Rekman Linux signal handling improvements. - Switch crash handlers to use "crash malloc" (preallocated memory) on crash. - Remove unnecessary memory allocations from graceful termination handler. #rb none #tests Run the Linux server and crashed it a few times. #codereview David.Vossel, Michael.Trepka Change 2825768 on 2016/01/12 by Josh.Markiewicz #UE4 - added print out of MS/FPS during Qos ping evaluation #rb michael.noland #tests loaded up through login screen to see output Change 2825703 on 2016/01/12 by Brian.Karis Switched on new motion blur. Set temporal AA sharpness to 1. #rb none #TESTS editor Change 2825689 on 2016/01/12 by Lina.Halper Fix for get animation notify crash https://jira.ol.epicgames.net/browse/OR-12248 https://jira.ol.epicgames.net/browse/OR-12348 - Also fixed the crash in preview of persona due to blend sample cache contains previous animation data - Also fixed blend space player to reinitialize cache data - The main issue is marker doesn't clamp the length, causing notifies ensure to trigger. #rb : Laurent.Delayen #tests: 10 Sparrows bot match for long time #code review: Martin.Wilson #lockdown: Andrew.Grant Change 2825680 on 2016/01/12 by Martin.Mittring fixed all cases with r.Tonemapper.ScreenPercentage, ScreenPercentage, Fringe, Vignette, ViewRect, flickering with transluceny (View members have been modified while other thread was reading) #rb:Olaf.Piesche, David.Hill #test: PC, many cases Change 2825579 on 2016/01/12 by Chris.Bunner Force shadow shape bone indices on the required update list. #rb Lina.Halper, Rolando.Caloca #tests Editor #codereview Daniel.Wright #jira OR-12339 Change 2825443 on 2016/01/12 by Martin.Mittring
2016-01-14 08:11:47 -05:00
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.IO;
using AutomationTool;
using UnrealBuildTool;
namespace EpicGames.Localization
{
public struct ProjectImportExportInfo
{
/** The destination path for the files containing the gathered data for this project (extracted from its config file - relative to the root working directory for the commandlet) */
public string DestinationPath;
/** The name to use for this projects manifest file (extracted from its config file) */
public string ManifestName;
/** The name to use for this projects archive file (extracted from its config file) */
public string ArchiveName;
/** The name to use for this projects portable object file (extracted from its config file) */
public string PortableObjectName;
/** The native culture for this project (extracted from its config file) */
public string NativeCulture;
/** The cultures to generate for this project (extracted from its config file) */
public List<string> CulturesToGenerate;
/** True if we should use a per-culture directly when importing/exporting */
public bool bUseCultureDirectory;
};
public struct ProjectInfo
{
/** The name of this project */
public string ProjectName;
/** Path to this projects localization config files (relative to the root working directory for the commandlet) - ordered so that iterating them runs in the correct order */
public List<string> LocalizationConfigFiles;
/** Config data used by the PO file import process */
public ProjectImportExportInfo ImportInfo;
/** Config data used by the PO file export process */
public ProjectImportExportInfo ExportInfo;
};
public abstract class LocalizationProvider
{
public struct LocalizationProviderArgs
{
public string RootWorkingDirectory;
public CommandUtils CommandUtils;
};
public LocalizationProvider(LocalizationProviderArgs InArgs)
{
RootWorkingDirectory = InArgs.RootWorkingDirectory;
CommandUtils = InArgs.CommandUtils;
LocalizationBranchName = CommandUtils.ParseParamValue("LocalizationBranch");
bUploadAllCultures = CommandUtils.ParseParam("UploadAllCultures");
}
public virtual string GetLocalizationProviderId()
{
throw new AutomationException("Unimplemented GetLocalizationProviderId.");
}
public virtual void DownloadProjectFromLocalizationProvider(string ProjectName, ProjectImportExportInfo ProjectImportInfo)
{
throw new AutomationException("Unimplemented DownloadProjectFromLocalizationProvider.");
}
public virtual void UploadProjectToLocalizationProvider(string ProjectName, ProjectImportExportInfo ProjectExportInfo)
{
throw new AutomationException("Unimplemented UploadProjectToLocalizationProvider.");
}
public static LocalizationProvider GetLocalizationProvider(string InLocalizationProviderId, LocalizationProvider.LocalizationProviderArgs InLocalizationProviderArgs)
{
if (CachedLocalizationProviderTypes == null)
{
// Find all types that derive from LocalizationProvider in any of our DLLs
CachedLocalizationProviderTypes = new Dictionary<string, Type>();
var LoadedAssemblies = AppDomain.CurrentDomain.GetAssemblies();
foreach (var Dll in LoadedAssemblies)
{
var AllTypes = Dll.GetTypes();
foreach (var PotentialLocalizationNodeType in AllTypes)
{
if (PotentialLocalizationNodeType != typeof(LocalizationProvider) && !PotentialLocalizationNodeType.IsAbstract && !PotentialLocalizationNodeType.IsInterface && typeof(LocalizationProvider).IsAssignableFrom(PotentialLocalizationNodeType))
{
// Types should implement a static StaticGetLocalizationProviderId method
var Method = PotentialLocalizationNodeType.GetMethod("StaticGetLocalizationProviderId");
if (Method != null)
{
try
{
var LocalizationProviderId = Method.Invoke(null, null) as string;
CachedLocalizationProviderTypes.Add(LocalizationProviderId, PotentialLocalizationNodeType);
}
catch
{
BuildCommand.LogWarning("Type '{0}' threw when calling its StaticGetLocalizationProviderId method.", PotentialLocalizationNodeType.FullName);
}
}
else
{
BuildCommand.LogWarning("Type '{0}' derives from LocalizationProvider but is missing its StaticGetLocalizationProviderId method.", PotentialLocalizationNodeType.FullName);
}
}
}
}
}
Type LocalizationNodeType;
CachedLocalizationProviderTypes.TryGetValue(InLocalizationProviderId, out LocalizationNodeType);
if (LocalizationNodeType != null)
{
try
{
return Activator.CreateInstance(LocalizationNodeType, new object[] { InLocalizationProviderArgs }) as LocalizationProvider;
}
catch
{
BuildCommand.LogWarning("Unable to create an instance of the type '{0}'", LocalizationNodeType.FullName);
}
}
else
{
throw new AutomationException("Could not find a localization provider for: '" + InLocalizationProviderId + "'");
}
return null;
}
protected string RootWorkingDirectory;
protected string LocalizationBranchName;
protected bool bUploadAllCultures;
protected CommandUtils CommandUtils;
private static Dictionary<string, Type> CachedLocalizationProviderTypes;
};
}