Compare commits
2 Commits
aced61ec47
...
5e8a775fa7
| Author | SHA1 | Date | |
|---|---|---|---|
| 5e8a775fa7 | |||
| 7f9d5cbe4c |
@@ -1,8 +1,6 @@
|
||||
[FilterPlugin]
|
||||
; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and
|
||||
; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively.
|
||||
;
|
||||
; Examples:
|
||||
; /README.txt
|
||||
; /Extras/...
|
||||
; /Binaries/ThirdParty/*.dll
|
||||
|
||||
/ThirdParty/VBS_SDK/include/...
|
||||
/ThirdParty/VBS_SDK/Win64/...
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "../Public/Global.h"
|
||||
#include "VS_PC_SDK.h"
|
||||
|
||||
DEFINE_LOG_CATEGORY(PS_ViveVBS);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "../Public/GunMode.h"
|
||||
#include "VS_PC_SDK.h"
|
||||
|
||||
//DEFINE_LOG_CATEGORY(PS_ViveVBS);
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "../Public/MBLS.h"
|
||||
#include "../Public/Global.h"
|
||||
#include "VS_PC_SDK.h"
|
||||
|
||||
//DEFINE_LOG_CATEGORY(PS_ViveVBS);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "../Public/Passthrough.h"
|
||||
#include "VS_PC_SDK.h"
|
||||
|
||||
//DEFINE_LOG_CATEGORY(PS_ViveVBS);
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Kismet/BlueprintFunctionLibrary.h"
|
||||
#include "../VBS_SDK/VS_PC_SDK.h"
|
||||
#include "Global.generated.h"
|
||||
|
||||
DECLARE_LOG_CATEGORY_EXTERN(PS_ViveVBS, Log, All);
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Kismet/BlueprintFunctionLibrary.h"
|
||||
#include "../VBS_SDK/VS_PC_SDK.h"
|
||||
#include "Global.h"
|
||||
#include "GunMode.generated.h"
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Kismet/BlueprintFunctionLibrary.h"
|
||||
#include "../VBS_SDK/VS_PC_SDK.h"
|
||||
#include "Global.h"
|
||||
#include "MBLS.generated.h"
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Kismet/BlueprintFunctionLibrary.h"
|
||||
#include "../VBS_SDK/VS_PC_SDK.h"
|
||||
#include "Global.h"
|
||||
#include "Passthrough.generated.h"
|
||||
|
||||
|
||||
@@ -8,96 +8,42 @@ public class ViveVBS : ModuleRules
|
||||
{
|
||||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
|
||||
PublicIncludePaths.AddRange(
|
||||
new string[] {
|
||||
// ... add public include paths required here ...
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
PrivateIncludePaths.AddRange(
|
||||
new string[] {
|
||||
// ... add other private include paths required here ...
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
PublicDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
PublicDependencyModuleNames.AddRange(new string[]
|
||||
{
|
||||
"Core",
|
||||
// ... add other public dependencies that you statically link with here ...
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
PrivateDependencyModuleNames.AddRange(new string[]
|
||||
{
|
||||
"CoreUObject",
|
||||
"Engine",
|
||||
"Slate",
|
||||
"SlateCore",
|
||||
// ... add private dependencies that you statically link with here ...
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
if (Target.Platform == UnrealTargetPlatform.Win64)
|
||||
{
|
||||
string SdkRoot = Path.Combine(PluginDirectory, "ThirdParty", "VBS_SDK");
|
||||
string IncludeDir = Path.Combine(SdkRoot, "include");
|
||||
string Win64Dir = Path.Combine(SdkRoot, "Win64");
|
||||
|
||||
DynamicallyLoadedModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
// ... add any modules that your module loads dynamically here ...
|
||||
}
|
||||
);
|
||||
#if DYNAMIC_LINKAGE
|
||||
PublicDefinitions.Add("VBS_DYNAMIC_LINKAGE=1");
|
||||
#endif
|
||||
string VBS_SDK_PATH = Path.Combine(PluginDirectory, "Source/ViveVBS/VBS_SDK/");
|
||||
PublicIncludePaths.Add(VBS_SDK_PATH);
|
||||
#if DYNAMIC_LINKAGE
|
||||
PublicDelayLoadDLLs.Add("VS_PC_SDK.dll");
|
||||
PublicDelayLoadDLLs.Add("RRServerManageAPI.dll");
|
||||
RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/VBS_SDK/VS_PC_SDK.dll"));
|
||||
RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/VBS_SDK/RRServerManageAPI.dll"));
|
||||
PrivateIncludePaths.Add(IncludeDir);
|
||||
PublicAdditionalLibraries.Add(Path.Combine(Win64Dir, "VS_PC_SDK.lib"));
|
||||
|
||||
#else
|
||||
PublicAdditionalLibraries.Add(Path.Combine(VBS_SDK_PATH, "VS_PC_SDK.lib"));
|
||||
string[] Dlls =
|
||||
{
|
||||
"VS_PC_SDK.dll",
|
||||
"RRServerManageAPI.dll",
|
||||
"VSWPipeVarClient64U_MT.dll",
|
||||
};
|
||||
|
||||
if (Target.Type == TargetRules.TargetType.Editor)
|
||||
foreach (string Dll in Dlls)
|
||||
{
|
||||
string srcPath = Path.Combine(ModuleDirectory, "../../ThirdParty/Win64/");
|
||||
string destPath = Path.Combine(ModuleDirectory, "../../../../Binaries/Win64/");
|
||||
|
||||
string[] dlls = { "VS_PC_SDK.dll", "RRServerManageAPI.dll", "VSWPipeVarClient64U_MT.dll" };
|
||||
foreach (string dll in dlls)
|
||||
{
|
||||
string src = srcPath + dll;
|
||||
string dest = destPath + dll;
|
||||
bool needCopy = !File.Exists(dest);
|
||||
if (!needCopy)
|
||||
{
|
||||
var srcInfo = new FileInfo(src);
|
||||
var destInfo = new FileInfo(dest);
|
||||
needCopy = srcInfo.LastWriteTimeUtc > destInfo.LastWriteTimeUtc
|
||||
|| srcInfo.Length != destInfo.Length;
|
||||
}
|
||||
if (needCopy)
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Copy(src, dest, true);
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
System.Console.WriteLine("ViveVBS: Could not copy " + dll + " (file locked). Using existing copy.");
|
||||
RuntimeDependencies.Add(
|
||||
Path.Combine("$(BinaryOutputDir)", Dll),
|
||||
Path.Combine(Win64Dir, Dll),
|
||||
StagedFileType.NonUFS);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RuntimeDependencies.Add("$(ProjectDir)/Binaries/Win64/VS_PC_SDK.dll");
|
||||
RuntimeDependencies.Add("$(ProjectDir)/Binaries/Win64/RRServerManageAPI.dll");
|
||||
RuntimeDependencies.Add("$(ProjectDir)/Binaries/Win64/VSWPipeVarClient64U_MT.dll");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"Name": "ViveVBS",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default",
|
||||
"WhitelistPlatforms": [
|
||||
"PlatformAllowList": [
|
||||
"Win64"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user