Home | Documentation | Atomic Chat | Github

Compiling the editor W7


#1

Hello everyone. This is the 2nd day I spent fighting my windows enviroment to try to compile Atomic with no success.
I will list everything I’ve tried so far, hope you can help me out.

First I installed a clean VS2017 community and added the C/C++ compiler.
Cloned the Atomic repository.
Executed CMake_VS2017.bat which failed with this error:

D:\AtomicTest\At
omicGameEngine\Build\node_modules\jake\lib\api.js:340
throw errObj;
^

Error: CMake process exited with code 1
at api.fail (D:\AtomicTest\AtomicGameEngine\Build\node_modules\jake\lib\api.js:336:18)
at ChildProcess. (D:\AtomicTest\AtomicGameEngine\Build\Scripts\CMakeWindows.js:73
:9)
at emitTwo (events.js:88:13)
at ChildProcess.emit (events.js:173:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:201:12)

If I try to exec Build_AtomicEditor.bat it just fails because it cant find Atomic.sln as expected.

I also tried building the solution using cmake-gui and I got this error while configuring:

CMake Error at CMakeLists.txt:49 (find_package):
By not providing “FindCEF.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “CEF”, but
CMake did not find one.

Could not find a package configuration file provided by “CEF” with any of
the following names:

CEFConfig.cmake
cef-config.cmake

Add the installation prefix of “CEF” to CMAKE_PREFIX_PATH or set "CEF_DIR"
to a directory containing one of the above files. If “CEF” provides a
separate development package or SDK, be sure it has been installed.

Did this along quite a few other attempts with no success. Tomorrow if I can fix this I will try to get it working on my ubuntu VM but I would rather have everything working on windows.

Thank you!


#2

I am guessing cmake isn’t on your path, what happens when you run cmake from the command line? If it isn’t on your path, a VS2017 developer command prompt should work as cmake is now bundled and I believe that version will be on your path in the developer command prompt environment.

There are some Windows build instructions here: https://github.com/AtomicGameEngine/AtomicGameEngine/wiki/Building-Atomic-from-Source#windows

You’ll also want to be sure to clone recursively or have git on your path as the build scripts will clone the submodules automatically if you forget.

If it does turn out to be that cmake isn’t on the path, would be good for the build scripts to check that and report a better error.


#3

I haven’t tried to do it from VS but I’m sure cmake is on the path. I forgot to mention that I’ve also cloned recursively. I tried going into child_process.js to figure out what could it be but the line the error gives is just a exception being raised and there is not much info to follow the stack.

PD: Just tried with VS cmd prompt and got the exact same error.


#4

Try this in a VS2017 command proimpt from the root of the local repo:

git clean -dxf
cmake -G "Visual Studio 15 2017 Win64"

It won’t build anything though may give some insight, you could also try running the following to see if it gives any additional info:

Build_AtomicEditor.bat --trace

#5

cmake -G “Visual Studio 15 2017 Win64”

Generated a solution which I tried to compile using VS2017 but failed after 5 minutes on ALL_BUILD project.

I am now removing everything and making a clean install to see if I can get the problem fixed.


#6

If you solely build the C++ FeatureExamples project in the solution, that should build and run. It is also possible to use Atomic purely with CMake when using C++, there’s an example of that here: https://github.com/rokups/ShaderSketch

Build_AtomicEditor.bat and CMake_VS2017.bat invoke build scripts that do additional work like generating script bindings, etc. The later is for setting up development solutions for working on Atomic itself.

I am wondering if there are some problems detecting the VS2017 environment here: https://github.com/AtomicGameEngine/AtomicGameEngine/blob/64d403a77e282b226ac4d15695c7650d4c6a2413/Build/Scripts/Windows/SetupVSEnvironment.bat#L3

Do you have a cmake.exe at this location? ATOMIC_VS2017PATH should contain the VS2017 install path:.

set ATOMIC_CMAKE="%ATOMIC_VS2017PATH%\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe"

If not, try changing the line to this to use the cmake on your path:

set ATOMIC_CMAKE="cmake.exe"

Build_AtomicEditor.bat should be pretty solid if it can find a working cmake. I am thinking that maybe detecting if there is one on path in addition to the regkey query might be in order. CMake may be an optional install component of VS2017, I thought it was installed with the compiler automatically though


#7

After the clean install I could get Build_AtomicEditor.bat to get through that first error message. After a few minutes building the code with apparently no errors but a few warnings it just stoppped with a NetBuild error message saying it couldn’t build AtomicNet solution.
CMake is installed by default in VS2017. I had to install VS2015 C++ compiler component for CMake to detect a C++ compiler since it wouldn’t work with the 2017 compiler.

My main goal is to learn as much as possible from the source code to be able to actually work on the engine itself but since VS2015 I’ve had so much trouble compiling that I stuck to VS2010 for too long time.
Tomorrow if I have some time I will try to build it on ubuntu. I totally refuse to give up.

Thank you very much for taking the time to help me out.


#8

No problem, it is good to troubleshoot this stuff so others don’t run into the same problems. I am a bit confused on the VS2017 issue, the only thing I can think of is that the scripts are having trouble querying the environment. If you are having problems with VS2017 solutions in general and have an older cmake that is something to look into updating, could also be conflicting cmake between the one on the path and the VS2017 bundled one.

Build_AtomicEditor.bat --nonet will build without the C# support if you don’t have the VS2015 C# tooling installed. Also, if you use the --noclean option it won’t do a full build between invocations. There is a list of build flags here: https://github.com/AtomicGameEngine/AtomicGameEngine/wiki/Building-Atomic-from-Source#atomic-editor-build-flags-advanced


#9

The --nonet flag did it! Editor was built. Still was not very lucky trying to use the engine as library. When I try to compile it gives a type error in ResourceCache.cpp. As a side test tried building Urho3D following the instructions on their wiki and it worked right away for VS2010 so I guess VS2017 is problematic. I am now downloading VS2015.


#10

Finally could get around all the troubles I had to generate the solution for the engine. Basically it all came down to not using VS2017 and downloading VS2015 Express, not community, which should be the same but apparently are not. I also had to copy the VC/x86_amd64 folder in the VS2015 install and rename it to amd64 while also renaming “vcvarsx86_amd64.bat” to “vcvars64.bat”. After that everything worked.

Thank you for all your help, I hope now I can start to hack my way around and try to contribute something :slight_smile: