= Welcome to Derelict = Derelict is a collection of D bindings to C shared (dynamic) libraries which are useful for multimedia applications, with a heavy bias toward game development-related libraries. == Features == Derelict supports some useful features for project development, including: * Cross-Platform Consistency - No matter which platform you release on, Derelict loads shared libraries manually at runtime and throws an exception when the library, or any symbol in the library, fails to load. This gives you complete control over how to handle the case of a missing shared library. You can fall back to a different code path, give your users a helpful error message, or take any action you want. Regardless, you have consistent behavior across multiple platforms. * Selective Symbol Loading - This feature allows you to override exceptions thrown by Derelict when a shared library symbol fails to load. It is a goal of the project that each Derelict package be updated from time-to-time to load the latest version of each library. Often, new library versions include new functions. If a user has an older version of the library installed, one that is missing the new function symbols, Derelict will notice and throw an exception. By making use of Selective Symbol Loading, you can override this behavior and allow the older library version to load successfully. == Getting Started == To start using Derelict, you will need the latest [http://www.dsource.org/projects/derelict/changeset/head/trunk?old_path=%2F&format=zip Derelict source] and either [http://www.dsource.org/projects/build/wiki Derek Parnell's Bud], [http://www.dsource.org/projects/dsss/wiki/Rebuild Gregor Richards' Rebuild] or [http://www.dsource.org/projects/dsss/ DSSS]. If you are using Derelict with Tango, Bud will likely have problems, so you should prefer Rebuild for such applications. Derelict applications compiled on Linux have a dependency on libdl, so you will need to tell your build tool to link with that library when compiling. === Obtaining and Learning Derelict === Manually Download Derelict: [http://www.dsource.org/projects/derelict/changeset/head/trunk?old_path=%2F&format=zip here] Automatically Download Derelict: You can use [http://www.dsource.org/projects/dsss DSSS] to automatically download and compile the Derelict packages. Once DSSS is installed, use the command 'dsss net install derelict' to pull down all Derelict packages. You can also use the command 'dsss net install packagename', where package name is a Derelict package name such as DerelictGL, to pull down a specific package and its dependencies. See the DSSS documentation for more information on how to use it. '''This is the recommended way for newcomers to use Derelict'''. Derelict Forums: [http://www.dsource.org/forums/viewforum.php?f=19 here] Documentation: [http://svn.dsource.org/projects/derelict/trunk/docs/index.html here] Tutorials: [http://dmedia.dprogramming.com/?n=Main.Tutorials DMedia] has a few tutorials on using DerelictSDL and DerelictGL. === Building Derelict === For the large majority of applications, '''you do not need to build the Derelict libraries'''. Bud, Rebuild and DSSS can each compile your applications without the need to link with any Derelict libraries at all. As long as the Derelict modules are on your import path, both Bud and Rebuild will automatically compile those modules that you require and will link the resulting object files into your final executable. One drawback to this approach is that the final size of the executable will be bigger than if you were to link to the libraries. Also, users of [http://www.codeblocks.org/ Code::Blocks], or other IDES that compile and link D applications in a two-step process, will need to use the build script to create the Derelict libraries. The easiest way to build the Derelict libraries is to use [http://www.dsource.org/projects/dsss DSSS]. If you aren't using it to download and manage the libraries for you, you can perform the following steps to manually build the libraries. {{{ cd DerelictDir dsss build }}} This should result in all Derelict libraries being compiled and copied do Derelict/lib. If you aren't using DSSS to manage your installed libraries, this is the recommended way to build the libraries. If you aren't using DSSS, you can use the old build script. Unfortunately, it can only be executed as a script in a Phobos environment. If you are building the libraries in a Tango environment, you will first need to use Rebuild (or DSSS) to compile the script into an executable. You can then execute the resulting binary and it will do the right thing. However, you will still need to have Bud installed on your path, as the script used Bud internally. To build Derelict in debug mode in a Phobos Environment: {{{ cd DerelictDir dmd -run buildme.d debug }}} To build in Release mode: {{{ cd DerelictDir dmd -run buildme.d }}} In a Tango environment, first compile the build script into an executable using Rebuild (Bud will fail on Windows): {{{ cd DerelictDir rebuild -clean buildme.d }}} You can then run the executable to build the libraries, using the same command line options. On Windows: {{{ buildme debug }}} On Linux: {{{ ./buildme debug }}} Detailed build instructions are available in [http://svn.dsource.org/projects/derelict/trunk/docs/index.html the documentation]. Follow the link "Building Derelict" in the left side bar, or view [http://svn.dsource.org/projects/derelict/trunk/docs/build.html build.html] directly. == Libraries Supported By Derelict == Here is a list of the libraries for which Derelict currently provides bindings: * Open Dynamics Engine (ODE) * OpenAL * OpenGL * OpenGL Utility Library (GLU) * DevIL, ILU, and ILUT * SDL * SDL_image * SDL_mixer * SDL_net * SDL_ttf * !FreeType * libogg * libvorbis Although not official Derelict packages, members of the community have produced the following bindings (these packages may or may not be compilable with the latest DMD or GDC): * [http://www.famolsen.dk/d/derelict/bassmod.zip BassMod], [http://www.yage3d.net/host/derelict.bassmod.zip Mirror] * [http://www.baysmith.com/d/baysmith.glut.zip GLUT], [http://www.yage3d.net/host/derelict.glut.zip Mirror] * [http://www.uni-ulm.de/~s_mpiepk/d/DerelictPhysFs.zip PhysFS], [http://www.yage3d.net/host/derelict.physfs.zip Mirror] * [http://expandingbrain.com/files/derelict_lua.zip Lua], [http://www.yage3d.net/host/derelict.lua.zip Mirror] * [http://odefu.googlecode.com/svn/trunk/DerelictGLC/ QuesoGLC] * [http://code.google.com/p/odefu/source/browse/trunk/DerelictGLFW/ GLFW] * [http://www.extrawurst.org/downs/cg2_0.zip CG] (for OpenGL, not DirectX) * [https://server1.noeding.net/d/horde3d-D_1.0.0_Beta1.zip Horde3D], [http://code.google.com/p/odefu/source/browse/trunk/DerelictHorde3D/ Other] * [http://soulbreakers.com/usr/darkman/d/derelict/derelictalut.tar.gz ALUT] * [http://soulbreakers.com/usr/darkman/d/derelict/derelictglfw.tar.gz GLFW] == Need More Help? == See the Derelict [http://svn.dsource.org/projects/derelict/trunk/docs/index.html documentation] for specific details on a particular package. If you are having problems installing or using Derelict, please visit the [http://www.dsource.org/forums/viewforum.php?f=19 forums]. == Projects that use Derelict == * [http://www.dsource.org/projects/arclib ArcLib] * [http://atomorun2008.whosme.de/ Atomorun2008] * [http://www.dsource.org/projects/blaze Blaze] * [http://distanthumans.info/programming/D/bosconian/bosconian.php Bosskoneun] * [http://www.team0xf.com/ Deadlock] * [http://www.dsource.org/projects/defend/ Defend] * [http://code.google.com/p/gjkd/ gjkd] * [http://www.dsource.org/projects/guisterax guisterax] * [http://www.dsource.org/projects/luigi Luigi] * [http://www.inventivedingo.com/mayhemig Mayhem Intergalactic] * [http://www.dsource.org/projects/qonkd QonkD] * [http://www.dsource.org/projects/seamzgood SeamzGood] * [http://www.yage3d.net Yage]