When I make changes to C++ classes, save the changes in VS, and then click the “Recompile” in the Editor Toolbar, I receive dozens of errors like the errors shown below. I’m assuming this is due to the fact that the files haven’t been “Checked Out” of Perforce first.
The process of going through all the project folders and finding exactly the right files to check-out is extremely tedious and error-prone. I see that the Unreal Editor is able to automatically check-out pretty much every other type of asset (and their various dependent files). Why isn’t the same thing done for C++ files, Intermediate files, Source files, etc?
Info Errors detected while compiling C:\Users\\Perforce\\\Intermediate\Build\BuildRules\Madison_EditorRecompileModuleRules.dll:
Info error CS0042: Unexpected error creating debug information file 'c:\Users\\Perforce\\\Intermediate\Build\BuildRules\Madison_EditorRecompileModuleRules.PDB' -- 'c:\Users\\Perforce\\\Intermediate\Build\BuildRules\Madison_EditorRecompileModuleRules.pdb: Access is denied.
Info ERROR: UnrealBuildTool encountered an error while compiling source files
You can use the Visual Studio Perforce plugin to do just that for your source file. However, you do have to get you .dll in checkout. About the .pdb like the error shown in your post, those can be removed from Source Control, if you don’t need to debug other people stuff (that is, if you want to debug, you can always re-compile in Debug by yourself, no need to keep the .pdb)
And yes, UE4 now comes into Modules, so you have a bunch of .dll you need to checkout! The way I’m working around this is, I got them all in checkout in a different Changelist, that I always keep on the side. I call it “Engine Stuff”. It’s also where all my source code modifications resides before submitting.
Anyway, once that is done, when you submit the Changelist, check the box that says “Checkout submitted files after submit” so you always keep those ready for a new build.
This will ensure that these files are always writable on clients, so you can happily build your code without having to check out your files all the time.
You can continue to check out & submit the files to the depot as normal. The above change just affects how the Perforce client interacts with your filesystem.
If you are asking of an easy way to know what files to include in a build, we don’t currently supply a way to repackage builds. One useful tip however is to run UBT with -generatemanifest, which will generate an XML file in Engine/Intermediate/Something.xml. The command line would look something like this:
Build.bat UE4Editor Win64 Development -generatemanifest
Note that Built.bat is in Engine/Build/BatchFiles.
That should show you what files are built each time you build the engine. Alternatively I suppose you could ‘reconcile offline work’ in Perforce.
I already have those lines in my Perforce typemap on both client and server, it’s still not letting me write those files without doing a checkout first.