å¨æ¿ã§ãã§ãã windows VS2010 㧠V8 engine ããã«ãã
google chrome ã«ãæè¼ããã¦ãã V8 engine ã VS2010 (VC++ 2010 / visual studio 2010) ã§ãã«ããããã¨ããã話ã§ãã
ç°å¢æ§ç¯ ãã®1 svn ãå°å ¥ã
svn å
¥ãã¾ãã
windowsã¦ã¼ã¶ãªããtortoisesvn(ã¨ã¼ãã ããã¶ããã¬)ããªã¹ã¹ã¡ã§ããé
ããã©ã
ããããè½ã¨ãã¾ãã
http://tortoisesvn.net/downloads.html
ã¤ã³ã¹ãã¼ã«å¾ã« PC ã®åèµ·åããããã®ã§ã注æãã¦ãã ããã
ç°å¢æ§ç¯ ãã®2 python ãå°å ¥ã
pythonå
¥ãã¾ãã
python ã£ã¦ver2ç³»ã¨ver3ç³»ã§éããããã®ã§ãã¨ãããã2ç³»ãå
¥ãã¾ãã
#ãããããã 3ç³»ã§ããããããããããã
http://www.python.jp/Zope/download/pythoncore
http://www.python.org/ftp/python/2.7.1/python-2.7.1.msi
ã¤ã³ã¹ãã¼ã«ãããããã¹ãéãã¾ãã
ãã¹ãéãã®ã¯ãçµæ§å¤§å¤ã§ãã
ã¾ãã以ä¸ã®å ´æã«é å¼µã£ã¦ç§»åãã¾ãã
ã³ã³ããã¼ã«ããã«âã·ã¹ãã ã¨ã»ãã¥ãªãã£âã·ã¹ãã âã·ã¹ãã ã®è©³ç´°è¨å®âç°å¢å¤æ°
ãããããPath ã¨ãæ¸ãã¦ããé
ç®ãé¸æãã¦ã ç·¨éãã¯ãªãã¯ãã¾ãã
å
¥åãã¥ãããã¤ã¢ãã°ãéãã®ã§å¤æ°å¤ã£ã¦ãããã¤ã®æå¾ã« ;pathonãã¤ã³ã¹ãã¼ã«ãããã¹ãæ¸ãã¾ãã
ç§ã¯ãC:\Program Files (x86)\python2.7 ã«ã¤ã³ã¹ãã¼ã«ããã®ã§ã
;C:\Program Files (x86)\python2.7
ã¨ãæ«å°¾ã«å
¥åãã¾ããã
å
¥åãããã OK ãã¿ã³ãããã£ãæå®ã£ã¦ã ã¦ã£ã³ãã¦ãå
¨é¨éãã¾ãã
ã§ããã¹ãéãããã cmd ãéãã¦ç¢ºèªãã¾ãã
windowsãã¿ã³ãã¯ãªãã¯ãã¦ãcmd ã¨å ¥åãã ã³ãã³ãããã³ãããç«ã¡ä¸ãã¾ãã
é»ãç»é¢ãåºã¦ãããã python --version ã¨å ¥åãã¦ã¿ã¾ãããã
python --version
ãã¾ã ver 2.7.1 ãªã©ã¨ãã¼ã¸ã§ã³ã表示ããããæåã§ãã
âãããªãµãã«ã¨ã©ã¼ã表示ããããããã¹ããã¾ãéã£ã¦ãã¾ãããã¾ãã¯ãã¤ã³ã¹ãã¼ã«ã«å¤±æãã¦ãã¾ãã
C:\Users\rti>python 'python' ã¯ãå é¨ã³ãã³ãã¾ãã¯å¤é¨ã³ãã³ãã æä½å¯è½ãªããã°ã©ã ã¾ãã¯ããã ãã¡ã¤ã«ã¨ãã¦èªèããã¦ãã¾ããã
ç°å¢æ§ç¯ ä½è«
æ¬å®¶ã®ãã«ãæ¹æ³ã§ã¯ã SCons ãå¿
è¦ã¨æ¸ããã¦ãã¾ããããªãã¦ãåãã¿ããã§ãã
å
¥ããã人ã¯ãhttp://www.scons.org/ ããå
¥ãã¦ãã ããã
ããããã¨ããã¹ãéãã¨æ¬å®¶ã®ããã¥ã¡ã³ãã«ã¯æ¸ããã¦ãã¾ããã
V8 ã®ã½ã¼ã¹ãã¦ã³ãã¼ã
svn ãå©ç¨ãã¦ã½ã¼ã¹ããã¦ã³ãã¼ããã¾ãã
é©å½ãªå ´æã«é©å½ãªãã©ã«ããä½ãã¾ãã(ãã¹ã¯ãããã®ããã«æ¥æ¬èªãå
¥ããã©ã«ããããã¨ãã¡ã)
ãã©ã«ãã®ååã¯ãv8 ã¨ãã¾ãã
v8 ãã©ã«ããéãã¦ãé©å½ãªå ´æã§å³ã¯ãªãã¯ãã¾ãã
ããããã¨ã¡ãã¥ã¼ãéã㦠SVN Checkout... ã¨ããé
ç®ãããã®ã§ããããé¸æãã¾ãã
ããã¨ããã¤ã¢ãã°ãéãã®ã§ã URL of repository ã£ã¦ããé ç®ã«ä»¥ä¸ã®å 容ãå ¥ãã¾ãã
http://v8.googlecode.com/svn/trunk/
ãã¨ã¯ OK ãã¿ã³ãæ¼ãã¨ãã½ã¼ã¹ã³ã¼ãã®ãã¦ã³ãã¼ããå§ã¾ãã¾ãã
V8 ãã«ã㸠ã¹ããã1
ãã¦ããã«ããã¦ã¿ã¾ãããã
ãã¦ã³ãã¼ãã㦠v8 ã¨ã³ã¸ã³ã®ã½ã¼ã¹ã¼ã³ã¼ãã®ãv8\tools\visual_studio ã¨ãããã©ã«ãã«ç§»åãã¦ã¿ã¾ãã
ãããããv8.sln ã¨ãããã¡ã¤ã«ãããã®ã§ããããããã«ã¯ãªãã¯ã§éãã¾ãã
VS2010 ãèµ·åãã¦ãå¤æããã¨ãè¨ã£ã¦ããã®ã§ãå®äºãã¯ãªãã¯ãã¦å¤æãã¾ãã
ãã¦ãVS2010 ãèµ·åãã¾ããã
ã¾ãã¯ãä½ãèããã« F7 ãæ¼ãã¦ã¿ã¾ãã
ããããã¨ãã³ã³ãã¤ã«ãã¯ãã¾ãããã°ããå¾
ã£ã¦ããã¨ãã¨ã©ã¼ã表示ããã¾ãã
1>2010/12/06 0:03:45 ã«ãã«ããéå§ãã¾ããã 1>InitializeBuildStatus: 1> "C:\Users\rti\Desktop\v8\tools\visual_studio\Debug\obj\v8_base\v8_base.unsuccessfulbuild" ã®ã¿ãã ã¿ã¹ã¯ãå®è¡ãã¦ãã¾ãã 1>ClCompile: 1> profile-generator.cc 1>..\..\src\profile-generator.cc(936): error C2220: è¦åãã¨ã©ã¼ã¨ãã¦æ±ãã¾ããã'object' ãã¡ã¤ã«ã¯çæããã¾ããã 1>..\..\src\profile-generator.cc(936): warning C4819: ãã¡ã¤ã«ã¯ãç¾å¨ã®ã³ã¼ã ãã¼ã¸ (932) ã§è¡¨ç¤ºã§ããªãæåãå«ãã§ãã¾ãããã¼ã¿ã®æ失ãé²ãããã«ããã¡ã¤ã«ã Unicode å½¢å¼ã§ä¿åãã¦ãã ããã
ãããããããªãè¦åã§ããã
é©å½ãªã¨ãã£ã¿ã§ã v8\src\profile-generator.cc ãéãã¦ã Unicode ã§ä¿åãã¦ããã¦ãã ããã
ã¾ãã¯ãè¦åãã¨ã©ã¼ã¨ããªãã¨ãã¦ãåé¿ãããã¨ãã§ãã¾ãã(ããã¾ãæ¨å¥¨ããã¾ãã)
ä»åã¯ãµã¯ã©ã¨ãã£ã¿ã§ v8\src\profile-generator.cc ãéãã Unicode ã§ä¿åãã¾ããã
V8 ãã«ã㸠ã¹ããã2
ã¹ããã1ã®ä¿®æ£ãããããã¾ã F7 ãæ¼ãã¦ã³ã³ãã¤ã«ãã¾ãã
1>------ ãã«ãéå§: ããã¸ã§ã¯ã: v8_base, æ§æ: Debug Win32 ------ 1>2010/12/06 0:07:19 ã«ãã«ããéå§ãã¾ããã 1>InitializeBuildStatus: 1> "C:\Users\rti\Desktop\v8\tools\visual_studio\Debug\obj\v8_base\v8_base.unsuccessfulbuild" ã®ã¿ãã ã¿ã¹ã¯ãå®è¡ãã¦ãã¾ãã 1>ClCompile: 1> profile-generator.cc 1>MakeDirsForLib: 1> ãã£ã¬ã¯ã㪠"C:\Users\rti\Desktop\v8\tools\visual_studio\Debug\lib" ãä½æãã¦ãã¾ãã 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1151,5): warning MSB8012: TargetPath(C:\Users\rti\Desktop\v8\tools\visual_studio\Debug\v8_base.lib) ã Library ã® OutputFile ããããã£å¤ (C:\Users\rti\Desktop\v8\tools\visual_studio\Debug\lib\v8_base.lib) ã¨ä¸è´ãã¾ããããã®ãããããã¸ã§ã¯ããæ£å¸¸ã«ãã«ããããªãå¯è½æ§ãããã¾ãããã®åé¡ã解決ããã«ã¯ã$(OutDir)ã$(TargetName)ãããã³ $(TargetExt) ã®åããããã£å¤ãã%(Lib.OutputFile) ã§æå®ããã¦ããå¤ã¨ä¸è´ãããã¨ã確èªãã¦ãã ããã
ã¾ãã訳ã®å¤ãããªãã¨ã©ã¼ã§ããã
VS2010 ã§ã¯ã以ä¸ã®ããã«è¨å®ãç´ããªãã¨ãã¡ãããã§ãã
åè: http://www.firefly-vj.net/imagery/2010/05/25/visual-studio-2010-%E3%81%A8-windows-sdk-v7-1-%E3%81%A7-baseclasses-%E3%81%AE%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%AB%E3%82%92%E3%81%99%E3%82%8B/
$(OutDir)lib\$(ProjectName).lib â $(OutDir)$(TargetFileName)
ã§ããããããã«ããã«ã¯ãGUIããããã¨å¤§å¤ãªã®ã§ãã¡ã¤ã«ãç´æ¥æ¸ãæãã¾ãã
以ä¸ã®ãã¡ã¤ã«ãéãã¾ãã
\v8\tools\visual_studio\common.props
<Lib> <OutputFile>$(OutDir)lib\$(ProjectName).lib</OutputFile> </Lib> â <Lib> <OutputFile>$(OutDir)$(TargetFileName)</OutputFile> </Lib>
æ¸ãæããããããä¸åº¦ F7 ã§ãã«ããã¦ã¿ã¾ãããã
ãããªè¦åãã§ã¾ãããã¨ããããåãããæ°ã«ããªã!!
1>regexp-macro-assembler-irregexp.obj : warning LNK4221: ãã®ãªãã¸ã§ã¯ã ãã¡ã¤ã«ã¯ã以åã«æªå®ç¾©ã§ãã£ããããªã㯠ã·ã³ãã«ãå®ç¾©ãã¦ããªãããããã®ã©ã¤ãã©ãªã使ç¨ãããªã³ã¯æä½ã§ã¯ä½¿ç¨ããã¾ãã 1> v8_base.vcxproj -> C:\Users\rti\Desktop\v8\tools\visual_studio\Debug\v8_base.lib
V8 ãã«ã㸠ã¹ããã3
ãããã¸ãã§ãpythonããã¼ãã£ã¦ã¨ã©ã¼ãã§ãã人ã¯ã人ã®è©±ãã¡ããã¨èããªã人ã§ãã
python å
¥ãã¦ãã ãã¼ãã
#ã¢ã¤ãã¯è©±ãèããªããããªã
2>CustomBuild: 2> Processing js files... 2> 'python.exe' ã¯ãå é¨ã³ãã³ãã¾ãã¯å¤é¨ã³ãã³ãã 2> æä½å¯è½ãªããã°ã©ã ã¾ãã¯ããã ãã¡ã¤ã«ã¨ãã¦èªèããã¦ãã¾ããã 2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" ã¯ã³ã¼ã 1 ãä¼´ã£ã¦çµäºãã¾ããã
pythonã®ã¨ã©ã¼ã¯åºã¦ããªããã©ãâã®ã¨ã©ã¼ãã§ã¡ãã£ãã¼ã£ã¦äººã¯ããã¾ã§ã¯æ£ããåºæ¥ã¦ãã¾ãã
5>2010/12/06 0:31:28 ã«ãã«ããéå§ãã¾ããã 5>InitializeBuildStatus: 5> "C:\Users\rti\Desktop\v8\tools\visual_studio\Debug\obj\v8_snapshot\v8_snapshot.unsuccessfulbuild" ã®ã¿ãã ã¿ã¹ã¯ãå®è¡ãã¦ãã¾ãã 5>ClCompile: 5> natives-empty.cc 5>c1xx : fatal error C1083: ã½ã¼ã¹ ãã¡ã¤ã«ãéãã¾ããã'C:\Users\rti\Desktop\v8\tools\visual_studio\Debug\obj\v8_snapshot\\v8\DerivedSources\natives-empty.cc': No such file or directory 5> snapshot.cc 5>c1xx : fatal error C1083: ã½ã¼ã¹ ãã¡ã¤ã«ãéãã¾ããã'C:\Users\rti\Desktop\v8\tools\visual_studio\Debug\obj\v8_snapshot\\v8_snapshot_cc\DerivedSources\snapshot.cc': No such file or directory 5> ã³ã¼ããçæä¸...
ããã¯ã VS2010 ãã(ï¼)ãã¹ã®ãã§ãã¯ãå³ãããªã£ãããã«çºçãã¦ãã¾ãã
å
·ä½çã«ã¯ã c:\\windows\ ã®ããã«ã \ ãäºã¤éãªã£ã¦ãããã¹ãã¨ã©ã¼ã¨ãã¦å¼¾ãããã§ããã¢ãã§ããã
ä»æ¹ãªãã®ã§ããã¡ã¤ã«ãä¿®æ£ãã¾ãã
v8_snapshot.vcproj 㨠v8_snapshot_x64.vcproj 㨠v8_snapshot.vcxproj 㨠v8_snapshot.vcxproj.filtersã®4ã¤ãä¿®æ£ãã¾ãã
//v8_snapshot.vcproj RelativePath="$(IntDir)\..\v8\DerivedSources\natives-empty.cc" â RelativePath="$(IntDir)..\v8\DerivedSources\natives-empty.cc" //v8_snapshot_x64.vcproj RelativePath="$(IntDir)\..\v8_snapshot_cc\DerivedSources\snapshot.cc" â RelativePath="$(IntDir)..\v8_snapshot_cc\DerivedSources\snapshot.cc" //v8_snapshot.vcxproj <ItemGroup> <ClCompile Include="$(IntDir)\v8\DerivedSources\natives-empty.cc"> <Filter>generated files</Filter> </ClCompile> <ClCompile Include="$(IntDir)\v8_snapshot_cc\DerivedSources\snapshot.cc"> <Filter>generated files</Filter> </ClCompile> </ItemGroup> â <ItemGroup> <ClCompile Include="$(IntDir)..\v8\DerivedSources\natives-empty.cc"> <Filter>generated files</Filter> </ClCompile> <ClCompile Include="$(IntDir)..\v8_snapshot_cc\DerivedSources\snapshot.cc"> <Filter>generated files</Filter> </ClCompile> </ItemGroup> //v8_snapshot.vcxproj.filters <ItemGroup> <ClCompile Include="$(IntDir)\v8\DerivedSources\natives-empty.cc"> <Filter>generated files</Filter> </ClCompile> <ClCompile Include="$(IntDir)\v8_snapshot_cc\DerivedSources\snapshot.cc"> <Filter>generated files</Filter> </ClCompile> </ItemGroup> â <ItemGroup> <ClCompile Include="$(IntDir)..\v8\DerivedSources\natives-empty.cc"> <Filter>generated files</Filter> </ClCompile> <ClCompile Include="$(IntDir)..\v8_snapshot_cc\DerivedSources\snapshot.cc"> <Filter>generated files</Filter> </ClCompile> </ItemGroup>
æ°ãã¨ããªããã¦ãããä¸åº¦ F7 ã§ãã«ããã¦ã¿ã¾ãã
4>ãã«ãã«æåãã¾ããã 4> 4>çµéæé 00:00:02.85 ========== ãã«ã: 6 æ£å¸¸çµäºã0 失æã3 æ´æ°ä¸è¦ã0 ã¹ããã ==========
ãã£ãï¼ä»åº¦ã¯æåãã¾ããã
V8 ãã«ãçµäº
ä½ããããã¤ããªã¯ã以ä¸ã®ãã£ã¬ã¯ããªã«å
¥ã£ã¦ãã¾ãã
v8\tools\visual_studio\Debug
v8\tools\visual_studio\Debug\d8.exe ãèµ·åããã¨ã
対話åã® javascript ã³ã³ã½ã¼ã«ãç«ã¡ä¸ããã¾ãã
ã¨ããããã¯ããã¾ã§ã
ç§ãã¡ã¯ V8 engine ã VS2010 ã§ãã«ããããã¨ãã§ãã¾ããã
ãç²ããã¾ã§ããã