AleDel / Spout-UE4

Spout Plugin for Unreal Engine
175 stars 80 forks source link

As of UE 4.12, a statement in build script is obsolete #10

Closed b-adkins closed 8 years ago

b-adkins commented 8 years ago
Running C:/Program Files (x86)/Epic Games/4.12/Engine/Binaries/DotNET/UnrealBuildTool.exe  -projectfiles -project="c:/Code/unreal/video 4.12/video.uproject" -game -rocket -progress
Discovering modules, targets and source code for project...
Messages while compiling c:\Code\unreal\video 4.12\Intermediate\Build\BuildRules\videoModuleRules.dll:
c:\Code\unreal\video 4.12\Plugins\Spout-UE4\Source\SpoutPlugin\SpoutPlugin.Build.cs(12,44) : error CS0619: 'UnrealBuildTool.RulesCompiler.GetModuleFilename(string)' is obsolete: 'GetModuleFilename is deprecated, use the ModuleDirectory property on any ModuleRules instead to get a path to your module.'
UnrealBuildTool Exception: ERROR: UnrealBuildTool encountered an error while compiling source files

I cloned f77157c to a project Plugins directory and tried to Generate Visual Studio Files from the .uproject file's right-click menu.

b-adkins commented 8 years ago

The fix was very simple:

diff --git a/Binaries/Win64/UE4Editor-SpoutPlugin.dll b/Binaries/Win64/UE4Editor
-SpoutPlugin.dll
index 99ade3b..cfeace1 100644
Binary files a/Binaries/Win64/UE4Editor-SpoutPlugin.dll and b/Binaries/Win64/UE4
Editor-SpoutPlugin.dll differ
diff --git a/Source/SpoutPlugin/SpoutPlugin.Build.cs b/Source/SpoutPlugin/SpoutP
lugin.Build.cs
index f4ded16..9a38d9b 100644
--- a/Source/SpoutPlugin/SpoutPlugin.Build.cs
+++ b/Source/SpoutPlugin/SpoutPlugin.Build.cs
@@ -9,7 +9,7 @@ public class SpoutPlugin : ModuleRules

     private string ModulePath
     {
-        get { return Path.GetDirectoryName(RulesCompiler.GetModuleFilename(this
.GetType().Name)); }
+        get { return ModuleDirectory; }
     }

     private string ThirdPartyPath

Posting here in case I never get around to doing a pull request.

AleDel commented 8 years ago

thks, good, you can make a pull request now if you want