Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

VS2017 build uses VS CMake explicitly, should be configurable and have error message for missing cmake #1655

Open
Paruun opened this issue Sep 18, 2017 · 8 comments

Comments

@Paruun
Copy link

Paruun commented Sep 18, 2017

As the title suggests I'm trying to build the engine from source. I'm getting an error telling me that the Atomic.sln is missing. It's not in the source and I can't see anywhere where it would be created. Any help appreciated.

C:\atomic>node ./Build/Scripts/Bootstrap.js buildeditor --vs2017 --opengl --with-android
Building Atomic Editor, this process will take a few minutes
OpenGL build selected.
rm -rf C:\atomic/Artifacts/AtomicEditor/
rm -rf C:\atomic/Artifacts/AtomicNET/
rm -rf C:\atomic/Artifacts/Build/Windows/
rm -rf C:\atomic/Artifacts/Build/Source/Generated/


** Visual Studio 2017 Developer Command Prompt v15.3.3
** Copyright (c) 2017 Microsoft Corporation


The system cannot find the path specified.
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist.
Switch: Atomic.sln
C:\atomic\Build\node_modules\jake\lib\api.js:340
throw errObj;
^

Error: Process exited with error.
at api.fail (C:\atomic\Build\node_modules\jake\lib\api.js:336:18)
at Exec. (C:\atomic\Build\node_modules\jake\lib\utils\index.js:124:9)
at emitTwo (events.js:106:13)
at Exec.emit (events.js:191:7)
at ChildProcess. (C:\atomic\Build\node_modules\jake\lib\utils\index.js:227:20)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12)

@JoshEngebretson
Copy link
Contributor

Use Atomic_BuildEditor.bat as per the instructions:
https://github.com/AtomicGameEngine/AtomicGameEngine/wiki/Building-Atomic-from-Source#windows

You can see the contents of the batch file here, which uses a local node + node_modules... you are using system node.

https://github.com/AtomicGameEngine/AtomicGameEngine/blob/master/Build_AtomicEditor.bat

@Paruun
Copy link
Author

Paruun commented Sep 18, 2017

I used a different node as the batch file didn't work, petty much the same error. Here is the output of the batch file:

C:\atomic>build_atomiceditor.bat --vs2017 --opengl --with-android

Building Atomic Editor, this process will take a few minutes
OpenGL build selected.
rm -rf C:\atomic/Artifacts/AtomicEditor/
rm -rf C:\atomic/Artifacts/AtomicNET/
rm -rf C:\atomic/Artifacts/Build/Windows/
rm -rf C:\atomic/Artifacts/Build/Source/Generated/


** Visual Studio 2017 Developer Command Prompt v15.3.3
** Copyright (c) 2017 Microsoft Corporation


The system cannot find the path specified.
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist.
Switch: Atomic.sln
C:\atomic\Build\node_modules\jake\lib\api.js:340
throw errObj;
^

Error: Process exited with error.
at api.fail (C:\atomic\Build\node_modules\jake\lib\api.js:336:18)
at null. (C:\atomic\Build\node_modules\jake\lib\utils\index.js:124:9)
at emitTwo (events.js:88:13)
at emit (events.js:173:7)
at ChildProcess. (C:\atomic\Build\node_modules\jake\lib\utils\index.js:227:20)
at emitTwo (events.js:88:13)
at ChildProcess.emit (events.js:173:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:201:12)

@JoshEngebretson
Copy link
Contributor

JoshEngebretson commented Sep 18, 2017

I am guessing cmake isn't on your path:

The system cannot find the path specified.

From the instructions: Make sure to have Visual Studio 2015 or 2017 installed with the C++ compiler toolchain and have CMake on your PATH

@Paruun
Copy link
Author

Paruun commented Sep 18, 2017

It's in my path, I can access it from the source directory:

C:\atomic>cmake
Usage

cmake [options]
cmake [options]

Specify a source directory to (re-)generate a build system for it in the
current working directory. Specify an existing build directory to
re-generate its build system.

Run 'cmake --help' for more information.

C:\atomic>

@JoshEngebretson
Copy link
Contributor

On VS2017, the build uses the CMake installed by VS2017 explicitly:

https://github.com/AtomicGameEngine/AtomicGameEngine/blob/master/Build/Scripts/Windows/SetupVSEnvironment.bat#L12

This should probably be configurable and/or check for one on path to override it. There should also be a better error message.

@JoshEngebretson JoshEngebretson changed the title Building from source in windows - missing atomic.sln VS2017 build uses Visual Studio installed CMake explicitly, should be configurable and have better error message Sep 18, 2017
@JoshEngebretson JoshEngebretson changed the title VS2017 build uses Visual Studio installed CMake explicitly, should be configurable and have better error message VS2017 build uses VS CMake explicitly, should be configurable and have error message for missing cmake Sep 18, 2017
@Paruun
Copy link
Author

Paruun commented Sep 18, 2017

Ok so reading through the JS files I came up with a 'quick fix':

  1. Run the following to generate the .sln file
    cmake /C /Build/Scripts/Windows/GenerateVSSolution.bat VS2017 ./ ./ -DATOMIC_DEV_BUILD=1 -DATOMIC_OPENGL=ON -DATOMIC_D3D11=OFF
  2. Open the solution file in Visual Studio and build the solution.

That gave me a working EXE

@JoshEngebretson
Copy link
Contributor

JoshEngebretson commented Sep 18, 2017

You could also change this line to just cmake

https://github.com/AtomicGameEngine/AtomicGameEngine/blob/master/Build/Scripts/Windows/SetupVSEnvironment.bat#L12

This should use the cmake on the path, make the editor batch file work as expected, and also make the cmake bat file work with all the supported command line flags: https://github.com/AtomicGameEngine/AtomicGameEngine/wiki/How-to-set-up-a-Debug-Development-Build

@jellythedoge
Copy link

--vs2017 worked for me!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants