Skip to content

Latest commit

 

History

History
 
 
- About
These sources are cloned from http://android.googlesource.com/ master branch at Jan 29 2012.
Please be ware that JavaScriptCore is open source under LGPL license!

- How to build
-- For IOS
Just click 'JavaScriptCore-X\jsc-android\jni\Source\JavaScriptCore\JavaScriptCore.xcodeproj' to compile.

-- For Android
cd /your_path/android-ndk-r6
./ndk_build -C /your_path2/JavaScriptCore-X/jsc-android/

-- For Win32
1. Install 'Safari' browser for win32(download website: http://www.apple.com/safari/download/). This step is necessary, otherwise, jsc application cannot be launched.

2. Set environment variable

name: WEBKITLIBRARIESDIR
value: F:\Project\JavaScriptCore-X\jsc-android\jni\WebKitLibraries\win   (Please replace 'F:\Project' to your project's root path)

name: WEBKITOUTPUTDIR
value: F:\Project\JavaScriptCore-X\jsc-android\jni\WebKitBuild   (Please replace 'F:\Project' to your project's root path)

name: SystemDrive
value: E:   (Please replace 'E:' to the root path of cygwin)

3. Logout or reboot your computer, you can not start vs2008 if you don't do this.

4. Open 'JavaScriptCore-X\jsc-android\jni\Source\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore.sln' by VS2008 and build all projects.



- Authors
JianHua Chen
Walzer Wang

markshiz (https://github.com/markshiz/corefoundation-lite-android)
  author of android port of corefoundation


- Todo
(1) Change the application's name from HelloJNI to HelloJSC
(2) Add other JSC test cases
(3) I'm not sure if we can leave the generated .lut.h files in runtime folder instead of generating them before compilation.
(2) I hacked jsc-android/jni/Source/JavaScriptCore/ctuils/Android.mk line 68 ~ line 82. If we build it on windows cygwin, only uio.c is involved. But on mac, WINDOWS_HOST_ONLY equal to 0 and mspace.c is involved, which leads to an error about bionic dependency. I hacked here to avoid mspace.c. Any how, libjs.so seems working well currently.
(3) gcc would raise an error if jsc-android/jni/Application.mk hasn't defined APP_OPTIM := release. I found the solution from here http://groups.google.com/group/android-ndk/browse_thread/thread/4dc0addd20cf23d0?tvc=2