You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Converted Concert API transferring package data in-memory only model to a streaming model to support packages bigger than 2 GB. (TNumberiLimit<int32>::max()) - Added the IConcertFileSharing interface to share large files between the client and the server. This is used as a side channel to the Concert request/response and event protocol. - Fixed the ConcertClientPackageManager to prevent sending the package data for each the 'pre-save' when the 'live sync' is off. It only emits it once. - Fixed UI to correctly report pre-save vs save vs auto-save for package as well as when a package is discarded. #jira UE-85652 - Crash when importing large FBX with Morph Targets and Disaster Recovery enabled #jira UE-78722 - Potential Memory Leak with Disaster Recovery Plugin #rb Francis.Hurteau, Jamie.Dale #ROBOMERGE-SOURCE: CL 12113821 in //UE4/Release-4.25/... via CL 12113828 #ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v657-12064184) [CL 12113837 by patrick laflamme in Main branch]
64 lines
2.8 KiB
C++
64 lines
2.8 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "ConcertSettings.h"
|
|
#include "ConcertSyncServerLoop.h"
|
|
#include "ConcertLocalFileSharingService.h"
|
|
|
|
#include "RequiredProgramMainCPPInclude.h"
|
|
|
|
IMPLEMENT_APPLICATION(UnrealRecoverySvc, "UnrealRecoverySvc");
|
|
|
|
/**
|
|
* Application entry point
|
|
*
|
|
* @param ArgC Command-line argument count
|
|
* @param ArgV Argument strings
|
|
*/
|
|
INT32_MAIN_INT32_ARGC_TCHAR_ARGV()
|
|
{
|
|
uint32 EditorProcessId = 0;
|
|
|
|
FConcertSyncServerLoopInitArgs ServerLoopInitArgs;
|
|
ServerLoopInitArgs.IdealFramerate = 30;
|
|
ServerLoopInitArgs.SessionFlags = EConcertSyncSessionFlags::Default_DisasterRecoverySession;
|
|
ServerLoopInitArgs.ServiceRole = TEXT("DisasterRecovery");
|
|
ServerLoopInitArgs.ServiceFriendlyName = TEXT("Disaster Recovery Service");
|
|
ServerLoopInitArgs.ServiceAutoArchiveSessionFilter.bIncludeIgnoredActivities = true;
|
|
ServerLoopInitArgs.FileSharingService = MakeShared<FConcertLocalFileSharingService>(ServerLoopInitArgs.ServiceRole);
|
|
ServerLoopInitArgs.bShowConsole = false;
|
|
|
|
ServerLoopInitArgs.GetServerConfigFunc = [&EditorProcessId]() -> const UConcertServerConfig*
|
|
{
|
|
FParse::Value(FCommandLine::Get(), TEXT("-EDITORPID="), EditorProcessId);
|
|
if (EditorProcessId)
|
|
{
|
|
UE_LOG(LogSyncServer, Display, TEXT("Watching Editor process %d"), EditorProcessId);
|
|
}
|
|
else
|
|
{
|
|
UE_LOG(LogSyncServer, Error, TEXT("Invalid -EditorPID argument. Cannot continue!"));
|
|
return nullptr;
|
|
}
|
|
|
|
UConcertServerConfig* ServerConfig = IConcertSyncServerModule::Get().ParseServerSettings(FCommandLine::Get());
|
|
ServerConfig->bAutoArchiveOnReboot = false; // Skip archiving, this can takes several minutes. It is more efficient to leave the live session as it and 'copy' it on demand (to restore).
|
|
ServerConfig->bAutoArchiveOnShutdown = false; // Skip archiving, this can takes several minutes. It is more efficient to leave the live session as it and 'copy' it on demand (to restore).
|
|
ServerConfig->EndpointSettings.RemoteEndpointTimeoutSeconds = 0; // Ensure the endpoints never time out (and are kept alive automatically by Concert).
|
|
ServerConfig->bMountDefaultSessionRepository = false; // Let the client mount its own repository to support concurrent service and avoid them to access the same non-sharable database files.
|
|
ServerConfig->AuthorizedClientKeys.Add(ServerConfig->ServerName); // The disaster recovery client is configured to use the unique server name as key to identify itself.
|
|
return ServerConfig;
|
|
};
|
|
|
|
FTicker::GetCoreTicker().AddTicker(TEXT("CheckEditorHealth"), 1.0f, [&EditorProcessId](float)
|
|
{
|
|
if (!FPlatformProcess::IsApplicationRunning(EditorProcessId))
|
|
{
|
|
UE_LOG(LogSyncServer, Warning, TEXT("Editor process %d lost! Requesting exit."), EditorProcessId);
|
|
FPlatformMisc::RequestExit(false);
|
|
}
|
|
return true;
|
|
});
|
|
|
|
return ConcertSyncServerLoop(ArgC, ArgV, ServerLoopInitArgs);
|
|
}
|