[Crossfire-wiki] [Crossfire DokuWiki] page changed: server_plugin
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Sat Mar 17 10:28:00 CDT 2007
A page in your DokuWiki was added or changed. Here are the details:
Date : 2007/03/17 10:27
User : ryo
Edit Summary: step by step instructions
@@ -163,4 +163,19 @@
A plugin should never change directly a value in a Crossfire object (player structure, ...), but use provided wrapping functions. Ideally, a plugin should not access directly that structure's memory to read values, either.
The simplest way is to look at the template plugin, available in[[http://crossfire.svn.sourceforge.net/viewvc/crossfire/server/trunk/plugins/template/|plugins/template directory of the server sources]]
FIXME {expand}
+
+ Here are step by step instructions to create a basic plugin. Plugin name will be assumed to be ''cftest''. Paths are relative to server root.
+ * create your plugin directory ''cftest'', in ''plugins''
+ * copy ''plugins/template/plugin_template.c'' to ''plugins/template/cftest.c''
+ * copy ''plugins/template/include/plugin_template.h'' to ''plugins/cftest/include/cftest.h''
+ * modify ''plugins/cftest/cftest.c'' and ''plugins/cftest/include/cftest.h'' to correct the file names in the includes and such. You may also want to change the plugin's name
+ * copy ''plugins/template/Makefile.am'' to ''plugins/cftest/Makefile.am''
+ * edit this file, to change all occurrences of ''plugin_template'' to ''cftest'' (that fixes paths and a few macros)
+ * edit ''configure.ac''
+ * find the line ''AC_OUTPUT([Makefile''
+ * somewhere in between other lines, add ''plugins/cftest/Makefile''
+ * run ''autoconf && automake && configure && make && make install''
+ * your plugin should be installed and ready to run
+
+ Now you need to write your actual plugin logic.
IP-Address : 82.236.87.204
Old Revision: http://wiki.metalforge.net/doku.php/server_plugin?rev=1173294964
New Revision: http://wiki.metalforge.net/doku.php/server_plugin
--
This mail was generated by DokuWiki at
http://wiki.metalforge.net/
More information about the crossfire-wiki
mailing list