Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The boilerplate module creates a folder named (literally) "$(ProjectDir)/Binaries/...." in the UE4 Source folder #16

Open
Daan-xyz opened this issue May 13, 2022 · 2 comments

Comments

@Daan-xyz
Copy link

This is probably due to the boilerplate code snippet:

		//Ensure our staging directory exists prior to copying any dependency data files into it
		string stagingDir = Path.Combine("$(ProjectDir)", "Binaries", "Data", "${MODULE}");
		if (!Directory.Exists(stagingDir)) {
			Directory.CreateDirectory(stagingDir);
		}

Possibly $(ProjectDir) should be ${ProjectDir} but I'm not (yet) familiar enough to know for sure.

BTW respecting how you are stong-arming all this build system/library chaos together :)

@wl2776
Copy link

wl2776 commented Nov 13, 2022

I also have this issue. Odd enough.

These variables are described in the UE manuals:
https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/BuildTools/UnrealBuildTool/ThirdPartyLibraries/

It seems this feature doesn't work for some reason.

Or, if we notice that these character sequences ($, then (, then P, ...) appear only in calls to the RuntimeDependencies.Add method, it might be the case that these sequences are specially handled by that method and are consumed literally in other places.

@wl2776
Copy link

wl2776 commented Nov 13, 2022

I've studied sources of UE build tools.
For example, in file C:\Program Files\Epic Games\UE_4.26\Engine\Source\Programs\UnrealBuildTool\Configuration\TargetRules.cs we can see the following

		/// <summary>
		/// Specifies a list of steps which should be executed before this target is built, in the context of the host platform's shell.
		/// The following variables will be expanded before execution:
		/// $(EngineDir), $(ProjectDir), $(TargetName), $(TargetPlatform), $(TargetConfiguration), $(TargetType), $(ProjectFile).
		/// </summary>
		public List<string> PreBuildSteps = new List<string>();

File C:\Program Files\Epic Games\UE_4.26\Engine\Source\Programs\UnrealBuildTool\Configuration\ModuleRules.cs

		public class RuntimeDependency
		{
			/// <summary>
			/// The file that should be staged. Should use $(EngineDir) and $(ProjectDir) variables as a root, so that the target can be relocated to different machines.
			/// </summary>
			public string Path;

variables will be expanded

This means that UBT stores these paths in its properties and changes them on the fly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants