Build SpiderMonkey on Windows
SpiderMonkey is Mozilla's JavaScript engine written in C/C++. It is used in various Mozilla products, including Firefox, and is available under MPL/GPL/LGPL tri-license.
https://developer.mozilla.org/en/Building_only_SpiderMonkey
Requirement:
Visual Studio 2008
- Download SpiderMonkey v1.8.5 after and unzip it https://developer.mozilla.org/En/SpiderMonkey/Getting_SpiderMonkey_source_code#Getting_the_latest_SpiderMonkey_source_code
- Download and install MozillaBuild.exe https://wiki.mozilla.org/MozillaBuild
- Download NSPR and unzip http://www.mozilla.org/projects/nspr/
- Open Visual Studio 2008 Command Line
- Enter MozillaBuild folder, type start-msvc9.bat
- Compile NSPR
cd c:/nspr-4.8.9
mkdir Debug
cd Debug
../mozilla/nsprpub/configure --enable-win32-target=WIN95 ( WIN95 means Win32 not Windows 95)
make - Compile SpiderMonkey
cd /c/js-1.8.5/js/src
autoconf-2.13
mkdir Release
cd Release
../configure --enable-win32-target=WIN95 (*)
cd ..
mkdir Debug
cd Debug
../configure --enable-win32-target=WIN95 --enable-debug --disable-optimize (*)
make - Test js
At Release or Debug folder, type
./js ../Y.js
5! is 120
(*)1.8.5 default OS version is Win7. If you use WinXP, you should set the version to --with-windows-version=600
1.8.7 just support later than Win7 version...
http://wenku.baidu.com/view/3a0980dbce2f0066f533220b.html
Comments
Post a Comment