You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
The main changes are as follows: 1. moved Json out of Core into own module 'Json' 2. moved 3 i10n classes (Json serializers) from Core into a new module 'Internationalization' * 3. fixed up 2 i10n classes in Core to not instantiate the 3 Json-based classes. instead they are now passed in as a dependency *) (2) and (3) were required to decouple the I10n code in Core from Json. Much of the i10n code probably doesn't belong into Core in the first place, but there is no time to fix this right now. The following cosmetic changes were also made: - NULL to nullptr - namespaced enums to enum classes - renamed the three i10n Json serializer classes to comply with naming conventions - removed file header comments (not used) - documentation, spelling, spacing etc, #UpgradeNotes: If your module is including Json.h then you have to add 'Json' to your Build.cs module dependencies. #ReviewedBy: justin.sargent, saul.abreu [CL 2310420 by Max Preussner in Main branch]
74 lines
3.6 KiB
C++
74 lines
3.6 KiB
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "IDesktopPlatform.h"
|
|
#include "Json.h"
|
|
#include "UProjectInfo.h"
|
|
|
|
class FDesktopPlatformBase : public IDesktopPlatform
|
|
{
|
|
public:
|
|
FDesktopPlatformBase();
|
|
|
|
// IDesktopPlatform Implementation
|
|
virtual FString GetEngineDescription(const FString& Identifier) override;
|
|
virtual FString GetCurrentEngineIdentifier() override;
|
|
|
|
virtual void EnumerateLauncherEngineInstallations(TMap<FString, FString> &OutInstallations) override;
|
|
virtual void EnumerateLauncherSampleInstallations(TArray<FString> &OutInstallations) override;
|
|
virtual void EnumerateLauncherSampleProjects(TArray<FString> &OutFileNames) override;
|
|
virtual bool GetEngineRootDirFromIdentifier(const FString &Identifier, FString &OutRootDir) override;
|
|
virtual bool GetEngineIdentifierFromRootDir(const FString &RootDir, FString &OutIdentifier) override;
|
|
|
|
virtual bool GetDefaultEngineIdentifier(FString &OutIdentifier) override;
|
|
virtual bool GetDefaultEngineRootDir(FString &OutRootDir) override;
|
|
virtual bool IsPreferredEngineIdentifier(const FString &Identifier, const FString &OtherIdentifier);
|
|
|
|
virtual bool IsStockEngineRelease(const FString &Identifier) override;
|
|
virtual bool IsSourceDistribution(const FString &RootDir) override;
|
|
virtual bool IsPerforceBuild(const FString &RootDir) override;
|
|
virtual bool IsValidRootDirectory(const FString &RootDir) override;
|
|
|
|
virtual bool SetEngineIdentifierForProject(const FString &ProjectFileName, const FString &Identifier) override;
|
|
virtual bool GetEngineIdentifierForProject(const FString &ProjectFileName, FString &OutIdentifier) override;
|
|
|
|
virtual bool OpenProject(const FString& ProjectFileName) override;
|
|
|
|
virtual bool CleanGameProject(const FString& ProjectDir, FString& OutFailPath, FFeedbackContext* Warn) override;
|
|
virtual bool CompileGameProject(const FString& RootDir, const FString& ProjectFileName, FFeedbackContext* Warn) override;
|
|
virtual bool GenerateProjectFiles(const FString& RootDir, const FString& ProjectFileName, FFeedbackContext* Warn) override;
|
|
virtual bool IsUnrealBuildToolAvailable() override;
|
|
virtual bool InvokeUnrealBuildToolSync(const FString& InCmdLineParams, FOutputDevice &Ar, bool bSkipBuildUBT, int32& OutReturnCode, FString& OutProcOutput) override;
|
|
virtual FProcHandle InvokeUnrealBuildToolAsync(const FString& InCmdLineParams, FOutputDevice &Ar, void*& OutReadPipe, void*& OutWritePipe, bool bSkipBuildUBT = false) override;
|
|
|
|
virtual bool GetSolutionPath(FString& OutSolutionPath) override;
|
|
|
|
virtual bool EnumerateProjectsKnownByEngine(const FString &Identifier, bool bIncludeNativeProjects, TArray<FString> &OutProjectFileNames) override;
|
|
virtual FString GetDefaultProjectCreationPath() override;
|
|
|
|
private:
|
|
FString CurrentEngineIdentifier;
|
|
FDateTime LauncherInstallationTimestamp;
|
|
TMap<FString, FString> LauncherInstallationList;
|
|
TMap<FString, FUProjectDictionary> CachedProjectDictionaries;
|
|
|
|
void ReadLauncherInstallationList();
|
|
void CheckForLauncherEngineInstallation(const FString &AppId, const FString &Identifier, TMap<FString, FString> &OutInstallations);
|
|
int32 ParseReleaseVersion(const FString &Version);
|
|
|
|
TSharedPtr<FJsonObject> LoadProjectFile(const FString &FileName);
|
|
bool SaveProjectFile(const FString &FileName, TSharedPtr<FJsonObject> Object);
|
|
|
|
const FUProjectDictionary &GetCachedProjectDictionary(const FString& RootDir);
|
|
|
|
void GetProjectBuildProducts(const FString& ProjectFileName, TArray<FString> &OutFileNames, TArray<FString> &OutDirectoryNames);
|
|
|
|
FString GetUnrealBuildToolSourceCodePath() const;
|
|
bool BuildUnrealBuildTool(FOutputDevice &Ar);
|
|
|
|
protected:
|
|
|
|
FString GetUnrealBuildToolExecutableFilename() const;
|
|
};
|