You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Before: Total CPU Time: 53783.640625 s Total time in Parallel executor: 558.66 seconds After: Total CPU Time: 47886.140625 s Total time in Parallel executor: 498.81 seconds #jira [CL 22173145 by bryan sefcik in ue5-main branch]
74 lines
1.7 KiB
C++
74 lines
1.7 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "AndroidSDKSettings.h"
|
|
#include "Misc/Paths.h"
|
|
#include "Interfaces/IAndroidDeviceDetection.h"
|
|
|
|
//#include "EngineTypes.h"
|
|
#include "Interfaces/ITargetPlatformManagerModule.h"
|
|
|
|
#include UE_INLINE_GENERATED_CPP_BY_NAME(AndroidSDKSettings)
|
|
|
|
DEFINE_LOG_CATEGORY_STATIC(AndroidSDKSettings, Log, All);
|
|
|
|
UAndroidSDKSettings::UAndroidSDKSettings(const FObjectInitializer& ObjectInitializer)
|
|
: Super(ObjectInitializer)
|
|
{
|
|
|
|
}
|
|
|
|
#if WITH_EDITOR
|
|
void UAndroidSDKSettings::PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent)
|
|
{
|
|
Super::PostEditChangeProperty(PropertyChangedEvent);
|
|
UpdateTargetModulePaths();
|
|
}
|
|
|
|
void UAndroidSDKSettings::SetTargetModule(ITargetPlatformManagerModule * InTargetManagerModule)
|
|
{
|
|
TargetManagerModule = InTargetManagerModule;
|
|
}
|
|
|
|
void UAndroidSDKSettings::SetDeviceDetection(IAndroidDeviceDetection * InAndroidDeviceDetection)
|
|
{
|
|
AndroidDeviceDetection = InAndroidDeviceDetection;
|
|
}
|
|
|
|
void UAndroidSDKSettings::UpdateTargetModulePaths()
|
|
{
|
|
TArray<FString> Keys;
|
|
TArray<FString> Values;
|
|
|
|
if (!SDKPath.Path.IsEmpty())
|
|
{
|
|
FPaths::NormalizeFilename(SDKPath.Path);
|
|
Keys.Add(TEXT("ANDROID_HOME"));
|
|
Values.Add(SDKPath.Path);
|
|
}
|
|
|
|
if (!NDKPath.Path.IsEmpty())
|
|
{
|
|
FPaths::NormalizeFilename(NDKPath.Path);
|
|
Keys.Add(TEXT("NDKROOT"));
|
|
Values.Add(NDKPath.Path);
|
|
}
|
|
|
|
if (!JavaPath.Path.IsEmpty())
|
|
{
|
|
FPaths::NormalizeFilename(JavaPath.Path);
|
|
Keys.Add(TEXT("JAVA_HOME"));
|
|
Values.Add(JavaPath.Path);
|
|
}
|
|
|
|
SaveConfig();
|
|
|
|
if (Keys.Num() != 0)
|
|
{
|
|
TargetManagerModule->UpdatePlatformEnvironment(TEXT("Android"), Keys, Values);
|
|
AndroidDeviceDetection->UpdateADBPath();
|
|
}
|
|
}
|
|
|
|
#endif
|
|
|