his Tutorial is to provide understanding in Building Google v8 to function within Visual Studio 2010. There is documentation for building V8 located @ https://developers.google.com/v8/build be warned! Although it seems straight foward to follow, their way of wording seems to throw a few curve balls, and the linking of files within Visual Studio is not detailed. You are more than welcome to a shot at building through Googles instructions before resorting to cheating. However, I wont blame you should you choose to cheat. I have provided screenshots to demonstrate the steps that I have performed in order to build v8 for Visual studios. Coding and linking libraries for V8 will be in the following tutorial.
*Screenshots may appear small, click to enhance the image to full view. When entering the commands ignore the >> << please.
Step 1: We need to obtain the program "mysysGit." Google will suggest Git, however the versions available seem to have a problem with using the svn command. The older version seems to work fine but rather than search through versions for a working program Google Wiki lists another type of Git to use which works perfectly and is much easier to follow. Here is the link for the self-contained installer mysysGit. Select your location for installing.
Step 2: After Installing mysysGit, you can locate the programming by enter the programs file location and open or create a short cut if you like >> mysysgit/mysis.bat. A command prompt will open up similar to the image below. Here you will need to clone the repository for the Google V8 files. (This is their wording, I find it easier to say copy the V8 files located on their server onto your harddrive. Thanks Google!) The command you will enter in the prompt to obtain the files is >> git clone git://github.com/v8/v8.git v8 && cd v8 << The screenshot below demonstrates the process.
Step 3: After you install the comman prompt should update to the root of the folder for V8. This step is optional and should be done when an update release to the V8 repository created. The command to update is >> git pull --rebase origin master >> this needs to be entered from the root of the folder (meaning the base of the folder that contains all the files for V8). The screenshot below states the files are up to date.
***Important*** Take note when this update is performed it is neccessary to repeat the process for building V8 solution in Visual Studio. All but installing python, gyp, and cygwin.
Step 4: Next step is install GYP. Enter the command >> svn co http://gyp.googlecode.com/svn/trunk build/gyp << from the root of the V8 folder. You should see a bunch output resembling the screenshot below.
Step 5: Python is a required install to continue with building V8. Remember to install from the command prompt using mysysGit The command to obtain is >> svn co http://src.chromium.org/svn/trunk/tools/third_party/python_26@89111 third_party/python_26 << Google specifies this version for use, other sites have noted different versions following problems with building V8.
Step 6: Google Wiki specifies not to have cygwin installed other than chromiums provided cygwin. The command to begin downloading cygwin is >> svn co http://src.chromium.org/svn/trunk/deps/third_party/cygwin@66844 third_party/cygwin <<.
Personal Note: I ran these commands from the root of my V8 file location to keep all the programs within the same folder. Throughout googles documentation it suggests moving .exe's into your path (Meaning root of folder, took some time for this one to click!) But by installing from the root of the folder I did not have to move anything around.
Step 7: We're nearing the end!! This step can be done two ways using either python or cygwin however, google states cygwin throws out a few errors and say to igonre it. (That's sooo comforting right?) So I follow through with Python. The next command can cause problems, the comman we enter is >> python build\gyp_v8 <<.
***Notice the screenshot below*** It has a few places I have tried to run the following command. On my first successful attempt I had no problem entering the command from the root of the folder. After I had uninstalled everything I repeated the entire process to properly document. However, this time I was unable to just enter the command from the root of V8. So I tried changing directories and it found the file. If you encounter a similar error try this approach.
Reviewing Step 7: The screenshot below is displaying the folder where build files were generated. After Step 7 is performed all these items should be located within the build folder in V8 as shown below. The files that were undetectably <-(yea, i'll know if you're reading this) marked with black bars are files that were already located within build before performing Step 7.
***I cannot emphasize how much you need to press the green arrow! Somehow this didn't click for me....for a while too! And I was trying to write code for V8 unable to locate any libraries to link! PRESS THE GREEN BUTTON MAN....
This completes the tutorial for successfully "building" Google V8 and not "coding" for Microsoft Visual Studio 2010.