Skip to content
Snippets Groups Projects
Commit 87b8ca25 authored by Philipp Schäfer's avatar Philipp Schäfer
Browse files

VAServerLauncher: now allows sending an VARenderer.ini file while starting the VAServer remotely

parent 68b32957
No related branches found
No related tags found
1 merge request!9VAServerLauncher Improvement (now also sending reproduction type and ini)
......@@ -57,7 +57,7 @@ void AVAReceiverActor::BeginPlay()
if (bAutomaticRemoteVAStart)
{
FVAPlugin::VAServerLauncher.StartVAServerLauncher(); //if possible
bStartedVAServer = FVAPlugin::VAServerLauncher.RemoteStartVAServer(GetIPAddress(), RemoteVAStarterPort, WhichVAServerVersionToStart);
bStartedVAServer = FVAPlugin::VAServerLauncher.RemoteStartVAServer(GetIPAddress(), RemoteVAStarterPort, WhichVAServerVersionToStart, VARendererIniFile);
if(bStartedVAServer){
FVAPlugin::SetUseVA(true);
}
......
......@@ -13,7 +13,7 @@
#include "VAPlugin.h"
bool FVAServerLauncher::RemoteStartVAServer(const FString& Host, const int Port, const FString& VersionName)
bool FVAServerLauncher::RemoteStartVAServer(const FString& Host, const int Port, const FString& VersionName, const FString& VARendererIniFile)
{
if (!UVirtualRealityUtilities::IsMaster())
{
......@@ -53,6 +53,16 @@ bool FVAServerLauncher::RemoteStartVAServer(const FString& Host, const int Port,
}
FVAUtils::LogStuff("[FVAServerLauncher::RemoteStartVAServer()]: Successfully connected to Launcher", false);
const bool bSendVARendererIni = !VARendererIniFile.IsEmpty();
if (bSendVARendererIni)
{
if (!SendFileToVAServer(VARendererIniFile))
{
FVAUtils::OpenMessageBox("[FVAServerLauncher::RemoteStartVAServer()]: VARenderer.ini file '" + VARendererIniFile +
"' could not be copied to VAServer. Does the file exist? See error log for additional info. VAServer will be launched with default settings.", true);
}
}
//Send requested version
TArray<uint8> RequestData = ConvertString(VersionName);
int BytesSend = 0;
......@@ -102,6 +112,7 @@ bool FVAServerLauncher::RemoteStartVAServer(const FString& Host, const int Port,
VAServerLauncherSocket = nullptr;
return false;
}
return true;
}
......
......@@ -7,7 +7,7 @@ class FVAServerLauncher
public:
// Remote Start VAServer
bool RemoteStartVAServer(const FString& Host, int Port,
const FString& VersionName);
const FString& VersionName, const FString& VARendererIni = "");
bool StartVAServerLauncher();
......
......@@ -47,7 +47,7 @@ protected:
bool bAskForDebugMode = false;
// Check if should try to use Python Automatic Remote star
UPROPERTY(EditAnywhere, meta = (DisplayName = "Use Automatic Remote VA Start via Python?", Category = "General Settings"))
UPROPERTY(EditAnywhere, meta = (DisplayName = "Use Automatic Remote VA Start via Python?", Category = "Connection"))
bool bAutomaticRemoteVAStart = true;
// Choose how to connect to the Server (automatic: build with windows connect with 127.0.0.1:12340, build with linux connect to cave)
......@@ -88,6 +88,10 @@ protected:
"General Settings"))
FString WhichVAServerVersionToStart = TEXT("2020.a");
// Ini file with VA renderer settings. File will be sent to VAServer launcher on startup if not empty
UPROPERTY(EditAnywhere, meta = (DisplayName = "VARenderer.ini file", Category = "Connection"))
FString VARendererIniFile = TEXT("");
// Controller for global auraliztion modes
UPROPERTY(EditAnywhere, Instanced, NoClear, meta = (DisplayName = "Auraliztion Mode Controller", Category = "Auralization Modes"))
UVAAuralizationModeController* AuralizationModeController;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment