PageRenderTime 187ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/README.md

http://github.com/txdv/sharpmod
Markdown | 109 lines | 82 code | 27 blank | 0 comment | 0 complexity | ba6aa3fe79944807c0421fd4bae4de39 MD5 | raw file
  1. SharpMod
  2. ========
  3. Description
  4. -----------
  5. SharpMod is a plugin for metamod which by itself is a plugin system for the goldsrc engine
  6. (Half-Life, Counter-Strike classic). SharpMod enables the developer to write plugins for
  7. the goldsrc engine in C# or other languages which can be compiled to CIL (the bytecode for
  8. .NET virtual machines). Right now only plugins written with C# have full support, though
  9. an experimental Ruby branch exists.
  10. Installation
  11. ------------
  12. There are a few installation steps. Lucky for you I have created a nifty Makefile which
  13. does everything automatically, just type *make* into your console in the root directory.
  14. SharpMod needs a some bits and peaces:
  15. * Custom metamod compilation
  16. * The hlsdk in order to compile metamod
  17. * Mono 2.8
  18. * Ruby
  19. I'll provide some general information about these 4 listed elements in the following
  20. paragraph. Make sure you read the the later two.
  21. After compilation is successful, use the following steps to hook SharpMod against your
  22. hlds server:
  23. Use the metamod binary in the directory include/metamod/metamod/opt.linux/metamod_i386.so
  24. in your server, create a soft link ln -s for easier usage. Read the [official metamod
  25. installation guide](http://metamod.org/metamod.html).
  26. In order to use the sharpmod just create a link from <mod dir>/addons/sharpmod to
  27. bin/ (the directory, were all binaries are copied to) and add sharpmod binary to
  28. addons/metamod/plugins.ini. The entry should look like this:
  29. "linux addons/sharpmod/sharpmod_mm_i686.so"
  30. After wards just start the server, you should see a lot of debug messages since it
  31. is in an early development phase.
  32. metamod & hlsdk
  33. ---------------
  34. In order to compile SharpMod, 2 additional packages are required:
  35. [hlsdk](http://metamod.sourceforge.net/files/sdk/) and [metamod](http://metamod.org/).
  36. While hlsdk can be used just as it is, the metamod package has to be modified a little
  37. bit, since metamod checks for invalid pointers from loaded plugins by looking if the
  38. pointer is in the address space of the dynamic library. Since we are using mono,
  39. pointers used by mono and passed to the native code won't be in the dynamic library
  40. memory chunk. The patch is named "metamod-hack-fix.patch" and will fix this behavior
  41. (it's quite a hack, a proper fix would be nice).
  42. The Makefile in the root directory takes care of downloading, patching and compiling
  43. everything, just use *make*.
  44. Mono
  45. ----
  46. Mono 2.8 is needed, versions prior to 2.4.3 have a bug within GetFunctionPointer and not
  47. so long a go I started using C# 4.0 functionality (System.Threading.Tasks) for language
  48. and library features which make development easier.
  49. Information on how to install a parallel mono installation can be found on the [official
  50. mono documentation site](http://www.mono-project.com/Parallel_Mono_Environments).
  51. Ruby
  52. ----
  53. Most of the structs and function calls for the message interaction between the hlds server
  54. and the client is now generated with ruby, so you will need to install ruby along with eruby.
  55. License
  56. -------
  57. This library is available under the [GPL3](http://www.gnu.org/licenses/gpl.html) license.
  58. Authors
  59. -------
  60. * [Andrius Bentkus](mailto: andrius.bentkus@gmail.com)
  61. General Information
  62. ===================
  63. In this section some general information will be provided, a mini wiki in other words.
  64. Directory structure
  65. -------------------
  66. The metamod and hlsdk packages have to be placed in the folder "include/", the folder
  67. structure should look like this:
  68. > include/
  69. > hlsdk/
  70. > singleplayer/
  71. > multiplayer/
  72. > SDK_EULA.txt
  73. > ...
  74. > metamod/
  75. > metamod/
  76. > doc/
  77. > stub_plugin/
  78. > tools/
  79. > trace_plugin/
  80. > wdmisc_plugin/
  81. > README.txt
  82. > ...