Writing a Player driver

From The Player Project

Jump to: navigation, search
m
 
Line 3: Line 3:
The are two distinct type of drivers in Player:
The are two distinct type of drivers in Player:
-
*'''Static''' drivers have their code in the main Player distribution, and are statically linked into the server. Generally speaking, such drivers will be added by the lead developers.
+
*'''Static''' drivers have their code in the main Player distribution, and are statically linked into the server. Generally speaking, such drivers will <span class="plainlinks">[http://erinazar.org/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">erin azar</span>] be added by the lead developers.
*'''Plugin''' drivers are shared objects that are loaded at runtime (like loadable modules in the Linux kernel). They are the recommended method for all new, experimental or third party drivers.
*'''Plugin''' drivers are shared objects that are loaded at runtime (like loadable modules in the Linux kernel). They are the recommended method for all new, experimental or third party drivers.
Line 188: Line 188:
</pre>
</pre>
-
The build directory should now contain exampledriver.so built from the C++ source. Note that if your plugin driver file is in a separate directory than your Player configuration file, you may have to edit the config file to reflect the path to the plugin.  If you would like to customize the build scripts for your driver,  
+
The build directory should now contain exampledriver.so built from the C++ source. Note that if your plugin driver file is in a separate directory than your Player configuration file, you may have to edit the config file to reflect the path to the plugin.  The above example assumes you're using the CMakeLists.txt from the example driver directory.  If you would like to customize the build scripts for your driver, you may want to reference [[Compiling Player 3 clients and plugins]].
CMake is the preferred method for building Player plugins, but plugin drivers are also easy to build manually from the command line. To skip the CMake steps and manually build a shared object, try:
CMake is the preferred method for building Player plugins, but plugin drivers are also easy to build manually from the command line. To skip the CMake steps and manually build a shared object, try:

Latest revision as of 05:41, 21 February 2012

Personal tools