unity mono 编译(转)

来源:互联网 发布:linux安装vmware 编辑:程序博客网 时间:2024/06/01 21:53

Unity 4.3版本的mono。

mono: https://github.com/Unity-Technologies/mono/tree/unity-4.3

cygwin:  X86 32的,安装的时候要选择autoconf make libtools 

由于cygwin的make在处理windows dos路径有些问题,下载make 替换掉cygwin下的make

ndk-r8:


配置cygwin:

[html] view plaincopy在CODE上查看代码片派生到我的代码片
  1. set WANT_AUTOMAKE=1.11  
  2. $NDK/build/tools/make-standalone-toolchain.sh --platform=android-5 --install-dir=/tmp/my-android-toolchain   

修改mono 下的build_runtime_android.sh:

[html] view plaincopy在CODE上查看代码片派生到我的代码片
  1. #PLATFORM_ROOT=$NDK_ROOT/platforms/$ANDROID_PLATFORM/arch-arm  
  2. #TOOLCHAIN=$NDK_ROOT/toolchains/$GCC_PREFIX$GCC_VERSION/prebuilt/$HOST_ENV  
  3. PLATFORM_ROOT=/tmp/my-android-toolchain/sysroot  
  4. TOOLCHAIN=/tmp/my-android-toolchain  
[html] view plaincopy在CODE上查看代码片派生到我的代码片
  1. #clean_build "$CCFLAGS_ARMv5_CPU" "$LDFLAGS_ARMv5" "$OUTDIR/armv5"  
  2. #clean_build "$CCFLAGS_ARMv6_VFP" "$LDFLAGS_ARMv5" "$OUTDIR/armv6_vfp"  
  3. clean_build "$CCFLAGS_ARMv7_VFP" "$LDFLAGS_ARMv7" "$OUTDIR/armv7a"  

这时运行build_runtime_android.sh

在生成的过程中提示链接krait-signal-handler找不到,在ndk中再到对应的krait-signal-handler 拷贝到 /tmp/my-android-toolchain/arm-linux-androideabi/lib

继续执行mono/mini下的make文件,提示libegl找不到,将mini下的makefile 的top_builddir改成绝对路径(凡是提示xxx找不到多半是路径问题,把相应的make改成绝对路径)

[html] view plaincopy在CODE上查看代码片派生到我的代码片
  1. top_builddir = C:/cygwin$(shell pwd)/../..  

再执行make,会在mono/mini/.libs 生成mono的静态库和动态库


再转两篇mono build的文章

http://www.codeproject.com/Articles/815565/How-to-build-Mono-on-Windows

http://shana.worldofcoding.com/en/mono_cygwin_tutorial.html


转自http://blog.csdn.net/yy405145590/article/details/41205283

0 0