Initial project build steps

This commit is contained in:
BeastLe9enD 2025-04-05 14:47:00 +02:00
parent 88a60e60a8
commit 76d73a6a35
8 changed files with 49 additions and 32 deletions

14
.gitignore vendored
View File

@ -2,6 +2,7 @@ Binaries
DerivedDataCache
Intermediate
Saved
Build
.vscode
.vs
*.VC.db
@ -12,3 +13,16 @@ Saved
*.suo
*.xcodeproj
*.xcworkspace
# IntelliJ
.idea/
*.DS_Store*
*.DotSettings.user
# Rust crate
Source/land_of_barl/.idea/
Source/land_of_barl/Cargo.lock
Source/land_of_barl/gen/
Source/land_of_barl/target/

View File

@ -1,12 +1,8 @@
// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class LandOfBarlTarget : TargetRules
{
public LandOfBarlTarget(TargetInfo Target) : base(Target)
{
public class LandOfBarlTarget : TargetRules {
public LandOfBarlTarget(TargetInfo Target) : base(Target) {
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V5;
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_5;

View File

View File

@ -0,0 +1,2 @@
#pragma once

View File

@ -1,23 +1,36 @@
// Copyright Epic Games, Inc. All Rights Reserved.
using System.IO;
using UnrealBuildTool;
public class LandOfBarl : ModuleRules
{
public LandOfBarl(ReadOnlyTargetRules Target) : base(Target)
{
public class LandOfBarl : ModuleRules {
private void AddRustLibrary(ReadOnlyTargetRules Target) {
var CrateDir = Path.Combine(ModuleDirectory, "..", "land_of_barl");
var TargetName = "release";
var LibraryPath = "";
if (Target.Platform == UnrealTargetPlatform.Win64) {
LibraryPath = Path.Combine(CrateDir, "target", TargetName, "land_of_barl.lib");
PublicSystemLibraries.Add("Bcrypt.Lib");
PublicSystemLibraries.Add("Ntdll.Lib");
PublicSystemLibraries.Add("Userenv.Lib");
PublicSystemLibraries.Add("WSock32.Lib");
PublicSystemLibraries.Add("WS2_32.Lib");
} else if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.Linux) {
LibraryPath = Path.Combine(CrateDir, "target", TargetName, "libland_of_barl.a");
}
ExternalDependencies.Add(LibraryPath);
PublicAdditionalLibraries.Add(LibraryPath);
}
public LandOfBarl(ReadOnlyTargetRules Target) : base(Target) {
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "EnhancedInput" });
PrivateDependencyModuleNames.AddRange(new string[] { });
PrivateDependencyModuleNames.AddRange(new string[] { });
// Uncomment if you are using Slate UI
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
// Uncomment if you are using online features
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
AddRustLibrary(Target);
}
}

View File

@ -1,5 +1,3 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#include "LandOfBarl.h"
#include "Modules/ModuleManager.h"

View File

@ -1,5 +1,3 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"

View File

@ -1,12 +1,8 @@
// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class LandOfBarlEditorTarget : TargetRules
{
public LandOfBarlEditorTarget( TargetInfo Target) : base(Target)
{
public class LandOfBarlEditorTarget : TargetRules {
public LandOfBarlEditorTarget( TargetInfo Target) : base(Target) {
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V5;
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_5;