Platform for building desktop games with JavaScript.
git clone https://github.com/jnsmalm/gameplay.git
V8 is the JavaScript engine from Google used by Gameplay. The source for V8 needs to be downloaded and compiled before building Gameplay.
- Go to Google's V8 website and follow the instructions to download the source code for V8.
- Switch to git tag 4.5.9 and sync tools
git checkout tags/4.5.9
gclient sync --with_branch_heads --jobs 16
- V8 must be built with c++11 and libc++, to do that you:
- Change the value CLANG_CXX_LANGUAGE_STANDARD to gnu++11 in the build/standalone.gypi
- Add CLANG_CXX_LIBRARY with value libc++ right under CLANG_CXX_LANGUAGE_STANDARD
- Remember to modify it where it says 'clang==1'
- Build V8 using 'make native'.
- Copy or move the V8 folder to gameplay/deps.
- Go to Google's V8 website and follow the instructions to download the source code for V8.
- Switch to git tag 4.5.9 and sync tools
git checkout tags/4.5.9
gclient sync --with_branch_heads --jobs 16
- Follow the instructions for building V8 with Visual Studio, Use Visual Studio 2013 or later (it's doesn't seem to work with Visual Studio Express, instead try Visual Studio Community).
- Before building: Copy the contents in depot_tools/python276_bin (you should have that folder before getting the source for V8) to v8/third_party/python_26.
- Build for release.
- Copy or move the V8 folder to gameplay/deps.
Gameplay uses the CMake build system. Supported is Make for Mac OS X and Visual Studio for Windows. You can probably build it using other tools but those have not been tested.
cd gameplay
mkdir build
cd build
cmake ..
make
Generate Visual Studio solution with:
cd gameplay
md build
cd build
cmake .. -G "Visual Studio 12 2013"
If an error occur saying something like "Cannot find source file: CheckFileOffsetBits.c", try running the cmake command again. Open the created Visual Studio solution and build as usual.