message: Supporting Python
diff: @@ -12,10 +12,13 @@ public class HackflightSim : ModuleRules
  PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
  - // Un-comment and edit one of these lines to point to your Hackflight/src library
  + // Essential
  //PrivateIncludePaths.Add("/home/slevy/Documents/Arduino/libraries/Hackflight/src"); // Linux
  PrivateIncludePaths.Add(Environment.GetEnvironmentVariable("userprofile") + "\\Documents\\Arduino\\libraries\\Hackflight\\src"); // Windows
  +
  + // Extras
  LoadOpenCV(Target);
  + LoadPython(Target);
  }
  private string ThirdPartyPath
  @@ -65,4 +68,46 @@ public class HackflightSim : ModuleRules
  return isLibrarySupported;
  }
  +
  + public bool LoadPython(ReadOnlyTargetRules Target)
  + {
  + // Start OpenCV linking here!
  + bool isLibrarySupported = false;
  +
  + // Create OpenCV Path
  + string PythonPath = Environment.GetEnvironmentVariable("userprofile") + "\\AppData\\Local\\Programs\\Python\\Python36";
  +
  + // Get Library Path
  + string LibPath = "";
  + bool isdebug = Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT;
  + if (Target.Platform == UnrealTargetPlatform.Win64)
  + {
  + LibPath = Path.Combine(PythonPath, "libs");
  + isLibrarySupported = true;
  + }
  + else
  + {
  + string Err = string.Format("{0} dedicated server is made to depend on {1}. We want to avoid this, please correct module dependencies.", Target.Platform.ToString(), this.ToString());
  + System.Console.WriteLine(Err);
  + }
  +
  + if (isLibrarySupported)
  + {
  + //Add Include path
  + PublicIncludePaths.AddRange(new string[] { Path.Combine(PythonPath, "include") });
  +
  + // Add Library Path
  + PublicLibraryPaths.Add(LibPath);
  +
  + //Add Static Libraries
  + PublicAdditionalLibraries.Add("python36.lib");
  +
  + //Add Dynamic Libraries
  + PublicDelayLoadDLLs.Add("python36.dll");
  + }
  +
  + Definitions.Add(string.Format("WITH_PYTHON_BINDING={0}", isLibrarySupported ? 1 : 0));
  +
  + return isLibrarySupported;
  + }
  }
  