码迷,mamicode.com
首页 > Web开发 > 详细

JSBinding / Plugins & Build Mozjswrap Library

时间:2016-07-06 23:07:03      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:

There are 2 libraries in Plugins:
  • mozjswrap. This is JSBinding library, it links C# and SpiderMonkey together and adds some supports specially for Unity.
 
For mozjs-31, if you need to rebuild it, go to url above to get more information, or go to Mozilla website, or just email me: answerwinner@gmail.com.
 
For mozjswrap, JSBinding already contains libraries for all supported platforms, so normally you don‘t need to rebuild this library. 
Steps are written here in case you need them.
 
for Android (use NDK)
  • 1. rename the folder to jni, after rename, 
jni/
    mozjswrap.cpp
    mozjswrap.h
    Android.mk
  • 2. inside the folder jni/, execute command
        sh gen-android.sh
  • 3. output: ../libs/armeabi-v7a/libmozjswrap.so
 
for Windows, Mac, iOS (use gyp, python, VisualStudio, XCode)
  • 1. Download google gyp. Put the gyp folder here. Like this:
mozjswrap.h
mozjswrap.cpp
gyp/
   gyp_main.py
   LICENSE
 
  • 2. install python 2.7.x. (Mine is 2.7.6)
  • 3. For iOS: open moz.gyp, change js_debug to false. (line 9)
  • 4. build!
Windows: double click gen-msvs2012.bat      output: ./build/Release/bin/mozjswrap.dll
iOS:     bash gen-ios.sh                               output: ./build/Release-iphoneos/libmozjswrap.a
Mac:     bash gen-mac.sh                             output: ./build/Default/mozjswrap.bundle
 
 

JSBinding / Plugins & Build Mozjswrap Library

标签:

原文地址:http://www.cnblogs.com/answerwinner/p/5648183.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!