How can I get the source-built editor to launch an existing project on OsX?

Hi,

On OsX I have:

  • Successfully setup tested and run an example c++ project.
  • Successfully built unreal engine from source and run the project browser in debug mode from Xcode

However, I have not been able to use the source-built editor to open and edit an existing c++ project.

  • When I launch the source-built
    editor, it displays the project
    browser.
  • When I select the existing
    project, it closes, relaunches and
    fails with the message:

“The game module ‘InsectOS’ could not be found. Please ensure that this module exists and that it is compiled.”

How can I get the source-built editor to launch an existing project?

So I tried doing what is shown in this Q&A:

I run from the source built editor with the commandline arguments set, and I get this in the log:

Found module file …/…/…/…/…/Documents/Unreal Projects/InsectOS/Binaries/Mac/UE4Editor-InsectOS.dylib (version 4 0 0 2034640), but it was incompatible with the current engine version (4 0 0 0). This is likely a stale module that must be recompiled.

I’ve checked that I’m building the 4.0 git branch which is allegedly 4.0.2 … so yeah. what am I missing?

I don’t think that the 4.0 branch is “allegedly 4.0.2.” Have you tried building from the source on the releases page (https://github.com/EpicGames/UnrealEngine/releases) instead?

Well, git branch 4.0 is actually 4.0.2 at the revision I’m working, which is dd06b2 and is tagged as 4.0.2-release.
https://github.com/EpicGames/UnrealEngine/tags

juan@Max:~/Dev/UnrealEngine$ git branch -v -a
* 4.0                   dd065b2 Engine source for 4.0.2 (4.0 branch up to CL 2034640)
  remotes/origin/4.0    dd065b2 Engine source for 4.0.2 (4.0 branch up to CL 2034640)
  remotes/origin/HEAD   -> origin/4.0
  remotes/origin/master db494a6 Engine source (Main branch up to CL 2037954)

So I looked at Engine/Source/Runtime/Launch/Resources/Version.h where version numbers are defined, and set ENGINE_VERSION to 2034640 and got it working.

I guess there is some logic to this: I am building a custom version of the engine so projects built for other engines shouldn’t work with the git stock version.

So a quick way to get things working is to edit Engine/Source/Runtime/Launch/Resources/Version.h and set ENGINE_VERSION to whatever the current branch is…

I would guess this isn’t very clean since you will be modifying the engine altogether… It makes sense to build the engine, launch a browser and create the new project from the custom built engine, with your own ENGINE_VERSION numbering there.

4.1 will include some tools to make this easier, but for now you can try this:

  • select your .uproject file in Finder, right click on it and select Get Info
  • in “Open with” area of the info window select the editor you built as an app to open this file (do not use “Change All” button, though)
  • right click on .uproject file again and select Generate Xcode Files (may be in Services submenu)

This should update your Xcode project to make it compatible with your build from GitHub. When you open it and build Editor target, you should be all set.