Closed McJones closed 4 years ago
I don't have access to a Mac to try and reproduce the issue, so I'll try to guide you through the steps to determine the cause. The first thing to check is whether UnrealBuildTool is producing the JSON file in the first place. If you run the command with the environment variable UE4CLI_VERBOSE
set to 1, it should print out the underlying command that's being run:
# Run the command with verbose output enabled
UE4CLI_VERBOSE=1 ue4 conan generate
# The output should include a line that looks roughly like this:
# [UE4CLI] EXECUTE COMMAND: ['/path/to/Build.sh', 'UE4Editor', 'Win64', 'Development', '-Mode=JsonExport', '-OutputFile=/path/to/ubt_output.json']
Grab the command (removing the square brackets and comma separators) and try running it directly, but specify a non-temporary directory for the JSON output path (e.g. your Desktop directory, /Users/McJones/Desktop/ubt_output.json
.) Does the JSON file get generated successfully? Is the generated file non-empty?
Ran the command in verbose mode and it turns out the UnrealBuildTool isn't even there. I checked this and there is no UnrealBuildTool in the Binaries/DotNet folder nor can I find it in any of the other binary folders. Output of the command below just in case:
Running system mono/msbuild, version: Mono JIT compiler version 6.6.0.155 (2019-08/296a9afdb24 Thu Nov 14 06:12:25 EST 2019)
Running command : Engine/Binaries/DotNET/UnrealBuildTool.exe UE4Editor Mac Development -Mode=JsonExport -OutputFile=/Users/McJones/Desktop/ubt_output.json
Cannot open assembly 'Engine/Binaries/DotNET/UnrealBuildTool.exe': No such file or directory.
Ok I built the UnrealBuildTool.exe myself from source, put it in the right spot and now it all appears to be working. Unsure why the setup didn't include the build tool by default, might just be a Mac thing. Thanks for your help.
Just a quick follow-up to this: in addressing ue4cli ussue #18 I realised that the behaviour of the Unreal Engine's build scripts varies slightly between Linux and Mac, and under Mac it's necessary to run GenerateProjectFiles.sh
to ensure UnrealBuildTool is built. I've updated the README in commit 2dfdac3 to list project file generation as a necessary step.
I am currently on macOS (10.15.3) and the process fails when attempting to generate profile and packages using the
ue4 conan generate
command. It appears to not be creating a json file (or the file can't be read for whatever reason) from the build tool. I have downloaded a source checkout of UE4 engine and run the setup.sh to download the necessary files and set the root of ue4cli to the source code checkout. I have Unreal 4.24.3 installed locally and the latest (as of today) version of UE4 source checked code checked out from GitHub. Error message is below: