OSX Build fails because wrong file referenced

In 4.10.1, When you hit ‘Compile’ the compile and link steps work.

The last part of the build script is a shell command to remove the dylib file.

This fails because the version of the file it’s trying to find is static, and on each build, the actual version number changes:

In the build log, see the line of the successful link step?
Link UE4Editor-BatteryCollector-7082.dylib

Then after, the attempt to sh -c 'rm -rf on a file with 6778:

I’m guessing, after the initial project creation, the number to use is ‘baked’ into the project scripts. So any new build, that creates a new library with a different version number, will never be found by the baked script.

On each successive build, the version number changes, but the 6778 number is not updated to keep up.

Which build script keeps track of this information, and how should I change it?


Can you send me a quick script fix?

[Example of build output below:]

CompilerResultsLog: Info Running
Mono… CompilerResultsLog: Info
CompilerResultsLog: Info Setting up
Mono CompilerResultsLog: Info
CompilerResultsLog: Info Compiling
game modules for hot reload
CompilerResultsLog: Info Parsing
headers for BatteryCollectorEditor
CompilerResultsLog: Info Running
-LogCmds=“loginit warning, logexit warning, logdatabase error” -rocket
-installed CompilerResultsLog: Info Reflection code generated for
BatteryCollectorEditor in 16.9129697
seconds CompilerResultsLog: Info
Performing 4 actions (8 in parallel)
CompilerResultsLog: Info [2/4] Compile
CompilerResultsLog: Info [1/4] Compile
Pickup.cpp CompilerResultsLog: Info
[3/4] Link
CompilerResultsLog: Info [4/4] sh -c
‘rm -rf
-f “/Users/Robert/Documents/Unreal Projects/BatteryCollector/Binaries/Mac/UE4Editor-BatteryCollector-6778.dylib”
-o “/Users/Robert/Documents/Unreal Projects/BatteryCollector/Binaries/Mac/UE4Editor-BatteryCollector-6778.dSYM”’