Skip to content

Commit

Permalink
Plugin updated for Noesis SDK 3.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
s-fernandez-v committed Feb 10, 2021
1 parent 6882854 commit eefb409
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
28 changes: 27 additions & 1 deletion Source/Noesis/Noesis.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ public Noesis(ReadOnlyTargetRules Target) : base(Target)
string NoesisIncludePath = Path.Combine(NoesisBasePath, "Include");
string NoesisInteractivityIncludePath = Path.Combine(NoesisBasePath, "Src", "Packages", "App", "Interactivity", "Include");

// In monolithic builds we don't want the Interactivity functions
// dllexported or dllimported from any modules.
// That's why we use PublicDefinitions.
if (Target.LinkType == TargetLinkType.Monolithic)
{
PublicDefinitions.Add("NS_APP_INTERACTIVITY_API=");
}

PublicIncludePaths.Add(ModuleDirectory);
PublicIncludePaths.Add(NoesisIncludePath);
PublicIncludePaths.Add(NoesisInteractivityIncludePath);
Expand Down Expand Up @@ -101,7 +109,25 @@ public Noesis(ReadOnlyTargetRules Target) : base(Target)
}
else if (Target.Platform == UnrealTargetPlatform.XboxOne)
{
PublicAdditionalLibraries.Add(Path.Combine(NoesisBasePath, "Bin", "xbox_one", "Noesis.lib"));
PublicAdditionalLibraries.Add(Path.Combine(NoesisBasePath, "Lib", "xbox_one", "Noesis.lib"));

string NoesisDllPath = Path.Combine("NoesisSDK", "Bin", "xbox_one", "Noesis.dll");
string NoesisDllTargetPath = Path.Combine("Binaries", "XboxOne", "Noesis.dll");

if (Target.ProjectFile != null)
{
System.Console.WriteLine("Copying Noesis.dll to {0}", Path.Combine(DirectoryReference.FromFile(Target.ProjectFile).ToString(), NoesisDllTargetPath));
CopyNoesisDll(Path.Combine(ModuleDirectory, NoesisDllPath), Path.Combine(DirectoryReference.FromFile(Target.ProjectFile).ToString(), NoesisDllTargetPath));
}

if (Target.LinkType == TargetLinkType.Monolithic)
{
RuntimeDependencies.Add(Path.Combine("$(ProjectDir)", NoesisDllTargetPath));
}
else
{
RuntimeDependencies.Add(Path.Combine("$(EngineDir)", NoesisDllTargetPath));
}
}
else if (UnrealTargetPlatform.TryParse("HTML5", out Platform) && Target.Platform == Platform)
{
Expand Down
9 changes: 9 additions & 0 deletions Source/NoesisRuntime/NoesisRuntime.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ public NoesisRuntime(ReadOnlyTargetRules Target) : base(Target)
PCHUsage = PCHUsageMode.NoSharedPCHs;
PrivatePCHHeaderFile = "Private/NoesisRuntimePrivatePCH.h";

// In modular builds we want the Interactivity functions
// dllexported from this module and
// dllimported from the other modules.
// That's why we use PrivateDefinitions.
if (Target.LinkType == TargetLinkType.Modular)
{
PrivateDefinitions.Add("NS_APP_INTERACTIVITY_API=NS_DLL_EXPORT");
}

PublicIncludePaths.AddRange(
new string[] {
}
Expand Down
1 change: 0 additions & 1 deletion Source/NoesisRuntime/Private/NoesisInteractivity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Copyright (c) 2013 Noesis Technologies S.L. All Rights Reserved.
////////////////////////////////////////////////////////////////////////////////////////////////////

#define NS_APP_INTERACTIVITY_API NS_DLL_EXPORT
#if PLATFORM_WINDOWS || PLATFORM_XBOXONE
#pragma warning(push)
#pragma warning(disable:4426)
Expand Down
4 changes: 4 additions & 0 deletions Source/NoesisRuntime/Private/NoesisSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
#include "NoesisSettings.h"

// FreeType2 includes
#if PLATFORM_COMPILER_HAS_GENERIC_KEYWORD
#define generic __identifier(generic)
#endif //PLATFORM_COMPILER_HAS_GENERIC_KEYWORD

THIRD_PARTY_INCLUDES_START
#include "ft2build.h"
#include FT_FREETYPE_H
Expand Down

0 comments on commit eefb409

Please sign in to comment.