Mono-3.8.0-IntegrationGuide.txt 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ---------------------------------Compiling runtime-------------------------------------
  2. - Retrieve Mono 3.8.0 source from GitHub (NOT the tar ball)
  3. - Tar ball has a broken Visual Studio build. (You can try to fix it, likely only a small modification. I didn't bother.)
  4. - Open in VS2012 as is, or open in later VS and upgrade all projects to latest toolkit (v120 and v140 tested and working)
  5. - Add "mono/utils/mono-conc-hashtable.c" and "mono/utils/mono-conc-hashtable.c" to libmonoutils project
  6. - For x64 release version make sure to disable "omit stack frames" optimization
  7. - Move & modify:
  8. MonoClass* mono_class_bind_generic_parameters (MonoClass *klass, int type_argc, MonoType **types, gboolean is_dynamic) MONO_INTERNAL;
  9. from object-internals.h
  10. to:
  11. MONO_API MonoClass* mono_class_bind_generic_parameters (MonoClass *klass, int type_argc, MonoType **types, mono_bool is_dynamic);
  12. in object.h
  13. In reflection.c change:
  14. MonoClass* mono_class_bind_generic_parameters (MonoClass *klass, int type_argc, MonoType **types, gboolean is_dynamic)
  15. to:
  16. MonoClass* mono_class_bind_generic_parameters (MonoClass *klass, int type_argc, MonoType **types, mono_bool is_dynamic)
  17. In mini-amd64.h:
  18. Find where definitions of MONO_ARCH_NOMAP32BIT are for various platforms, and below them add:
  19. #ifdef HOST_WIN32
  20. #define MONO_ARCH_NOMAP32BIT
  21. #endif
  22. - Compile mono project with desired configuration (debug/release, 32/64 bit, SGen builds were not tested). You will receive mono-2.0.dll and mono-2.0.lib as output.
  23. - Add mono-2.0.dll to (BansheeRootDir)/bin/(Platform)/(Configuration)
  24. - Add mono-2.0.lib to (BansheeRootDir)/Dependencies/lib/(Platform)/(Configuration)
  25. -----------------------------Compiling libraries & compiler-------------------------------------
  26. - Install Mono 3.2.3 (This is the latest binary release for Windows, you can use newer if there is one).
  27. - Add the "(InstallDir)\Mono-3.2.3\bin" to your PATH environment variable.
  28. - Install Cygwin 32-bit version using these command line parameters:
  29. setup-x86.exe -qnNdO -R "C:\cygwin" -s "http://cygwin.mirror.constant.com"
  30. -l "C:\cygwin\var\cache\setup" -P autoconf -P automake -P bison -P gcc-core
  31. -P gcc-g++ -P mingw-runtime -P mingw-binutils -P mingw-gcc-core -P mingw-gcc-g++
  32. -P mingw-pthreads -P mingw-w32api -P libtool -P make -P python -P gettext-devel
  33. -P gettext -P intltool -P libiconv -P pkg-config -P git -P wget -P curl
  34. - Configure Cygwin mounting options by editing /etc/fstab and add "noacl" option like so:
  35. - "none /cygdrive cygdrive binary,noacl,posix=0,user 0 0"
  36. - Retrieve Mono 3.8.0 source tar ball (NOT from github, opposite from above)
  37. - Github one has a broken Cygwin build. (You can try to fix it, likely only a small modification. I didn't bother.)
  38. - Go to your mono 3.8 source directory in Cygwin and enter these commands in order:
  39. - "./autogen.sh --prefix="(OutputDir)" --with-preview=yes"" (Replace (OutputDir) with a folder where you want to output the binaries, e.g. "C:\MonoInstall")
  40. - "./configure --host=i686-pc-mingw32"
  41. - "make"
  42. - "make install"
  43. - Your built mono should now be output to (OutputDir) folder. (If it's not in that folder
  44. then check your Cygwin install folder under /usr/local)
  45. - Copy contents of (OutputDir)/include/mono/mono-2.0/mono to (BansheeRootDir)/Dependencies/Include/Mono
  46. - Make sure to modify "object.h" as you did above when building the binaries
  47. - Copy folder (OutputDir)/etc to (BansheeRootDir)/bin/Mono
  48. - Copy assembly folders (OutputDir)/lib/mono/4.0 and (OutputDir)/lib/mono/4.5 to (BansheeRootDir)/bin/Mono/lib/mono/4.0 and (BansheeRootDir)/bin/Mono/lib/mono/4.5, respectively
  49. - If you wish, you can clean up the assemblies within those folders are many might not be used. The minimum needed are "mscorlib.dll", "System.dll" and "System.Core.dll".
  50. - Copy the compiler (mcs.exe) from (OutputDir)/lib/mono/4.5 to (BansheeRootDir)/bin/Mono/compiler