Engine Source Installation and Team Deployment Recommendation

We will be using the Engine Source and C++ for our Game project. I have a few questions about the best way to setup our folder structure and installation requirements. My goal is to be able to build the engine and game from a single solution. Then take those binaries and content folders and check them into Perforce. From there, the team would pull the files and essentially be setup with UE4 and the game project. I’ve hit a few snags along the way that I need help with.

-1. There wasn’t a clear recommendation for how the total project files should be arranged except in a few posts here and there. Here’s what I did and I’m hoping you can confirm it’s the recommended setup.

-1.1. I unzipped the engine source zip, plus required zips and optional zips into a folder c:/MyProject/.

-1.2. Then I ran GenerateProjectFiles.bat and compiled the engine.

-1.3. I ran the Development Editor and created a shell project called MyGame and put it c:/MyProject/MyGame/

-1.4. I added a UE4.uprojectdirs text file to c:/MyProject and set its contents to “./”. (It’s actually a backslash, but the AnswerHub eats that character).

-1.5. I re-ran GenerateProjectFiles.bat to add the MyGame to the UE4.sln.

So now I have:

c:/MyProject/Engine/

c:/MyProject/MyGame/

c:/MyProject/Samples/

c:/MyProject/Templates/

c:/MyProject/GenerateProjectFiles.bat

UE4.sln

UE4.uprojectdirs

Is this the best way to set things up?

-2. Given the setup from #1, I noticed c:/MyProject/MyGame/MyGame.uproject was not associated with a program. Double clicking on it brought up the windows association dialog. I set it to c:/MyProject/Engine/Binaries/Win64/UE4Editor.exe. It now launches the editor when I double click on the MyGame.uproject, which is good, but is it supposed to be associated with something better?

-3. I noticed I’m not getting the Launcher app popping up. I would like access to the launcher and I need something to install the pre-requisites, so I looked for a way of installing the launcher only, not the entire engine. I noticed the installer here: c:/MyProject/Engine/Extras/UnrealEngineLauncher/UnrealEngineInstaller.msi, so I ran that. This installed the launcher, but it wasn’t quite right. It said “No Engine Installed”. This is technically correct, since I didn’t install the engine, I built it.

-3.1 Am I supposed to install the entire stock engine as a baseline, even if I’m building my own engine source?

-3.2 Is there a way to get the Launcher to recognize my built engine?

-3.3. As a test, I tried selecting Engine 4.4. in the Library and selected Install. It failed because my c: drive was full. Now every time I launch the Launcher, it says it failed to install. How can I get it to forget my install attempt?

Just bumping my own question. Hopefully Epic or someone else that is deploying to a team can give me some recommendations.

Move your built engine to folder which you set as root when you installed Launcher.
E.g. if you set C:/UE as root when installed Launcher then move your 4.4 engine to C:/UE/4.4, your 4.3 engine to C:/UE/4.3 etc.

By moving it does that fix my #3.2?

Unfortunately, that makes for a complicated deployment to a team. It also breaks its connection with p4. Ideally, the team would be able to get from p4, install some pre-requisites, and go. Also, it would be best if the engine source was coupled with a project. Depending on development timelines, different projects could have different specialized versions of the engine.

There’s a way to couple your engine with project.
First you need to install Launcher form your Extras. No need to download engines.
Second, build your engine.
Third, there’s a file in your engine’s Binaries folder called UnrealVersionSelector-Win64-Shipping
It adds an option to RMB context menu “Switch Unreal Engine Version” of .uproject file to associate your project with source built engine.

PS: I forgot to mention folder structure.

I got my engine src in C:/UE4/Unreal Engine/4.4src. In my case Launcher should be installed to C:/UE4. Now I have:

  • C:/UE4/Unreal Engine/4.4src
  • C:/UE4/Unreal Engine/DirectXRedist
  • C:/UE4/Unreal Engine/Launcher

Otherwise it won’t work.

Which part won’t work? I have things mostly working with my folder structure mentioned in the original post. I just haven’t worked with it for very long to know if I’m missing something I’ll regret later. I’d hate to have to move around 25GB of files because I’m off by one folder.

I certainly hope the location of the engine install isn’t as rigid as you say and it must be in the folder the launcher is installed at. That doesn’t make for a very good source control setup.

I had found UnrealVersionSelector-Win64-Shipping.exe, but it didn’t seem to help much. I lost the context menu entries for “switching engines” when I uninstalled the downloaded version of the 4.4 engine. Now it won’t come back, even after running UnrealVersionSelector-Win64-Shipping.exe. I had to manually set the .uproject file to be opened by my engine as mentioned in #2.

That’s exactly what I’m talking about. When I installed Launcher from source to another folder I also lost context menu option to choose engine version, but when I installed like I mentioned above context menu option was back.

That’s how it looks like now:

13374-version.jpg

And my project solution now contains three filters:

  • Engine
  • Games (where’s my project source is)
  • Programs

I found this AnswerHub topic that didn’t get clearly resolved but was marked as answered: No Windows Explorer Context Menu - Platform & Builds - Unreal Engine Forums

The answer was in there, which was to set the default file association to the UnrealVersionSelector.exe in the Launcher install.

So I installed my Launcher from the installer mentioned in #3 above and installed to “c:/program files/unreal engine”. Then I set my MyGame.uproject default program to “F:/Program Files/Unreal Engine/Launcher/Engine/Binaries/Win64/UnrealVersionSelector.exe”. This brought back the context menus and they operate as expected, in that they launch my engine and my editor, not a downloaded engine.

I just tried deploying my setup to a team member and it failed. It appears that the MyGame.uproject files contain a GUID that is used to look up what engine it is associated with. Each engine must register itself in “HKEY_CURRENT_USER\Software\Epic Games\Unreal Engine\Builds” using this GUID. In order to register your engine, you must run c:/MyProject/Engine\Binaries\Win64\UnrealVersionSelector-Win64-Shipping.exe. The problem is running UnrealVersionSelector-Win64-Shipping.exe creates a new unique GUID. There’s no way someone registering the built engine will create a GUID that matches the MyGame.uproject GUID. That means each person must have a writable MyGame.uproject and manually associate it with the engine.

I really hope someone from Epic can chime in here.

Yet another development. I found this thread: .uproject file's EngineAssociation saves a GUID, which causes problems for teams using UE4 source code - Character & Animation - Unreal Engine Forums. It claims the ue4.uprojectdirs file solves this issue. I had already set that up, but it didn’t appear to help.

Are you supposed to be able to double click on the .uproject file if you have this setup? That part did not work for us.

Seems like this really needs a Documentation page. It’s difficult piecing this all together from many AnswerHub posts.

EPIC, help, please!

Ok, mate, here’s a plan.

  1. Build engine
  2. Register engine
  3. Change Registry parameter name to something like “MyCustom4.4”
  4. Run engine association
  5. PROFIT

Now the only thing your mates will do is just renaming registry parameter after engine registration. You can even write a simple script for it. Then your .uproject file will be like:

{
	"FileVersion": 3,
	"EngineAssociation": "MyCustom4.4",
	"Category": "",
	"Description": "",
	"Modules": [
		{
			"Name": "MyProject",
			"Type": "Runtime",
			"LoadingPhase": "Default"
		}
	]
}

and you won’t need custom uproject file for every developer.

OR more difficult way.

  1. Edit Your UnrealVersionSelector and make it not to generate some random GUID but write your “MyCustom4.4” there instead.
  2. Build your engine
  3. Run UVS.
  4. Run engine association

And that’s it.

What UnrealVersionSelector does?
It checks if this folder to register is already in registered installations list. If not it registers it. If there’s no launcher installed it registers file association and context menu options to UVS.

Yeah, I’m pretty much starting down that plan. In the mean time, I’m just editing the registry manually to get running.

What is odd though is this just doesn’t seem too extensible for team deployment. So I was hoping Epic would have a plan in place as guidance.

I had a slightly different slant on your “more difficult way”. I was thinking the GUID could be read from a config ini file. So, someone setting up a project would just need to fill in the VersionSelectorEngineGUID to a GUID or MyCustom4.4 or whatever. Then UnrealersionSelector would read that config first and use it instead of a random GUID.

Hi ,

I’m sorry that we missed this post initially, you bring up quite a few good questions and I will try to address as many as I can. First, your initial post.

  1. Your initial setup looks fine, though it would be a good idea to reverse 1.3 and 1.4 - create your .uprojectdirs file before creating your project. On a side note, if you create a new folder in the root folder of your Engine installation into which you will create your project(s) (using your path as an example, C:\MyProject\Projects\MyGame and adding the line Projects to your .uprojectdirs file), the Editor will automatically include your game project in the Engine’s solution file (the game project will not have its own solution file) and you will not need to do step 1.5 whenever you create a new game project.
  2. As TimGS mentioned, you need to make sure to run UnrealVersionSelector-Win64-Shipping.exe (located in the ..\Engine\Binaries\Win64\ folder) after you have built the Engine. This registers your Engine with Windows and provides the three custom context menu options whenever you right-click on a .uproject file. If you have manually set the file association for your .uproject files, open the Properties panel for any .uproject file and make sure the “Opens With:” field contains a blue Unreal Engine icon and not a black one. If the icon is black, make sure you have run the UnrealVersionSelector executable I mentioned above and then right-click on the .uproject file and Switch Unreal Engine Version option and select the location where your Engine is located. Check the .uproject properties again to make sure you now have a blue icon. If it is still black, please let us know.
  3. The Launcher will not recognize your Engine that is built from source. It only works with binary versions of the Engine. Having said that, the Launcher is where the Marketplace is located. You will be able to download content from the Marketplace without having a binary version of the Engine installed. However, you will still need to convert the content to your source version of the Engine if you download a sample project, demo, or tutorial. The Launcher will prompt you several times to let you know that you do not have a binary version of the Engine installed, but you can complete the download after acknowledging the warnings. In regards to your 3.3 question, I will try to get some information about how to get around the installation failed message if it is still appearing for you.

To answer some of your additional questions that appeared in the thread…

If you want to be able to have customized versions of the Engine for each game project that your team works on, then you will need to have multiple installations of the Engine. This is not a problem, as long as you have the storage space available (my computer has around 800GB of Engines currently).

You do not need to have the Launcher installed in the same location where you have your Engine built from source code. It does not even need to be on the C: drive. I have the Launcher and all of my Engine installations on my D: drive (D:\UE4Launcher\ and D:\SourceBuilds\). Keep in mind that if you ever do install a binary version of the Engine, it will install in the same location where you have the Launcher installed (the option to specify a different installation location for a binary Engine installation may be available in the future).

Are you still having difficulty with the GUID issue?

I hope this helped with some of the questions that you (and other users, I am sure) had. Please let us know if you need any clarification on anything.

Thanks .

It sounds like my setup is a good way to go, which gives me comfort. I’d hate to have to move around a bunch of folders in p4. Putting this on an official document page I think would help a lot of teams. I think solo devs won’t see any of these complications, but I would think many team devs would have the same questions.

The remaining open issue would be the GUID issue. I’ve gotten around it by having team members edit the registry, but this feels clumsy, even with a script that did the editing. As mentioned in a post above, putting the GUID in a config .ini file seems ideal to me. The team member that sets up the project would generate the GUID, put it in the config .ini and put it in the .uproject file. The missing component is the actual registering. UnrealVersionSelector-Win64-Shipping.exe would need to be updated to use this config .ini GUID instead of an auto generated one.

My questions are answered. Thank you and thanks TimGS!

Hi @timlincoln, thanks for the thorough explanation. Everything works as expected on Windows. However, on Mac I can’t launch the associated source engine by double clicking the .uproject file. Does the .uproject file need to be regenerated? Perhaps the EngineAssociation GUID is stale since the source rebuild?

Is it possible to force the package GUID? I’m currently having an issue where a Mac client pacakaged from the same project source and engine source (built from the same git SHA) can’t connect to a Linux server. Win64 clients can connect. The errors are detailed here: Package mismatch: Mac client cannot connect to server - Programming & Scripting - Unreal Engine Forums

I’m curious if I can extract the package GUID from the Win64 client and manually apply it to the Mac package. If that is possible, can you explain the steps?

Thanks!

Hi piinecone,

I have taken a look at the other post you have mentioned, and we will investigate what is happening there.