You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3195953 on 2016/11/12 by Leslie.Nivison Rollback //UE4/Release-4.14/Engine/Plugins/Runtime/Nvidia to changelist 3193712 New GameWorks license from NVIDIA #jira UEPROD-900 Change 3195944 on 2016/11/12 by Leslie.Nivison Removing GameWorks SDK license until we get a new one from NVIDIA #jira UEPROD-900 Change 3195942 on 2016/11/11 by Chris.Gagnon Removing Ansel from 4.14 until revised EULA is handle. #jira UE-none Change 3195431 on 2016/11/11 by Mitchell.Wilson Rebuilt lighting in subway reflections sample #jira UE-38538 Change 3195080 on 2016/11/11 by mason.seay Extended floor to allow more driving space #jira UE-29618 Change 3194886 on 2016/11/11 by Chris.Babcock Correct handling for 6x6 blocksize in ASTC compressor #jira UE-38513 #ue4 #android Change 3193712 on 2016/11/10 by Leslie.Nivison Updating Ansel TPS info per NVIDIA response #jira UEPROD-900 Change 3193691 on 2016/11/10 by Lina.Halper #jira: UE-38488 Change 3193532 on 2016/11/10 by Lauren.Ridge Fix to keep the user in VR editing mode after leaving VR PIE. #jira UE-38317 Change 3193468 on 2016/11/10 by Leslie.Nivison Removing unneeded license #jira UEPROD-900 Change 3193465 on 2016/11/10 by Leslie.Nivison Updating credits for 4.14 #jira UEPROD-902 Change 3193416 on 2016/11/10 by Daniel.Lamb Changed default of exclude editor only content flag. #jira UE-38455 Change 3193399 on 2016/11/10 by Mitchell.Wilson Applied correct material to certain LODs of tree meshes in KiteDemo #jira UE-38472 Change 3193049 on 2016/11/10 by Thomas.Sarkanen Fix disappearing mesh on undo in skeletal mesh editor Also fixes crash on undo in morph target panel #jira UE-38430 - Undo in Skeletal Mesh Editor causes model to disappear #jira UE-38437 - Crash when Undo after editing a weight in Morph Target Previewer Change 3192655 on 2016/11/09 by Ryan.Vance #jira UE-37238 Pulling in 3164679 and 3169467 which didn't make the 4.14 cut. Also changed to a full inverse for InvTranslatedViewProjectionMatrix in FViewMatrices::UpdateViewMatrix. Change 3192613 on 2016/11/09 by Leslie.Nivison Updating licenses due to TPS version updates. Logging undocumented TPS per engine audit #jira UEPROD-900 Change 3192197 on 2016/11/09 by Daniel.Wright Added SUPPORT_CONTACT_SHADOWS, only standard deferred lighting supports it. Fixes scene depth texture bound in forward shading base pass. #jira UE-38340 Change 3192182 on 2016/11/09 by Rolando.Caloca UE4.14 - Fix recompute tangents not working when skin cache is enabled #jira UE-38398 Change3191695on 2016/11/09 by Chris.Wood Editor heartbeat changes for 4.14 [AN-1003] - Make Editor heartbeat 1min [UE-38417] - Editor heartbeat changes (vanilla editor, new interval, debugger attached) Also added IsDebugger, IsVanilla and IntervalSec to Editor.Usage.Heartbeat #jira UE-38417 Change 3191437 on 2016/11/09 by Jack.Porter Fix for LandscapeInfo crash when using Force Delete #jira UE-37172 Change 3191033 on 2016/11/08 by Leslie.Nivison Adding licenses for marketplace plugins #jira UEPROD-901 Change 3191028 on 2016/11/08 by Leslie.Nivison Updating licenses due to TPS version updates. Logging undocumented TPS per engine audit #jira UEPROD-900 Change 3190632 on 2016/11/08 by mason.seay Updated testmap and assets #jira UE-29618 Change 3190624 on 2016/11/08 by Jamie.Dale Fixed case where FHTML5TargetPlatform::RefreshHTML5Setup could incorrectly add an empty device Changes to UStrProperty::ExportTextItem caused FParse::Value to (correctly) read an empty string for DevicePath which passed the DirectoryExists check (where it would have previously read "))" which would fail that check). #jira UE-38157 Change 3190443 on 2016/11/08 by Josh.Adams - Somehow checking in my tested shelf messed up #jira UE-38304 Change 3190354 on 2016/11/08 by Josh.Adams - Vulkan now always being compiled in, if the SDK exists. Compiling not dependent on project settings #jira UE-38304 Change 3190123 on 2016/11/08 by zachary.wilson Updating testing content for sureface per-pixel improvements #jira UE-29618 Change 3190113 on 2016/11/08 by Alexis.Matte Make sure the default light map channel is 1 and not 0 #jira UE-35627 Change 3190102 on 2016/11/08 by Dmitry.Rekman Linux: default to binned everywhere (UE-38287). - Fixes suspicious crashes happening in uncooked build. Workaround, needs separate investigation. #jira UE-38287 Change 3190000 on 2016/11/08 by Allan.Bentham Removed old protostar loadmap hack. #jira UE-38342 Change 3189914 on 2016/11/08 by Allan.Bentham Fix vulkan crash when rendering sky capture. Fix crash when rendering LDR scene capture on device. #jira UE-38291 Change 3189861 on 2016/11/08 by Thomas.Sarkanen Fix out of bounds access when using hidden bones with master pose components Code was trying to to access the ReferenceToLocal array using a parent index from the master pose component. Now changed to only use indices known to be valid (i.e. this component's) to index the ReferenceToLocal array. Bone visibility is still master-authoratitive. #jira UE-38214 - [CrashReport] UE4Editor_Engine!UpdateRefToLocalMatrices() [skeletalrender.cpp:238] Change 3189370 on 2016/11/07 by Daniel.Wright Only check transform mismatches for static lighting in UStaticMeshComponent::ApplyComponentInstanceData on components that actually can have static lighting #jira UE-38272 Change 3189358 on 2016/11/07 by Mark.Satterthwaite Intel Metal drivers can no longer compile our compute shaders reliably meaning Intel Macs must always use Metal SM4 as otehrwise they will crash. #jira UE-38299 Change 3189273 on 2016/11/07 by Rolando.Caloca UE4.14 - Integrate fix from 3161219 #jira UE-38270 Change 3189084 on 2016/11/07 by Chris.Bunner Fix RemoveAAJitter from projection matrix. #jira UE-37701, UE-38003 Change 3188636 on 2016/11/07 by Allan.Bentham use glVertexAttribIPointer only on ES3.1 enabled projects. #jira UE-38241 Change 3188596 on 2016/11/07 by Yannick.Lange VR Editor: Fix crash when closing window while in VR Editor #jira UE-37995 Change 3188433 on 2016/11/07 by Matthew.Griffin Add starter content .upack files to starter_content tag so that they should still be installed if templates/feature packs option is de-selected in the Launcher Change 3187739 on 2016/11/04 by Mitchell.Wilson Updating DefautlEditor and DefaultEngine ini to correct path to VehicleMenu level. #jira UE-29748 Change 3187536 on 2016/11/04 by Martin.Wilson Fix for "Renaming a montage section via its details panel doesn't update the section correctly" #jira UE-35929 Change 3187499 on 2016/11/04 by zachary.wilson Checking in content fixes for Lighting Scenarios test level #jira UE-29618 Change 3187492 on 2016/11/04 by mason.seay Updated map to improve testing #jira UE-29618 Change 3187438 on 2016/11/04 by Nick.Shin fix html5 port number for cook-on-the-fly option #jira UE-38032 - Quicklaunch HTML5 fails on Chrome. Browser returns "This site can't be reached 127.0.0.1 refused to connect" Change 3187305 on 2016/11/04 by Martin.Wilson Fix log spam from animation sequence thumbnails #jira UE-38224 Change 3187260 on 2016/11/04 by Lauren.Ridge Fix for crash on opening a level in VR Editing mode. When closing VREditorMode for a level load, HMD no longer leaves stereo mode. #jira UE-32541 Change 3187224 on 2016/11/04 by Robert.Manuszewski Proper fix for a crash when launching BP-only project from the Editor with EDL enabled (does not modify UE4Game target binaries) #jira UE-37617 Change 3187136 on 2016/11/04 by Alexis.Matte Fbx importer for static mesh, make sure that we order the materials array to follow the section order. #jira UE-38242 Change 3187065 on 2016/11/04 by Mitchell.Wilson Updated BP_Commentary_Box to resolve warnings with array if the box opens then closes before the text is rendered. #jira UE-38266 Change 3187056 on 2016/11/04 by Mike.Beach Guarding against a rare crash that occurs when compiling a Blueprint after hot-reload. GUnrealEd was null, which is concerning (as it could have resounding effects in other systems), but as I could not repro it more than once (to figure it out more) I simply guarded the use of a null pointer here. #jira UE-38198 Change 3187040 on 2016/11/04 by Matthew.Griffin Corrected path to DotNETCommon folder Exclude all editor plugin pdbs from stripping #jira UE-37072 Change 3186984 on 2016/11/04 by Marc.Audy Fix crash when null component considered #jira UE-36493 Change 3186600 on 2016/11/04 by Max.Chen Sequencer: Fix crash in sequencer editor mode. #jira UE-38205 Change 3186564 on 2016/11/04 by Nick.Shin checking in latest physx libs for html5 #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3186258 on 2016/11/03 by Nick.Shin fix for automation build to handle deleting of windows x86 & x64 libs properly #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3186225 on 2016/11/03 by Lauren.Ridge Fix for foliage brush not showing up until after first motion controller click. #jira UE-38002 Change 3186100 on 2016/11/03 by Chris.Babcock Update local notifications to deal with depreciated API #jira UE-38236 #ue4 #android Change 3186074 on 2016/11/03 by Mitchell.Wilson Rebuilt lighting in Content Examples Welcome level #jira UE-38239 Change 3185923 on 2016/11/03 by Lina.Halper Fixed issue with animation not ticking in inactive world causing it to update parent animation #jira: UE-37933 Change 3185764 on 2016/11/03 by Mitchell.Wilson Updating deprecated node in MyCharacter_UMG. #jira UE-38229 Change 3185683 on 2016/11/03 by Nick.Shin non SSE2 version of PhysX for HTML5 #jira UE-38179 HTML5 Player falls through world on Firefox 64-bit Change 3185492 on 2016/11/03 by Ben.Woodhouse Workaround for very high render query memory overhead on D3D12. Add a cvar to limit timestamp queries allocated by the GPU profiler in a given frame. On D3D12 this limit is 1024 - other RHIs remain unbounded. Currently render queries are 64KB each on D3D12, so this prevents high memory overhead on particular frames, e.g when we render a large number of reflection captures. In practice, most frames are under 400 queries, so in practice we shouldn't hit the limit except in extreme cases. #jira UE-38139 Change 3185481 on 2016/11/03 by Dmitry.Rekman Remove version number from Linux README (UE-38059). #jira UE-38059 Change 3185322 on 2016/11/03 by Ryan.Gerleve Allow path names in NetFieldExportGroups to be remapped on the client. #jira UE-37990 Change 3185293 on 2016/11/03 by Matthew.Griffin Exclude UnrealControls and iPhonePackager from Build Tools CS node on non-Windows platforms as they don't compile #jira UE-34016 Change 3185252 on 2016/11/03 by Michael.Trepka Properly revert to OpenGL on Macs that do not support Metal #jira UE-38190 Change 3184835 on 2016/11/03 by Jurre.deBaare Crash when using undo in the preview scene settings of Persona #fix Ensure that the profile index is valid after undo-ing #misc Added transactions for adding/remove of the profiles #jira UE-38142 Change 3184833 on 2016/11/03 by Jack.Porter Fixed crash when ENABLE_VERIFY_GL and r.MobileOnChipMSAA is enabled on Android #jira UE-38186 Change 3184418 on 2016/11/02 by Ryan.Vance #jira UE-38161 Adding ISceneViewExtension::UsePostInitView which will be used to enable/disable the usage of PostRenderViewFamily_RenderThread and PostRenderView_RenderThread which was added earlier. We need to enable this behavior based on the hmd's compositor behavior, so a simple cvar wont work. I missed the PostPresent implementation for steamvr in the earlier check in. Change 3184286 on 2016/11/02 by Dan.Oconnor Fix for IsValidLowLevel check being rotten. More correct fix will go into Dev-BP, but this is a low risk stop-gap #jira UE-38149 Change 3184283 on 2016/11/02 by Arne.Schober DR - UE-38155 replicated MS CL 3183837 - PSO Dangling Pointers: The PSO cache was returning pointers out of a Map which is based on a sparse Array and those pointers could become invalid if other insertions happen. #jira UE-38155 Change 3184244 on 2016/11/02 by Richard.Ugarte #jira UE-37534 Checking in updated UE4_Demo_Head_D on behalf of MikeB Change 3184171 on 2016/11/02 by Michael.Trepka Made Mac CrashReportClient high-DPI aware and fixed high-DPI handling in FMacWindow::IsPointInWindow() #jira UE-37697 Change 3184126 on 2016/11/02 by Lauren.Ridge VR Editor: Fixes for foliage painting only working on one controller, and for full press not painting foliage. #jira UE-38147 #jira UE-38002 Change 3183997 on 2016/11/02 by Mitchell.Wilson Scaled and Rotated 3d Widget to the correct position on example 2.3 in Content Examples UMG. Adjusted collision on example 1.4 in Content Examples Physics. Updated collision on SM_ExampleMesh_Rocket. Realigned some text render actors in Content Examples Post Process. #jira UE-38099 UE-38078 UE-38064 Change 3183945 on 2016/11/02 by Mieszko.Zielinski Fixed changing AreaClass of NavLinkProxy point links not having any effect on navmesh generation #UE4 #jira UE-38137 Change 3183906 on 2016/11/02 by Nick.Shin for OSX (release-4.14 stream): new OSX clang (from emscripten tool chain) configured by jukka from Mozilla see Engine/Extras/ThirdPartyNotUE/emsdk/emscripten/incoming/EPIC_VERSION for details on where did this version come from fixes for OSX -- update existing (bash shell script and UE4 c#) build files to use the new "incoming" emsdk #jira UE-37329 - Step 'Compile UE4Game HTML5' - 300 Warnings Change 3183899 on 2016/11/02 by Mieszko.Zielinski Fixed EQS debugger not drawing item labels #UE4 #jira UE-38122 Change 3183239 on 2016/11/02 by Peter.Sauerbrei fix for mobile provision with UUID only filename being allowed again by copying them to a new file name which allows them to be used. #jira UE-38006 Change 3183149 on 2016/11/02 by Luke.Thatcher [RELEASE] [SHOOTERGAME] [!] Fix "Is Talking" icon on ShooterGame scoreboard, after PS4 OSS refactor. - ShooterGame was comparing FUniqueNetId::ToString() against AShooterPlayerState::GetShortPlayerName(). - This is wrong, since the NetId is not guaranteed to be equal to the player's name. #jira UE-38011 Change 3183005 on 2016/11/02 by Luke.Thatcher [RELEASE] [PS4] [^] Merging (as edit) PS4 OSS fixes from Engine to OrionGame. #jira UE-38017 UE-38020 Original Changelists: 3182765 [RELEASE] [PS4] [~] Additional logging for PS4 OSS "Play Together". 3182766 [RELEASE] [PS4] [!] Fix assert in FUniqueNetIdPS4::FindOrCreate. We were assuming an online-only ID could never become a local ID. This isn't the case in the following scenario: - Two users join a session on two separate PS4s. - One user signs into the other user's PS4 with the same account, with a second controller. PSN logs him out of the first PS4. - That user's Net ID has now migrated from being online-only, to local-with-online. This is a case that was not handled. 3182767 [RELEASE] [PS4] [!] Fix PS4 session invitations. - Was calling old Web API with SceNpOnlineId where SceNpAccountId is needed. - Replaced with NpToolkit2's session invitation API. 3182892 [RELEASE] [PS4] [!] Fix incorrect identity API implementation in PS4 OSS. - System events directly drive the login state of a user. This also removes the blocking call to sceNpGetState(). - GetAuthToken is only called if the engine calls IOnlineIdentity::Login(). 3182951 [RELEASE] [PS4] [!] Fix "play together" invitations handling in PS4 OSS. - Wrong condition in GetUserWebApiContext. Web API contexts can be created for local users (i.e. FUniqueNetIdPS4 instances with a valid SceUserServiceUserId). Change 3182992 on 2016/11/02 by Nick.Darnell UMG Editor - Fixing a regression with the editor, closing the sequencer tab and reopening the editor should no longer cause a crash. #jira UE-38098 Change 3182951 on 2016/11/02 by Luke.Thatcher [RELEASE] [PS4] [!] Fix "play together" invitations handling in PS4 OSS. - Wrong condition in GetUserWebApiContext. Web API contexts can be created for local users (i.e. FUniqueNetIdPS4 instances with a valid SceUserServiceUserId). #jira UE-38017 [CL3201696by Matthew Griffin in Main branch]
580 lines
21 KiB
C#
580 lines
21 KiB
C#
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Diagnostics;
|
|
using System.IO;
|
|
using System.Xml;
|
|
using System.Linq;
|
|
|
|
namespace UnrealBuildTool
|
|
{
|
|
class AndroidPlatformContext : UEBuildPlatformContext
|
|
{
|
|
public AndroidPlatformContext(FileReference InProjectFile) : base(UnrealTargetPlatform.Android, InProjectFile)
|
|
{
|
|
}
|
|
|
|
// The current architecture - affects everything about how UBT operates on Android
|
|
public override string GetActiveArchitecture()
|
|
{
|
|
// internal architectures are handled inside the toolchain to be able to build all at once, so we no longer need an architecture here
|
|
return base.GetActiveArchitecture();
|
|
}
|
|
|
|
private bool IsVulkanSDKAvailable()
|
|
{
|
|
bool bHaveVulkan = false;
|
|
|
|
// First look for VulkanSDK (two possible env variables)
|
|
string VulkanSDKPath = Environment.GetEnvironmentVariable("VULKAN_SDK");
|
|
if (String.IsNullOrEmpty(VulkanSDKPath))
|
|
{
|
|
VulkanSDKPath = Environment.GetEnvironmentVariable("VK_SDK_PATH");
|
|
}
|
|
|
|
// Note: header is the same for all architectures so just use arch-arm
|
|
string NDKPath = Environment.GetEnvironmentVariable("NDKROOT");
|
|
string NDKVulkanIncludePath = NDKPath + "/platforms/android-24/arch-arm/usr/include/vulkan";
|
|
|
|
// Use NDK Vulkan header if discovered, or VulkanSDK if available
|
|
if (File.Exists(NDKVulkanIncludePath + "/vulkan.h"))
|
|
{
|
|
bHaveVulkan = true;
|
|
}
|
|
else
|
|
if (!String.IsNullOrEmpty(VulkanSDKPath))
|
|
{
|
|
bHaveVulkan = true;
|
|
}
|
|
else
|
|
if (File.Exists(UEBuildConfiguration.UEThirdPartySourceDirectory + "Vulkan/Windows/Include/vulkan/vulkan.h"))
|
|
{
|
|
bHaveVulkan = true;
|
|
}
|
|
|
|
return bHaveVulkan;
|
|
}
|
|
|
|
public override void AddExtraModules(TargetInfo Target, List<string> PlatformExtraModules)
|
|
{
|
|
bool bVulkanExists = IsVulkanSDKAvailable();
|
|
if (bVulkanExists)
|
|
{
|
|
PlatformExtraModules.Add("VulkanRHI");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Modify the rules for a newly created module, in a target that's being built for this platform.
|
|
/// This is not required - but allows for hiding details of a particular platform.
|
|
/// </summary>
|
|
/// <param name="ModuleName">The name of the module</param>
|
|
/// <param name="Rules">The module rules</param>
|
|
/// <param name="Target">The target being build</param>
|
|
public override void ModifyModuleRulesForActivePlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
|
|
{
|
|
}
|
|
|
|
public override void ResetBuildConfiguration(UnrealTargetConfiguration Configuration)
|
|
{
|
|
ValidateUEBuildConfiguration();
|
|
//BuildConfiguration.bDeployAfterCompile = true;
|
|
}
|
|
|
|
public override void ValidateUEBuildConfiguration()
|
|
{
|
|
UEBuildConfiguration.bCompileLeanAndMeanUE = true;
|
|
UEBuildConfiguration.bCompilePhysX = true;
|
|
UEBuildConfiguration.bCompileAPEX = false;
|
|
UEBuildConfiguration.bRuntimePhysicsCooking = false;
|
|
|
|
UEBuildConfiguration.bBuildEditor = false;
|
|
UEBuildConfiguration.bBuildDeveloperTools = false;
|
|
UEBuildConfiguration.bCompileSimplygon = false;
|
|
UEBuildConfiguration.bCompileSimplygonSSF = false;
|
|
|
|
UEBuildConfiguration.bCompileRecast = true;
|
|
|
|
// Don't stop compilation at first error...
|
|
BuildConfiguration.bStopXGECompilationAfterErrors = true;
|
|
|
|
BuildConfiguration.bUseSharedPCHs = false;
|
|
}
|
|
|
|
public override void SetUpEnvironment(UEBuildTarget InBuildTarget)
|
|
{
|
|
// we want gcc toolchain 4.9, but fall back to 4.8 or 4.6 for now if it doesn't exist
|
|
string NDKPath = Environment.GetEnvironmentVariable("NDKROOT");
|
|
NDKPath = NDKPath.Replace("\"", "");
|
|
|
|
AndroidToolChain ToolChain = new AndroidToolChain(InBuildTarget.ProjectFile);
|
|
|
|
string GccVersion = "4.6";
|
|
int NDKVersionInt = ToolChain.GetNdkApiLevelInt();
|
|
if (Directory.Exists(Path.Combine(NDKPath, @"sources/cxx-stl/gnu-libstdc++/4.9")))
|
|
{
|
|
GccVersion = "4.9";
|
|
} else
|
|
if (Directory.Exists(Path.Combine(NDKPath, @"sources/cxx-stl/gnu-libstdc++/4.8")))
|
|
{
|
|
GccVersion = "4.8";
|
|
}
|
|
|
|
Log.TraceInformation("NDK version: {0}, GccVersion: {1}", NDKVersionInt.ToString(), GccVersion);
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("PLATFORM_DESKTOP=0");
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("PLATFORM_CAN_SUPPORT_EDITORONLY_DATA=0");
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("WITH_OGGVORBIS=1");
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("UNICODE");
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("_UNICODE");
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("PLATFORM_ANDROID=1");
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("ANDROID=1");
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("WITH_DATABASE_SUPPORT=0");
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("WITH_EDITOR=0");
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("USE_NULL_RHI=0");
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("REQUIRES_ALIGNED_INT_ACCESS");
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.CPPIncludeInfo.SystemIncludePaths.Add("$(NDKROOT)/sources/cxx-stl/gnu-libstdc++/" + GccVersion + "/include");
|
|
|
|
// the toolchain will actually filter these out
|
|
InBuildTarget.GlobalCompileEnvironment.Config.CPPIncludeInfo.SystemIncludePaths.Add("$(NDKROOT)/sources/cxx-stl/gnu-libstdc++/" + GccVersion + "/libs/armeabi-v7a/include");
|
|
InBuildTarget.GlobalCompileEnvironment.Config.CPPIncludeInfo.SystemIncludePaths.Add("$(NDKROOT)/sources/cxx-stl/gnu-libstdc++/" + GccVersion + "/libs/arm64-v8a/include");
|
|
InBuildTarget.GlobalCompileEnvironment.Config.CPPIncludeInfo.SystemIncludePaths.Add("$(NDKROOT)/sources/cxx-stl/gnu-libstdc++/" + GccVersion + "/libs/x86/include");
|
|
InBuildTarget.GlobalCompileEnvironment.Config.CPPIncludeInfo.SystemIncludePaths.Add("$(NDKROOT)/sources/cxx-stl/gnu-libstdc++/" + GccVersion + "/libs/x86_64/include");
|
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.LibraryPaths.Add("$(NDKROOT)/sources/cxx-stl/gnu-libstdc++/" + GccVersion + "/libs/armeabi-v7a");
|
|
InBuildTarget.GlobalLinkEnvironment.Config.LibraryPaths.Add("$(NDKROOT)/sources/cxx-stl/gnu-libstdc++/" + GccVersion + "/libs/arm64-v8a");
|
|
InBuildTarget.GlobalLinkEnvironment.Config.LibraryPaths.Add("$(NDKROOT)/sources/cxx-stl/gnu-libstdc++/" + GccVersion + "/libs/x86");
|
|
InBuildTarget.GlobalLinkEnvironment.Config.LibraryPaths.Add("$(NDKROOT)/sources/cxx-stl/gnu-libstdc++/" + GccVersion + "/libs/x86_64");
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.CPPIncludeInfo.SystemIncludePaths.Add("$(NDKROOT)/sources/android/native_app_glue");
|
|
InBuildTarget.GlobalCompileEnvironment.Config.CPPIncludeInfo.SystemIncludePaths.Add("$(NDKROOT)/sources/android/cpufeatures");
|
|
|
|
//@TODO: Tegra Gfx Debugger - standardize locations - for now, change the hardcoded paths and force this to return true to test
|
|
if (UseTegraGraphicsDebugger(InBuildTarget))
|
|
{
|
|
//InBuildTarget.GlobalLinkEnvironment.Config.LibraryPaths.Add(UEBuildConfiguration.UEThirdPartySourceDirectory + "NVIDIA/TegraGfxDebugger");
|
|
//InBuildTarget.GlobalLinkEnvironment.Config.LibraryPaths.Add("F:/NVPACK/android-kk-egl-t124-a32/stub");
|
|
//InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("Nvidia_gfx_debugger_stub");
|
|
}
|
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("gnustl_shared");
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("gcc");
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("z");
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("c");
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("m");
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("log");
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("dl");
|
|
if (!UseTegraGraphicsDebugger(InBuildTarget))
|
|
{
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("GLESv2");
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("EGL");
|
|
}
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("OpenSLES");
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("android");
|
|
|
|
UEBuildConfiguration.bCompileSimplygon = false;
|
|
UEBuildConfiguration.bCompileSimplygonSSF = false;
|
|
BuildConfiguration.bDeployAfterCompile = true;
|
|
}
|
|
|
|
private bool UseTegraGraphicsDebugger(UEBuildTarget InBuildTarget)
|
|
{
|
|
// Disable for now
|
|
return false;
|
|
}
|
|
|
|
public override bool ShouldCreateDebugInfo(UnrealTargetConfiguration Configuration)
|
|
{
|
|
switch (Configuration)
|
|
{
|
|
case UnrealTargetConfiguration.Development:
|
|
case UnrealTargetConfiguration.Shipping:
|
|
case UnrealTargetConfiguration.Test:
|
|
case UnrealTargetConfiguration.Debug:
|
|
default:
|
|
return true;
|
|
};
|
|
}
|
|
|
|
public override UEToolChain CreateToolChain(CPPTargetPlatform Platform)
|
|
{
|
|
return new AndroidToolChain(ProjectFile);
|
|
}
|
|
|
|
public override UEBuildDeploy CreateDeploymentHandler()
|
|
{
|
|
return new UEDeployAndroid(ProjectFile);
|
|
}
|
|
}
|
|
|
|
class AndroidPlatform : UEBuildPlatform
|
|
{
|
|
AndroidPlatformSDK SDK;
|
|
|
|
public AndroidPlatform(AndroidPlatformSDK InSDK) : base(UnrealTargetPlatform.Android, CPPTargetPlatform.Android)
|
|
{
|
|
SDK = InSDK;
|
|
}
|
|
|
|
public override SDKStatus HasRequiredSDKsInstalled()
|
|
{
|
|
return SDK.HasRequiredSDKsInstalled();
|
|
}
|
|
|
|
public override bool CanUseXGE()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public override string GetBinaryExtension(UEBuildBinaryType InBinaryType)
|
|
{
|
|
switch (InBinaryType)
|
|
{
|
|
case UEBuildBinaryType.DynamicLinkLibrary:
|
|
return ".so";
|
|
case UEBuildBinaryType.Executable:
|
|
return ".so";
|
|
case UEBuildBinaryType.StaticLibrary:
|
|
return ".a";
|
|
case UEBuildBinaryType.Object:
|
|
return ".o";
|
|
case UEBuildBinaryType.PrecompiledHeader:
|
|
return ".gch";
|
|
}
|
|
return base.GetBinaryExtension(InBinaryType);
|
|
}
|
|
|
|
public override bool ShouldUsePCHFiles(CPPTargetPlatform Platform, CPPTargetConfiguration Configuration)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public override string GetDebugInfoExtension(UEBuildBinaryType InBinaryType)
|
|
{
|
|
return "";
|
|
}
|
|
|
|
public override bool HasDefaultBuildConfig(UnrealTargetPlatform Platform, DirectoryReference ProjectPath)
|
|
{
|
|
string[] BoolKeys = new string[] {
|
|
"bBuildForArmV7", "bBuildForArm64", "bBuildForX86", "bBuildForX8664",
|
|
"bBuildForES2", "bBuildForESDeferred", "bBuildForES3"
|
|
};
|
|
|
|
// look up Android specific settings
|
|
if (!DoProjectSettingsMatchDefault(Platform, ProjectPath, "/Script/AndroidRuntimeSettings.AndroidRuntimeSettings",
|
|
BoolKeys, null, null))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
// check the base settings
|
|
return base.HasDefaultBuildConfig(Platform, ProjectPath);
|
|
}
|
|
|
|
public override bool ShouldCompileMonolithicBinary(UnrealTargetPlatform InPlatform)
|
|
{
|
|
// This platform currently always compiles monolithic
|
|
return true;
|
|
}
|
|
|
|
public override bool ShouldUsePDBFiles(CPPTargetPlatform Platform, CPPTargetConfiguration Configuration, bool bCreateDebugInfo)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public override bool ShouldNotBuildEditor(UnrealTargetPlatform InPlatform, UnrealTargetConfiguration InConfiguration)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public override bool BuildRequiresCookedData(UnrealTargetPlatform InPlatform, UnrealTargetConfiguration InConfiguration)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public override bool RequiresDeployPrepAfterCompile()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Modify the rules for a newly created module, where the target is a different host platform.
|
|
/// This is not required - but allows for hiding details of a particular platform.
|
|
/// </summary>
|
|
/// <param name="ModuleName">The name of the module</param>
|
|
/// <param name="Rules">The module rules</param>
|
|
/// <param name="Target">The target being build</param>
|
|
public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
|
|
{
|
|
if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Mac) || (Target.Platform == UnrealTargetPlatform.Linux))
|
|
{
|
|
bool bBuildShaderFormats = UEBuildConfiguration.bForceBuildShaderFormats;
|
|
if (!UEBuildConfiguration.bBuildRequiresCookedData)
|
|
{
|
|
if (ModuleName == "Engine")
|
|
{
|
|
if (UEBuildConfiguration.bBuildDeveloperTools)
|
|
{
|
|
Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("AndroidTargetPlatform");
|
|
Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_PVRTCTargetPlatform");
|
|
Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ATCTargetPlatform");
|
|
Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_DXTTargetPlatform");
|
|
Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ETC1TargetPlatform");
|
|
Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ETC2TargetPlatform");
|
|
Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ASTCTargetPlatform");
|
|
Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_MultiTargetPlatform");
|
|
}
|
|
}
|
|
else if (ModuleName == "TargetPlatform")
|
|
{
|
|
bBuildShaderFormats = true;
|
|
Rules.DynamicallyLoadedModuleNames.Add("TextureFormatPVR");
|
|
Rules.DynamicallyLoadedModuleNames.Add("TextureFormatDXT");
|
|
Rules.DynamicallyLoadedModuleNames.Add("TextureFormatASTC");
|
|
Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("TextureFormatAndroid"); // ATITC, ETC1 and ETC2
|
|
if (UEBuildConfiguration.bBuildDeveloperTools)
|
|
{
|
|
//Rules.DynamicallyLoadedModuleNames.Add("AudioFormatADPCM"); //@todo android: android audio
|
|
}
|
|
}
|
|
}
|
|
|
|
// allow standalone tools to use targetplatform modules, without needing Engine
|
|
if (ModuleName == "TargetPlatform")
|
|
{
|
|
if (UEBuildConfiguration.bForceBuildTargetPlatforms)
|
|
{
|
|
Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("AndroidTargetPlatform");
|
|
Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_PVRTCTargetPlatform");
|
|
Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ATCTargetPlatform");
|
|
Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_DXTTargetPlatform");
|
|
Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ETC1TargetPlatform");
|
|
Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ETC2TargetPlatform");
|
|
Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_ASTCTargetPlatform");
|
|
Rules.PlatformSpecificDynamicallyLoadedModuleNames.Add("Android_MultiTargetPlatform");
|
|
}
|
|
|
|
if (bBuildShaderFormats)
|
|
{
|
|
//Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatAndroid"); //@todo android: ShaderFormatAndroid
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public override List<FileReference> FinalizeBinaryPaths(FileReference BinaryName, FileReference ProjectFile)
|
|
{
|
|
AndroidToolChain ToolChain = new AndroidToolChain(ProjectFile);
|
|
|
|
var Architectures = ToolChain.GetAllArchitectures();
|
|
var GPUArchitectures = ToolChain.GetAllGPUArchitectures();
|
|
|
|
// make multiple output binaries
|
|
List<FileReference> AllBinaries = new List<FileReference>();
|
|
foreach (string Architecture in Architectures)
|
|
{
|
|
foreach (string GPUArchitecture in GPUArchitectures)
|
|
{
|
|
AllBinaries.Add(new FileReference(AndroidToolChain.InlineArchName(BinaryName.FullName, Architecture, GPUArchitecture)));
|
|
}
|
|
}
|
|
|
|
return AllBinaries;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Creates a context for the given project on the current platform.
|
|
/// </summary>
|
|
/// <param name="ProjectFile">The project file for the current target</param>
|
|
/// <returns>New platform context object</returns>
|
|
public override UEBuildPlatformContext CreateContext(FileReference ProjectFile)
|
|
{
|
|
return new AndroidPlatformContext(ProjectFile);
|
|
}
|
|
}
|
|
|
|
class AndroidPlatformSDK : UEBuildPlatformSDK
|
|
{
|
|
protected override bool PlatformSupportsAutoSDKs()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public override string GetSDKTargetPlatformName()
|
|
{
|
|
return "Android";
|
|
}
|
|
|
|
protected override string GetRequiredSDKString()
|
|
{
|
|
return "-21";
|
|
}
|
|
|
|
protected override String GetRequiredScriptVersionString()
|
|
{
|
|
return "3.1";
|
|
}
|
|
|
|
// prefer auto sdk on android as correct 'manual' sdk detection isn't great at the moment.
|
|
protected override bool PreferAutoSDK()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/// <summary>
|
|
/// checks if the sdk is installed or has been synced
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
private bool HasAnySDK()
|
|
{
|
|
string NDKPath = Environment.GetEnvironmentVariable("NDKROOT");
|
|
{
|
|
var configCacheIni = ConfigCacheIni.CreateConfigCacheIni(UnrealTargetPlatform.Unknown, "Engine", (DirectoryReference)null);
|
|
var AndroidEnv = new Dictionary<string, string>();
|
|
|
|
Dictionary<string, string> EnvVarNames = new Dictionary<string, string> {
|
|
{"ANDROID_HOME", "SDKPath"},
|
|
{"NDKROOT", "NDKPath"},
|
|
{"ANT_HOME", "ANTPath"},
|
|
{"JAVA_HOME", "JavaPath"}
|
|
};
|
|
|
|
string path;
|
|
foreach (var kvp in EnvVarNames)
|
|
{
|
|
if (configCacheIni.GetPath("/Script/AndroidPlatformEditor.AndroidSDKSettings", kvp.Value, out path) && !string.IsNullOrEmpty(path))
|
|
{
|
|
AndroidEnv.Add(kvp.Key, path);
|
|
}
|
|
else
|
|
{
|
|
var envValue = Environment.GetEnvironmentVariable(kvp.Key);
|
|
if (!String.IsNullOrEmpty(envValue))
|
|
{
|
|
AndroidEnv.Add(kvp.Key, envValue);
|
|
}
|
|
}
|
|
}
|
|
|
|
// If we are on Mono and we are still missing a key then go and find it from the .bash_profile
|
|
if (Utils.IsRunningOnMono && !EnvVarNames.All(s => AndroidEnv.ContainsKey(s.Key)))
|
|
{
|
|
string BashProfilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), ".bash_profile");
|
|
if (!File.Exists(BashProfilePath))
|
|
{
|
|
// Try .bashrc if didn't fine .bash_profile
|
|
BashProfilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), ".bashrc");
|
|
}
|
|
if (File.Exists(BashProfilePath))
|
|
{
|
|
string[] BashProfileContents = File.ReadAllLines(BashProfilePath);
|
|
|
|
// Walk backwards so we keep the last export setting instead of the first
|
|
for (int LineIndex = BashProfileContents.Length - 1; LineIndex >= 0; --LineIndex)
|
|
{
|
|
foreach (var kvp in EnvVarNames)
|
|
{
|
|
if (AndroidEnv.ContainsKey(kvp.Key))
|
|
{
|
|
continue;
|
|
}
|
|
|
|
if (BashProfileContents[LineIndex].StartsWith("export " + kvp.Key + "="))
|
|
{
|
|
string PathVar = BashProfileContents[LineIndex].Split('=')[1].Replace("\"", "");
|
|
AndroidEnv.Add(kvp.Key, PathVar);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Set for the process
|
|
foreach (var kvp in AndroidEnv)
|
|
{
|
|
Environment.SetEnvironmentVariable(kvp.Key, kvp.Value);
|
|
}
|
|
|
|
// See if we have an NDK path now...
|
|
AndroidEnv.TryGetValue("NDKROOT", out NDKPath);
|
|
}
|
|
|
|
// we don't have an NDKROOT specified
|
|
if (String.IsNullOrEmpty(NDKPath))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
NDKPath = NDKPath.Replace("\"", "");
|
|
|
|
// need a supported llvm
|
|
if (!Directory.Exists(Path.Combine(NDKPath, @"toolchains/llvm")) &&
|
|
!Directory.Exists(Path.Combine(NDKPath, @"toolchains/llvm-3.6")) &&
|
|
!Directory.Exists(Path.Combine(NDKPath, @"toolchains/llvm-3.5")) &&
|
|
!Directory.Exists(Path.Combine(NDKPath, @"toolchains/llvm-3.3")) &&
|
|
!Directory.Exists(Path.Combine(NDKPath, @"toolchains/llvm-3.1")))
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
protected override SDKStatus HasRequiredManualSDKInternal()
|
|
{
|
|
// if any autosdk setup has been done then the local process environment is suspect
|
|
if (HasSetupAutoSDK())
|
|
{
|
|
return SDKStatus.Invalid;
|
|
}
|
|
|
|
if (HasAnySDK())
|
|
{
|
|
return SDKStatus.Valid;
|
|
}
|
|
|
|
return SDKStatus.Invalid;
|
|
}
|
|
}
|
|
|
|
public class AndroidPlatformFactory : UEBuildPlatformFactory
|
|
{
|
|
protected override UnrealTargetPlatform TargetPlatform
|
|
{
|
|
get { return UnrealTargetPlatform.Android; }
|
|
}
|
|
|
|
protected override void RegisterBuildPlatforms()
|
|
{
|
|
AndroidPlatformSDK SDK = new AndroidPlatformSDK();
|
|
SDK.ManageAndValidateSDK();
|
|
|
|
if ((ProjectFileGenerator.bGenerateProjectFiles == true) || (SDK.HasRequiredSDKsInstalled() == SDKStatus.Valid) || Environment.GetEnvironmentVariable("IsBuildMachine") == "1")
|
|
{
|
|
bool bRegisterBuildPlatform = true;
|
|
|
|
FileReference AndroidTargetPlatformFile = FileReference.Combine(UnrealBuildTool.EngineSourceDirectory, "Developer", "Android", "AndroidTargetPlatform", "AndroidTargetPlatform.Build.cs");
|
|
if (AndroidTargetPlatformFile.Exists() == false)
|
|
{
|
|
bRegisterBuildPlatform = false;
|
|
}
|
|
|
|
if (bRegisterBuildPlatform == true)
|
|
{
|
|
// Register this build platform
|
|
Log.TraceVerbose(" Registering for {0}", UnrealTargetPlatform.Android.ToString());
|
|
UEBuildPlatform.RegisterBuildPlatform(new AndroidPlatform(SDK));
|
|
UEBuildPlatform.RegisterPlatformWithGroup(UnrealTargetPlatform.Android, UnrealPlatformGroup.Android);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|