Mono-3.8.0-IntegrationGuide.txt 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 vs140 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. - 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.
  18. - Add mono-2.0.dll to (BansheeRootDir)/bin/(Platform)/(Configuration)
  19. - Add mono-2.0.lib to (BansheeRootDir)/Dependencies/lib/(Platform)/(Configuration)
  20. -----------------------------Compiling libraries & compiler-------------------------------------
  21. - Install Mono 3.2.3 (This is the latest binary release for Windows, you can use newer if there is one).
  22. - Add the "(InstallDir)\Mono-3.2.3\bin" to your PATH environment variable.
  23. - Install Cygwin 32-bit version using these command line parameters:
  24. setup-x86.exe -qnNdO -R "C:\cygwin" -s "http://cygwin.mirror.constant.com"
  25. -l "C:\cygwin\var\cache\setup" -P autoconf -P automake -P bison -P gcc-core
  26. -P gcc-g++ -P mingw-runtime -P mingw-binutils -P mingw-gcc-core -P mingw-gcc-g++
  27. -P mingw-pthreads -P mingw-w32api -P libtool -P make -P python -P gettext-devel
  28. -P gettext -P intltool -P libiconv -P pkg-config -P git -P wget -P curl
  29. - Configure Cygwin mounting options by editing /etc/fstab and add "noacl" option like so:
  30. - "none /cygdrive cygdrive binary,noacl,posix=0,user 0 0"
  31. - Retrieve Mono 3.8.0 source tar ball (NOT from github, opposite from above)
  32. - Github one has a broken Cygwin build. (You can try to fix it, likely only a small modification. I didn't bother.)
  33. - Go to your mono 3.8 source directory in Cygwin and enter these commands in order:
  34. - "./autogen.sh --prefix="(OutputDir)" --with-preview=yes"" (Replace (OutputDir) with a folder where you want to output the binaries, e.g. "C:\MonoInstall")
  35. - "./configure --host=i686-pc-mingw32"
  36. - "make"
  37. - "make install"
  38. - Your built mono should now be output to (OutputDir) folder. (If it's not in that folder
  39. then check your Cygwin install folder under /usr/local)
  40. - Copy contents of (OutputDir)/include/mono/mono-2.0/mono to (BansheeRootDir)/Dependencies/Include/Mono
  41. - Make sure to modify "object.h" as you did above when building the binaries
  42. - Copy folder (OutputDir)/etc to (BansheeRootDir)/bin/Mono
  43. - 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
  44. - 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".
  45. - Copy the compiler (mcs.exe) from (OutputDir)/lib/mono/4.5 to (BansheeRootDir)/bin/Mono/compiler