I'm making a game engine for school, and I want to use Google's V8 to allow for JavaScript scripting in-engine. The engine is written using Visual Studio 2013, and as the final game must not exceed 50MB, I want to keep the V8 filesize impact as small as possible.
Looking around the Internet for how to do stuff with V8, I came across a series of tutorials on V8, which comes with a precompiled .lib file for V8. However, it is four years old. I'm assuming that building a more recent version on my own would improve performance and add features, so I spent all of yesterday struggling with the V8 build process, and eventually figured out how to compile V8 for Visual Studio:
- Install Google's "depot tools"
- Run
fetch v8
This gets me everything I need to generate the V8 Visual Studio solution, and when I compile it, it works, and generates .lib and .dll files. However, when I try to create a test solution and link these libraries to it, it's incredibly confusing.
The build process generates the following LIB files:
- cctest.lib
- gmock.lib
- gtest.lib
- icui18n.lib
- icuuc.lib
- mksnapshot.lib
- unittest.lib
- v8.lib
- v8_base.lib
- v8_libbase.lib
- v8_libplatform.lib
- v8_nosnapshot.lib
- v8_snapshot.lib
And the following DLLs:
- icudt.dll
- icui18n.dll
- icuuc.dll
- v8.dll
At some point yesterday, I included many of the libs (I think it was v8, v8_base, and v8_snapshot) and copied over all of the DLLs to the output directory of my project, and it eventually worked. However, as I said above, I need the filesize impact of V8 to be as small as possible. I don't need i18n support, so is there a way to compile without it? Like I said above, I have an old version of the V8 .lib, which doesn't need a DLL to run, and it compiles and works fine... but am I missing out on newer features and improvements, as it's four years old? And what do all of these .libs mean, anyways? I can't find any documentation on which ones do what or anything like that.
So yeah, I guess if anyone could provide instructions or point me toward any documentation that would help, that would be great. I spent nearly all day yesterday trying to solve this problem.
make x64.release i18nsupport=off
– Reptile