Skip to content

Commit

Permalink
Version 3.0.3
Browse files Browse the repository at this point in the history
- Reflecting code from UE depot as of November 2023 (5.3, 5.4).
- Adding build files for Mobu 2024
  • Loading branch information
SimonTherriaultEpic committed Nov 27, 2023
1 parent 57b3cd3 commit 2568852
Show file tree
Hide file tree
Showing 15 changed files with 509 additions and 432 deletions.
1 change: 1 addition & 0 deletions Source/MobuLiveLinkPlugin2016.Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ public MobuLiveLinkPlugin2016Target(TargetInfo Target) : base(Target, "2016")
{
//Mobu is not strict c++ compliant before Mobu 2019
WindowsPlatform.bStrictConformanceMode = false;
CppStandard = CppStandardVersion.Cpp17;
}
}
10 changes: 5 additions & 5 deletions Source/MobuLiveLinkPlugin2017.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ public abstract class MobuLiveLinkPluginBase : ModuleRules
{
public MobuLiveLinkPluginBase(ReadOnlyTargetRules Target, string MobuVersionString) : base(Target)
{
PrivatePCHHeaderFile = "Private/MobuLiveLinkPluginPrivatePCH.h";

bEnforceIWYU = false;
IWYUSupport = IWYUSupport.None;
bUseRTTI = true;

PrivateIncludePathModuleNames.Add("Launch");

PrivateIncludePaths.AddRange(new string[]
{
Path.Combine(EngineDirectory, "Source/Runtime/Launch/Public"),
Path.Combine(EngineDirectory, "Source/Runtime/Launch/Private"),
Path.Combine(ModuleDirectory, "StreamObjects/Public"),
});

Expand Down Expand Up @@ -65,6 +63,8 @@ public MobuLiveLinkPluginBase(ReadOnlyTargetRules Target, string MobuVersionStri
PublicAdditionalLibraries.Add(Path.Combine(LibDir, "fbsdk.lib"));
}
}

PublicDefinitions.Add("PRODUCT_VERSION=" + MobuVersionString);
}
}
}
Expand Down
11 changes: 9 additions & 2 deletions Source/MobuLiveLinkPlugin2017.Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using UnrealBuildTool;
using System;
using System.IO;
using Tools.DotNETCommon;
using EpicGames.Core;
using System.Runtime.CompilerServices;

[SupportedPlatforms(UnrealPlatformClass.Desktop)]
Expand Down Expand Up @@ -54,7 +54,6 @@ public MobuLiveLinkPluginTargetBase(TargetInfo Target, string InMobuVersionStrin

// We only need minimal use of the engine for this plugin
bBuildDeveloperTools = false;
bUseMallocProfiler = false;
bBuildWithEditorOnlyData = true;
bCompileAgainstEngine = false;
bCompileAgainstCoreUObject = true;
Expand Down Expand Up @@ -95,6 +94,8 @@ public MobuLiveLinkPluginTargetBase(TargetInfo Target, string InMobuVersionStrin

string ResourcesDir = Path.Combine(ProgramsDir, "MobuLiveLink", "Resources");
string PostBuildBinDir = Path.Combine(DefaultBinDir, "MotionBuilder", InMobuVersionString);
string TbbDependency = Path.Combine(EngineBinariesDir, "tbb.dll");
string TbbMallocDependency = Path.Combine(EngineBinariesDir, "tbbmalloc.dll");

// Copy resources
PostBuildSteps.Add(string.Format("echo Copying {0} to {1}...", ResourcesDir, PostBuildBinDir));
Expand All @@ -103,6 +104,11 @@ public MobuLiveLinkPluginTargetBase(TargetInfo Target, string InMobuVersionStrin
// Copy binaries
PostBuildSteps.Add(string.Format("echo Copying {0} to {1}...", EngineBinariesDir, PostBuildBinDir));
PostBuildSteps.Add(string.Format("xcopy /y /i /v \"{0}\\{1}.*\" \"{2}\" 1>nul", EngineBinariesDir, LaunchModuleName, PostBuildBinDir));

// Copy support dlls
PostBuildSteps.Add(string.Format("echo Copying {0} to {1}...", TbbDependency, PostBuildBinDir));
PostBuildSteps.Add(string.Format("xcopy /y /i /r /v \"{0}\" \"{1}\" 1>nul", TbbDependency, PostBuildBinDir));
PostBuildSteps.Add(string.Format("xcopy /y /i /r /v \"{0}\" \"{1}\" 1>nul", TbbMallocDependency, PostBuildBinDir));
}
}

Expand All @@ -112,5 +118,6 @@ public MobuLiveLinkPlugin2017Target(TargetInfo Target) : base(Target, "2017")
{
//Mobu is not strict c++ compliant before Mobu 2019
WindowsPlatform.bStrictConformanceMode = false;
CppStandard = CppStandardVersion.Cpp17;
}
}
1 change: 1 addition & 0 deletions Source/MobuLiveLinkPlugin2018.Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ public MobuLiveLinkPlugin2018Target(TargetInfo Target) : base(Target, "2018")
{
//Mobu is not strict c++ compliant before Mobu 2019
WindowsPlatform.bStrictConformanceMode = false;
CppStandard = CppStandardVersion.Cpp17;
}
}
3 changes: 3 additions & 0 deletions Source/MobuLiveLinkPlugin2022.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ public class MobuLiveLinkPlugin2022 : MobuLiveLinkPluginBase
public MobuLiveLinkPlugin2022(ReadOnlyTargetRules Target) : base(Target, "2022")
{
CppStandard = CppStandardVersion.Cpp17;

// Replace with PCHUsageMode.UseExplicitOrSharedPCHs when this plugin can compile with cpp20
PCHUsage = PCHUsageMode.NoPCHs;
}
}
15 changes: 15 additions & 0 deletions Source/MobuLiveLinkPlugin2023.Build.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.IO;

public class MobuLiveLinkPlugin2023 : MobuLiveLinkPluginBase
{
public MobuLiveLinkPlugin2023(ReadOnlyTargetRules Target) : base(Target, "2023")
{
CppStandard = CppStandardVersion.Cpp17;

// Replace with PCHUsageMode.UseExplicitOrSharedPCHs when this plugin can compile with cpp20
PCHUsage = PCHUsageMode.NoPCHs;
}
}
11 changes: 11 additions & 0 deletions Source/MobuLiveLinkPlugin2023.Target.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;
using System.IO;

public class MobuLiveLinkPlugin2023Target : MobuLiveLinkPluginTargetBase
{
public MobuLiveLinkPlugin2023Target(TargetInfo Target) : base(Target, "2023")
{}
}
12 changes: 12 additions & 0 deletions Source/MobuLiveLinkPlugin2024.Build.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.IO;

public class MobuLiveLinkPlugin2024 : MobuLiveLinkPluginBase
{
public MobuLiveLinkPlugin2024(ReadOnlyTargetRules Target) : base(Target, "2024")
{
CppStandard = CppStandardVersion.Cpp17;
}
}
11 changes: 11 additions & 0 deletions Source/MobuLiveLinkPlugin2024.Target.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;
using System.IO;

public class MobuLiveLinkPlugin2024Target : MobuLiveLinkPluginTargetBase
{
public MobuLiveLinkPlugin2024Target(TargetInfo Target) : base(Target, "2024")
{}
}
86 changes: 45 additions & 41 deletions Source/Private/MobuLiveLink.cpp
Original file line number Diff line number Diff line change
@@ -1,41 +1,45 @@
// Copyright Epic Games, Inc. All Rights Reserved.

#include "RequiredProgramMainCPPInclude.h"
#include "MobuLiveLinkCommon.h"

DEFINE_LOG_CATEGORY_STATIC(LogMoBuPlugin, Log, All);

IMPLEMENT_APPLICATION(MobuLiveLinkPlugin, "MobuLiveLinkPlugin");

//--- Library declaration
FBLibraryDeclare( FMobuLiveLink )
{
FBLibraryRegister( FMobuLiveLink );
FBLibraryRegister( FMobuLiveLinkLayout );
}
FBLibraryDeclareEnd;

/************************************************
* Library functions.
************************************************/
bool FBLibrary::LibInit()
{
GEngineLoop.PreInit(TEXT("MobuLiveLinkPlugin -Messaging"));

// ensure target platform manager is referenced early as it must be created on the main thread
GetTargetPlatformManager();

ProcessNewlyLoadedUObjects();

// Tell the module manager that it may now process newly-loaded UObjects when new C++ modules are loaded
FModuleManager::Get().StartProcessingNewlyLoadedObjects();
FModuleManager::Get().LoadModule(TEXT("UdpMessaging"));

FBTrace("MobuLiveLink Library Initialized\n");
return true;
}

bool FBLibrary::LibOpen() { return true; }
bool FBLibrary::LibReady() { return true; }
bool FBLibrary::LibClose() { return true; }
bool FBLibrary::LibRelease(){ return true; }
// Copyright Epic Games, Inc. All Rights Reserved.

#include "RequiredProgramMainCPPInclude.h"
#include "MobuLiveLinkCommon.h"

DEFINE_LOG_CATEGORY_STATIC(LogMoBuPlugin, Log, All);

IMPLEMENT_APPLICATION(MobuLiveLinkPlugin, "MobuLiveLinkPlugin");

//--- Library declaration
FBLibraryDeclare( FMobuLiveLink )
{
FBLibraryRegister( FMobuLiveLink );
FBLibraryRegister( FMobuLiveLinkLayout );
}
FBLibraryDeclareEnd;

/************************************************
* Library functions.
************************************************/
bool FBLibrary::LibInit()
{
GEngineLoop.PreInit(TEXT("MobuLiveLinkPlugin -Messaging"));

// ensure target platform manager is referenced early as it must be created on the main thread
GetTargetPlatformManager();

ProcessNewlyLoadedUObjects();

// Tell the module manager that it may now process newly-loaded UObjects when new C++ modules are loaded
FModuleManager::Get().StartProcessingNewlyLoadedObjects();
FModuleManager::Get().LoadModule(TEXT("UdpMessaging"));

IPluginManager::Get().LoadModulesForEnabledPlugins(ELoadingPhase::PreDefault);
IPluginManager::Get().LoadModulesForEnabledPlugins(ELoadingPhase::Default);
IPluginManager::Get().LoadModulesForEnabledPlugins(ELoadingPhase::PostDefault);

FBTrace("MobuLiveLink Library Initialized\n");
return true;
}

bool FBLibrary::LibOpen() { return true; }
bool FBLibrary::LibReady() { return true; }
bool FBLibrary::LibClose() { return true; }
bool FBLibrary::LibRelease(){ return true; }
4 changes: 2 additions & 2 deletions Source/Private/MobuLiveLinkDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ bool FMobuLiveLink::DeviceOperation(kDeviceOperations pOperation)

void FMobuLiveLink::SetDeviceInformation(const char* NewDeviceInformation)
{
FString VersionString("v2.5.0 (");
FString VersionString("v3.0.3 (");
VersionString += __DATE__;
VersionString += ")";
HardwareVersionInfo.SetString(FStringToChar(VersionString));
Expand Down Expand Up @@ -614,7 +614,7 @@ void FMobuLiveLink::UpdateStreamObjects()
void FMobuLiveLink::TickCoreTicker()
{
double CurrentTime = FPlatformTime::Seconds();
FTicker::GetCoreTicker().Tick(CurrentTime - LastEvaluationTime);
FTSTicker::GetCoreTicker().Tick(CurrentTime - LastEvaluationTime);
LastEvaluationTime = CurrentTime;
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Private/MobuLiveLinkLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ void FMobuLiveLinkLayout::EventAddStaticEndpoint(HISender Sender, HKEvent Event)
{
char NewAddressString[1024] = "0.0.0.0:6666";

const std::string Description("Enter a new Static Endpoint Address of the PC running UE4.");
const std::string Description("Enter a new Static Endpoint Address of the PC running Unreal Engine.");
const std::string FormatHint("\n\nThe entered address was not formatted correctly. The format must match this pattern:\nIpAddress:Port");
int ButtonClicked = 0;
bool bTryAgain = false;
Expand Down
3 changes: 0 additions & 3 deletions Source/Private/MobuLiveLinkPluginPrivatePCH.h

This file was deleted.

Loading

0 comments on commit 2568852

Please sign in to comment.