2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-06-05 17:01:39 -04:00
|
|
|
|
|
|
|
|
#include "DesktopPlatformPrivatePCH.h"
|
2014-07-30 23:26:47 -04:00
|
|
|
#include "LinuxApplication.h"
|
|
|
|
|
#include "FeedbackContextMarkup.h"
|
|
|
|
|
//#include "LinuxNativeFeedbackContext.h"
|
|
|
|
|
// custom dialogs
|
|
|
|
|
#if WITH_LINUX_NATIVE_DIALOGS
|
|
|
|
|
#include "UNativeDialogs.h"
|
|
|
|
|
#endif // WITH_LINUX_NATIVE_DIALOGS
|
|
|
|
|
#include "SDL.h"
|
2014-06-05 17:01:39 -04:00
|
|
|
|
|
|
|
|
#define LOCTEXT_NAMESPACE "DesktopPlatform"
|
2014-07-30 23:26:47 -04:00
|
|
|
#define MAX_FILETYPES_STR 4096
|
|
|
|
|
#define MAX_FILENAME_STR 65536
|
2014-06-05 17:01:39 -04:00
|
|
|
|
2014-06-29 00:44:00 -04:00
|
|
|
bool FDesktopPlatformLinux::OpenFileDialog(const void* ParentWindowHandle, const FString& DialogTitle, const FString& DefaultPath, const FString& DefaultFile, const FString& FileTypes, uint32 Flags, TArray<FString>& OutFilenames, int32& OutFilterIndex)
|
|
|
|
|
{
|
2014-07-30 23:26:47 -04:00
|
|
|
return FileDialogShared(false, ParentWindowHandle, DialogTitle, DefaultPath, DefaultFile, FileTypes, Flags, OutFilenames, OutFilterIndex);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool FDesktopPlatformLinux::OpenFileDialog(const void* ParentWindowHandle, const FString& DialogTitle, const FString& DefaultPath, const FString& DefaultFile, const FString& FileTypes, uint32 Flags, TArray<FString>& OutFilenames)
|
|
|
|
|
{
|
|
|
|
|
int32 DummyFilterIndex;
|
|
|
|
|
return FileDialogShared(false, ParentWindowHandle, DialogTitle, DefaultPath, DefaultFile, FileTypes, Flags, OutFilenames, DummyFilterIndex);
|
2014-06-29 00:44:00 -04:00
|
|
|
}
|
|
|
|
|
|
2014-06-05 17:01:39 -04:00
|
|
|
bool FDesktopPlatformLinux::SaveFileDialog(const void* ParentWindowHandle, const FString& DialogTitle, const FString& DefaultPath, const FString& DefaultFile, const FString& FileTypes, uint32 Flags, TArray<FString>& OutFilenames)
|
|
|
|
|
{
|
2014-07-30 23:26:47 -04:00
|
|
|
int32 DummyFilterIndex = 0;
|
|
|
|
|
return FileDialogShared(true, ParentWindowHandle, DialogTitle, DefaultPath, DefaultFile, FileTypes, Flags, OutFilenames, DummyFilterIndex);
|
2014-06-05 17:01:39 -04:00
|
|
|
}
|
|
|
|
|
|
2014-07-30 23:26:47 -04:00
|
|
|
|
|
|
|
|
|
2014-06-05 17:01:39 -04:00
|
|
|
bool FDesktopPlatformLinux::OpenDirectoryDialog(const void* ParentWindowHandle, const FString& DialogTitle, const FString& DefaultPath, FString& OutFolderName)
|
|
|
|
|
{
|
2014-07-30 23:26:47 -04:00
|
|
|
#if WITH_LINUX_NATIVE_DIALOGS
|
|
|
|
|
bool bSuccess;
|
|
|
|
|
struct UFileDialogHints hints = DEFAULT_UFILEDIALOGHINTS;
|
|
|
|
|
|
|
|
|
|
LinuxApplication->SetCapture(NULL);
|
|
|
|
|
|
|
|
|
|
hints.Action = UFileDialogActionOpenDirectory;
|
|
|
|
|
hints.WindowTitle = TCHAR_TO_UTF8(*DialogTitle);
|
|
|
|
|
hints.InitialDirectory = TCHAR_TO_UTF8(*DefaultPath);
|
|
|
|
|
|
|
|
|
|
UFileDialog* dialog = UFileDialog_Create(&hints);
|
|
|
|
|
|
2014-09-29 19:22:37 -04:00
|
|
|
while(UFileDialog_ProcessEvents(dialog))
|
|
|
|
|
{
|
|
|
|
|
FPlatformProcess::Sleep(0.05f);
|
2014-07-30 23:26:47 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const UFileDialogResult* result = UFileDialog_Result(dialog);
|
|
|
|
|
|
|
|
|
|
if (result)
|
|
|
|
|
{
|
|
|
|
|
if (result->count == 1)
|
|
|
|
|
{
|
|
|
|
|
OutFolderName = UTF8_TO_TCHAR(result->selection[0]);
|
|
|
|
|
//OutFolderName = IFileManager::Get().ConvertToRelativePath(*OutFolderName); // @todo (amigo): converting to relative path ends up without ../...
|
|
|
|
|
FPaths::NormalizeFilename(OutFolderName);
|
|
|
|
|
bSuccess = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
bSuccess = false;
|
|
|
|
|
}
|
|
|
|
|
// Todo like in Windows, normalize files here instead of above
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
bSuccess = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UFileDialog_Destroy(dialog);
|
|
|
|
|
|
|
|
|
|
return bSuccess;
|
|
|
|
|
#else
|
2014-06-05 17:01:39 -04:00
|
|
|
return false;
|
2014-07-30 23:26:47 -04:00
|
|
|
#endif // WITH_LINUX_NATIVE_DIALOGS
|
2014-06-05 17:01:39 -04:00
|
|
|
}
|
|
|
|
|
|
2014-08-13 12:53:47 -04:00
|
|
|
bool FDesktopPlatformLinux::OpenFontDialog(const void* ParentWindowHandle, FString& OutFontName, float& OutHeight, EFontImportFlags& OutFlags)
|
2014-06-05 17:01:39 -04:00
|
|
|
{
|
|
|
|
|
unimplemented();
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2014-08-19 09:54:22 -04:00
|
|
|
bool FDesktopPlatformLinux::CanOpenLauncher(bool Install)
|
|
|
|
|
{
|
|
|
|
|
// TODO: no launcher support at the moment
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-05 17:01:39 -04:00
|
|
|
bool FDesktopPlatformLinux::OpenLauncher(bool Install, FString CommandLineParams )
|
|
|
|
|
{
|
2014-07-30 23:26:47 -04:00
|
|
|
// TODO: support launcher for realz
|
|
|
|
|
return true;
|
2014-06-05 17:01:39 -04:00
|
|
|
}
|
|
|
|
|
|
2014-07-30 23:26:47 -04:00
|
|
|
bool FDesktopPlatformLinux::FileDialogShared(bool bSave, const void* ParentWindowHandle, const FString& DialogTitle, const FString& DefaultPath, const FString& DefaultFile, const FString& FileTypes, uint32 Flags, TArray<FString>& OutFilenames, int32& OutFilterIndex)
|
2014-06-05 17:01:39 -04:00
|
|
|
{
|
2014-07-30 23:26:47 -04:00
|
|
|
#if WITH_LINUX_NATIVE_DIALOGS
|
|
|
|
|
FString Filename;
|
|
|
|
|
bool bSuccess;
|
|
|
|
|
|
|
|
|
|
LinuxApplication->SetCapture(NULL);
|
|
|
|
|
|
|
|
|
|
UE_LOG(LogDesktopPlatform, Warning, TEXT("FileDialogShared DialogTitle: %s, DefaultPath: %s, DefaultFile: %s, FileTypes: %s, Flags: %d"),
|
|
|
|
|
*DialogTitle, *DefaultPath, *DefaultFile, *FileTypes, Flags);
|
|
|
|
|
|
|
|
|
|
struct UFileDialogHints hints = DEFAULT_UFILEDIALOGHINTS;
|
|
|
|
|
|
|
|
|
|
hints.WindowTitle = TCHAR_TO_UTF8(*DialogTitle);
|
|
|
|
|
|
2015-04-30 02:01:04 -04:00
|
|
|
FString AllExtensionsSpaceDelim; // a string like "*.cpp *.h *.c"
|
2014-07-30 23:26:47 -04:00
|
|
|
|
2015-04-30 02:01:04 -04:00
|
|
|
// The strings will come in pairs, formatted as follows: Pair1String1|Pair1String2|Pair2String1|Pair2String2
|
|
|
|
|
// where the second string in the pair is the extension(s)
|
|
|
|
|
TArray<FString> Filters;
|
|
|
|
|
FileTypes.ParseIntoArray(Filters, TEXT("|"), true);
|
|
|
|
|
for( int32 ExtensionIndex = 1; ExtensionIndex < Filters.Num(); ExtensionIndex += 2)
|
2014-07-30 23:26:47 -04:00
|
|
|
{
|
2015-04-30 02:01:04 -04:00
|
|
|
const FString& Extensions = Filters[ExtensionIndex];
|
|
|
|
|
|
|
|
|
|
TArray<FString> ExtensionsArray;
|
|
|
|
|
|
|
|
|
|
// Extension can be either *.jpg or *.jpg;*.png -> in the latter case split at ';'
|
|
|
|
|
int32 UnusedIndex;
|
|
|
|
|
if (Extensions.FindChar(TEXT(';'), UnusedIndex))
|
2014-07-30 23:26:47 -04:00
|
|
|
{
|
2015-04-30 02:01:04 -04:00
|
|
|
Extensions.ParseIntoArray(ExtensionsArray, TEXT(";"), true);
|
2014-07-30 23:26:47 -04:00
|
|
|
}
|
2015-04-30 02:01:04 -04:00
|
|
|
else
|
2014-07-30 23:26:47 -04:00
|
|
|
{
|
2015-04-30 02:01:04 -04:00
|
|
|
ExtensionsArray.Add(Extensions); // just a single extension
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (const FString& Extension : ExtensionsArray)
|
|
|
|
|
{
|
|
|
|
|
if (AllExtensionsSpaceDelim.Find(Extension, ESearchCase::CaseSensitive) == INDEX_NONE)
|
2014-07-30 23:26:47 -04:00
|
|
|
{
|
2015-04-30 02:01:04 -04:00
|
|
|
AllExtensionsSpaceDelim += Extension;
|
|
|
|
|
AllExtensionsSpaceDelim += TEXT(" ");
|
2014-07-30 23:26:47 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-04-30 02:01:04 -04:00
|
|
|
FString AllExtensionsLumpedTogether(TEXT("All applicable ("));
|
|
|
|
|
AllExtensionsLumpedTogether += AllExtensionsSpaceDelim;
|
|
|
|
|
AllExtensionsLumpedTogether += TEXT(")");
|
|
|
|
|
|
2014-09-29 19:22:37 -04:00
|
|
|
char FileTypesBuf[MAX_FILETYPES_STR * 2] = {0,};
|
2015-04-30 02:01:04 -04:00
|
|
|
FTCHARToUTF8_Convert::Convert(FileTypesBuf, sizeof(FileTypesBuf), *AllExtensionsSpaceDelim, AllExtensionsSpaceDelim.Len());
|
2014-09-29 19:22:37 -04:00
|
|
|
hints.NameFilter = FileTypesBuf;
|
2014-07-30 23:26:47 -04:00
|
|
|
|
2014-09-29 19:22:37 -04:00
|
|
|
char DefPathBuf[MAX_FILENAME_STR * 2] = {0,};
|
|
|
|
|
FTCHARToUTF8_Convert::Convert(DefPathBuf, sizeof(DefPathBuf), *DefaultPath, DefaultPath.Len());
|
|
|
|
|
hints.InitialDirectory = DefPathBuf;
|
2014-07-30 23:26:47 -04:00
|
|
|
|
2014-09-29 19:22:37 -04:00
|
|
|
char DefFileBuf[MAX_FILENAME_STR * 2] = {0,};
|
|
|
|
|
FTCHARToUTF8_Convert::Convert(DefFileBuf, sizeof(DefFileBuf), *DefaultFile, DefaultFile.Len());
|
|
|
|
|
hints.DefaultFile = DefFileBuf;
|
2014-07-30 23:26:47 -04:00
|
|
|
|
|
|
|
|
if (bSave)
|
|
|
|
|
{
|
|
|
|
|
hints.Action = UFileDialogActionSave;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
hints.Action = UFileDialogActionOpen;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UFileDialog* dialog = UFileDialog_Create(&hints);
|
|
|
|
|
|
2014-09-29 19:22:37 -04:00
|
|
|
while(UFileDialog_ProcessEvents(dialog))
|
|
|
|
|
{
|
|
|
|
|
FPlatformProcess::Sleep(0.05f);
|
2014-07-30 23:26:47 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const UFileDialogResult* result = UFileDialog_Result(dialog);
|
|
|
|
|
|
|
|
|
|
if (result)
|
|
|
|
|
{
|
|
|
|
|
if (result->count > 1)
|
|
|
|
|
{
|
|
|
|
|
// Todo better handling of multi-selects
|
|
|
|
|
UE_LOG(LogDesktopPlatform, Warning, TEXT("FileDialogShared Selected Files: %d"), result->count);
|
|
|
|
|
for(int i = 0;i < result->count;++i) {
|
|
|
|
|
//Filename = FUTF8ToTCHAR(result->selection[i], MAX_FILENAME_STR).Get();
|
2015-04-30 02:01:04 -04:00
|
|
|
Filename = UTF8_TO_TCHAR(result->selection[i]);
|
2014-07-30 23:26:47 -04:00
|
|
|
//new(OutFilenames) FString(Filename);
|
|
|
|
|
OutFilenames.Add(Filename);
|
|
|
|
|
Filename = IFileManager::Get().ConvertToRelativePath(*Filename);
|
|
|
|
|
FPaths::NormalizeFilename(Filename);
|
|
|
|
|
//UE_LOG(LogDesktopPlatform, Warning, TEXT("FileDialogShared File: %s"), *Filename);
|
|
|
|
|
}
|
|
|
|
|
bSuccess = true;
|
|
|
|
|
}
|
|
|
|
|
else if (result->count == 1)
|
|
|
|
|
{
|
|
|
|
|
//Filename = FUTF8ToTCHAR(result->selection[0], MAX_FILENAME_STR).Get();
|
|
|
|
|
Filename = UTF8_TO_TCHAR(result->selection[0]);
|
|
|
|
|
//new(OutFilenames) FString(Filename);
|
|
|
|
|
OutFilenames.Add(Filename);
|
|
|
|
|
Filename = IFileManager::Get().ConvertToRelativePath(*Filename);
|
|
|
|
|
FPaths::NormalizeFilename(Filename);
|
|
|
|
|
//UE_LOG(LogDesktopPlatform, Warning, TEXT("FileDialogShared File: %s"), *Filename);
|
|
|
|
|
bSuccess = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
bSuccess = false;
|
|
|
|
|
}
|
|
|
|
|
// Todo like in Windows, normalize files here instead of above
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
bSuccess = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UFileDialog_Destroy(dialog);
|
|
|
|
|
|
|
|
|
|
return bSuccess;
|
|
|
|
|
#else
|
2014-06-05 17:01:39 -04:00
|
|
|
return false;
|
2014-07-30 23:26:47 -04:00
|
|
|
#endif // WITH_LINUX_NATIVE_DIALOGS
|
2014-06-05 17:01:39 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool FDesktopPlatformLinux::RegisterEngineInstallation(const FString &RootDir, FString &OutIdentifier)
|
|
|
|
|
{
|
2014-07-30 23:26:47 -04:00
|
|
|
bool bRes = false;
|
|
|
|
|
if (IsValidRootDirectory(RootDir))
|
|
|
|
|
{
|
|
|
|
|
FConfigFile ConfigFile;
|
|
|
|
|
FString ConfigPath = FString(FPlatformProcess::ApplicationSettingsDir()) / FString(TEXT("UnrealEngine")) / FString(TEXT("Install.ini"));
|
|
|
|
|
ConfigFile.Read(ConfigPath);
|
|
|
|
|
|
|
|
|
|
FConfigSection &Section = ConfigFile.FindOrAdd(TEXT("Installations"));
|
|
|
|
|
OutIdentifier = FGuid::NewGuid().ToString(EGuidFormats::DigitsWithHyphens);
|
|
|
|
|
Section.AddUnique(*OutIdentifier, RootDir);
|
|
|
|
|
|
|
|
|
|
ConfigFile.Dirty = true;
|
|
|
|
|
ConfigFile.Write(ConfigPath);
|
|
|
|
|
}
|
|
|
|
|
return bRes;
|
2014-06-05 17:01:39 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FDesktopPlatformLinux::EnumerateEngineInstallations(TMap<FString, FString> &OutInstallations)
|
|
|
|
|
{
|
2014-07-30 23:26:47 -04:00
|
|
|
EnumerateLauncherEngineInstallations(OutInstallations);
|
|
|
|
|
|
|
|
|
|
FString UProjectPath = FString(FPlatformProcess::ApplicationSettingsDir()) / "Unreal.uproject";
|
|
|
|
|
FArchive* File = IFileManager::Get().CreateFileWriter(*UProjectPath, FILEWRITE_EvenIfReadOnly);
|
|
|
|
|
if (File)
|
|
|
|
|
{
|
|
|
|
|
File->Close();
|
|
|
|
|
delete File;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Unable to write to Settings Directory", TCHAR_TO_UTF8(*UProjectPath), NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FConfigFile ConfigFile;
|
|
|
|
|
FString ConfigPath = FString(FPlatformProcess::ApplicationSettingsDir()) / FString(TEXT("UnrealEngine")) / FString(TEXT("Install.ini"));
|
|
|
|
|
ConfigFile.Read(ConfigPath);
|
|
|
|
|
|
|
|
|
|
FConfigSection &Section = ConfigFile.FindOrAdd(TEXT("Installations"));
|
|
|
|
|
|
|
|
|
|
// @todo: currently we can enumerate only this installation
|
|
|
|
|
FString EngineDir = FPaths::EngineDir();
|
|
|
|
|
|
|
|
|
|
FString EngineId;
|
|
|
|
|
const FName* Key = Section.FindKey(EngineDir);
|
|
|
|
|
if (Key)
|
|
|
|
|
{
|
|
|
|
|
EngineId = Key->ToString();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (!OutInstallations.FindKey(EngineDir))
|
|
|
|
|
{
|
|
|
|
|
EngineId = FGuid::NewGuid().ToString(EGuidFormats::DigitsWithHyphens);
|
|
|
|
|
Section.AddUnique(*EngineId, EngineDir);
|
|
|
|
|
ConfigFile.Dirty = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!EngineId.IsEmpty() && !OutInstallations.Find(EngineId))
|
|
|
|
|
{
|
|
|
|
|
OutInstallations.Add(EngineId, EngineDir);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ConfigFile.Write(ConfigPath);
|
|
|
|
|
|
|
|
|
|
IFileManager::Get().Delete(*UProjectPath);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool FDesktopPlatformLinux::IsSourceDistribution(const FString &RootDir)
|
|
|
|
|
{
|
|
|
|
|
// Check for the existence of a GenerateProjectFiles.sh file. This allows compatibility with the GitHub 4.0 release.
|
|
|
|
|
FString GenerateProjectFilesPath = RootDir / TEXT("GenerateProjectFiles.sh");
|
|
|
|
|
if (IFileManager::Get().FileSize(*GenerateProjectFilesPath) >= 0)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Otherwise use the default test
|
|
|
|
|
return FDesktopPlatformBase::IsSourceDistribution(RootDir);
|
2014-06-05 17:01:39 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool FDesktopPlatformLinux::VerifyFileAssociations()
|
|
|
|
|
{
|
2014-07-30 23:26:47 -04:00
|
|
|
STUBBED("FDesktopPlatformLinux::VerifyFileAssociationsg");
|
|
|
|
|
return true; // for now we are associated
|
2014-06-05 17:01:39 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool FDesktopPlatformLinux::UpdateFileAssociations()
|
|
|
|
|
{
|
2014-07-30 23:26:47 -04:00
|
|
|
//unimplemented();
|
|
|
|
|
STUBBED("FDesktopPlatformLinux::UpdateFileAssociations");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool FDesktopPlatformLinux::OpenProject(const FString &ProjectFileName)
|
|
|
|
|
{
|
|
|
|
|
// Get the project filename in a native format
|
|
|
|
|
FString PlatformProjectFileName = ProjectFileName;
|
|
|
|
|
FPaths::MakePlatformFilename(PlatformProjectFileName);
|
|
|
|
|
|
|
|
|
|
STUBBED("FDesktopPlatformLinux::OpenProject");
|
2014-06-05 17:01:39 -04:00
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool FDesktopPlatformLinux::RunUnrealBuildTool(const FText& Description, const FString& RootDir, const FString& Arguments, FFeedbackContext* Warn)
|
|
|
|
|
{
|
2014-07-30 23:26:47 -04:00
|
|
|
// Get the path to UBT
|
|
|
|
|
FString UnrealBuildToolPath = RootDir / TEXT("Engine/Binaries/DotNET/UnrealBuildTool.exe");
|
|
|
|
|
if(IFileManager::Get().FileSize(*UnrealBuildToolPath) < 0)
|
|
|
|
|
{
|
|
|
|
|
Warn->Logf(ELogVerbosity::Error, TEXT("Couldn't find UnrealBuildTool at '%s'"), *UnrealBuildToolPath);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Write the output
|
|
|
|
|
Warn->Logf(TEXT("Running %s %s"), *UnrealBuildToolPath, *Arguments);
|
|
|
|
|
|
|
|
|
|
// launch UBT with Mono
|
|
|
|
|
FString CmdLineParams = FString::Printf(TEXT("\"%s\" %s"), *UnrealBuildToolPath, *Arguments);
|
|
|
|
|
|
|
|
|
|
// Spawn it
|
|
|
|
|
int32 ExitCode = 0;
|
|
|
|
|
return FFeedbackContextMarkup::PipeProcessOutput(Description, TEXT("/usr/bin/mono"), CmdLineParams, Warn, &ExitCode) && ExitCode == 0;
|
2014-06-05 17:01:39 -04:00
|
|
|
}
|
|
|
|
|
|
2014-09-18 15:12:13 -04:00
|
|
|
bool FDesktopPlatformLinux::IsUnrealBuildToolRunning()
|
|
|
|
|
{
|
|
|
|
|
// For now assume that if mono application is running, we're running UBT
|
|
|
|
|
// @todo: we need to get the commandline for the mono process and check if UBT.exe is in there.
|
|
|
|
|
return FPlatformProcess::IsApplicationRunning(TEXT("mono"));
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-05 17:01:39 -04:00
|
|
|
FFeedbackContext* FDesktopPlatformLinux::GetNativeFeedbackContext()
|
|
|
|
|
{
|
2014-07-30 23:26:47 -04:00
|
|
|
//unimplemented();
|
|
|
|
|
STUBBED("FDesktopPlatformLinux::GetNativeFeedbackContext");
|
|
|
|
|
return GWarn;
|
2014-06-05 17:01:39 -04:00
|
|
|
}
|
|
|
|
|
|
2015-01-16 13:29:54 -05:00
|
|
|
FString FDesktopPlatformLinux::GetUserTempPath()
|
|
|
|
|
{
|
2015-01-16 16:20:36 -05:00
|
|
|
return FString(FPlatformProcess::UserTempDir());
|
2015-01-16 13:29:54 -05:00
|
|
|
}
|
|
|
|
|
|
2014-06-05 17:01:39 -04:00
|
|
|
#undef LOCTEXT_NAMESPACE
|