A modded EditSaber for making beat saber maps.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
3.0 KiB

  1. // Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
  2. using UnrealBuildTool;
  3. using System.IO;
  4. public class ZipUtility : ModuleRules
  5. {
  6. private string ThirdPartyPath
  7. {
  8. get { return Path.GetFullPath(Path.Combine(ModuleDirectory, "../../ThirdParty/")); }
  9. }
  10. private string SevenZppPath
  11. {
  12. get { return Path.GetFullPath(Path.Combine(ThirdPartyPath, "7zpp")); }
  13. }
  14. private string ATLPath
  15. {
  16. get { return "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/atlmfc"; }
  17. }
  18. public ZipUtility(ReadOnlyTargetRules Target) : base(Target)
  19. {
  20. bEnableExceptions = true;
  21. PublicIncludePaths.AddRange(
  22. new string[] {
  23. "ZipUtility/Public"
  24. // ... add public include paths required here ...
  25. }
  26. );
  27. PrivateIncludePaths.AddRange(
  28. new string[] {
  29. "ZipUtility/Private",
  30. Path.Combine(SevenZppPath, "Include"),
  31. Path.Combine(ATLPath, "include"),
  32. // ... add other private include paths required here ...
  33. }
  34. );
  35. PublicDependencyModuleNames.AddRange(
  36. new string[]
  37. {
  38. "Core",
  39. "WindowsFileUtility"
  40. // ... add other public dependencies that you statically link with here ...
  41. }
  42. );
  43. PrivateDependencyModuleNames.AddRange(
  44. new string[]
  45. {
  46. "CoreUObject",
  47. "Engine",
  48. "Slate",
  49. "SlateCore",
  50. "Projects"
  51. // ... add private dependencies that you statically link with here ...
  52. }
  53. );
  54. DynamicallyLoadedModuleNames.AddRange(
  55. new string[]
  56. {
  57. // ... add any modules that your module loads dynamically here ...
  58. }
  59. );
  60. LoadLib(Target);
  61. }
  62. public bool LoadLib(ReadOnlyTargetRules Target)
  63. {
  64. bool isLibrarySupported = false;
  65. if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
  66. {
  67. isLibrarySupported = true;
  68. string PlatformSubPath = (Target.Platform == UnrealTargetPlatform.Win64) ? "Win64" : "Win32";
  69. string LibrariesPath = Path.Combine(SevenZppPath, "Lib");
  70. string DLLPath = Path.Combine(SevenZppPath, "dll");
  71. PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, PlatformSubPath, "atls.lib"));
  72. PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, PlatformSubPath, "7zpp_u.lib"));
  73. PublicLibraryPaths.Add(Path.Combine(LibrariesPath, PlatformSubPath));
  74. PublicDelayLoadDLLs.Add("7z.dll");
  75. RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(DLLPath, PlatformSubPath, "7z.dll")));
  76. }
  77. if (isLibrarySupported)
  78. {
  79. // Include path
  80. //PublicIncludePaths.Add(Path.Combine(SevenZppPath, "Include"));
  81. }
  82. return isLibrarySupported;
  83. }
  84. }