For those who do need the libraries, in the top-level Derelict directory ($DERELICT_HOME) you will find a D module named buildme.d. It can be, and is intended to be, run as a script. Executing this file will create one or more libraries from the Derelict packages. At the end of execution, all of the libraries that were created will be found in the $DERELICT_HOME/lib directory.
bud myapp.d -IDerelictDir/DerelictGL -IDerelictDir/DerelictSDL -IDerelictDir/DerelictUtilWhen using response files, this is a non-issue. However, many people prefer to have all of their D modules in a single import tree. For a long time, Derelict users who wanted such a setup had to copy the Derelict modules to their import tree manually, or use a custom script. As a result, Derelict now includes a very basic install script written in D. Given a root directory, this script will create a subdirectory 'derelict' and copy all derelict modules into that tree. Then you can add all of the to the import path with a single command line switch, '-IRootDir'. The following command line will execute the install script (if you are using GDC, replace 'dmd' with 'gdmd':
dmd -run install.d RootDir'RootDir' is a required argument and should be the complete path to the directory in which you want to install the Derelict modules. Note that this does not copy any Derelict libraries (remember, you do not need to build the Derelict libraries if you use a build tool like Bud or Rebuild to compile your D apps). This simple script is provided as a convenience. While I will certainly respond to bug reports, I make no promises about enhancing its functionality.
dmd -run buildme.d gdmd -run buildme.dThe first is the command line to use with DMD. The second is for GDC. In the rest of this document, 'dmd' will be used for all example command lines. Anytime you see 'dmd', you can replace it with 'gdmd' to use the same command line with GDC.
dmd -run buildme.d debugThe script also accepts 'release' as a command line argument. The build script generates a temporary Bud Response File that is deleted at the end of execution. Sometimes, when debugging problems with the build script, it is necessary to see the contents of this file. You can prevent the script from deleting the file by passing 'nodelbrf' on the command line:
dmd -run buildme.d nodelbrfYou can also pass options to both Bud and the compiler, though not via the command line. This is done through the following three options files:
$(DERELICT_HOME)/buildopts/bud_common.txt $(DERELICT_HOME)/buildopts/bud_release.txt $(DERELICT_HOME)/buildopts/bud_debug.txtOptions in bud_common.txt are used in both Debug and Release builds. The other two are self-explanatory.
The rules for editing these files are the same as those for editing Bud Response Files, but there are some caveats. Because buildme.d automates the build process, some assumptions are made. The first is that the output directory will be the $DERELICT_HOME/lib subdirectory. Adding -TsomeDir to any of the three files will have no effect. Second, the import paths for building each package are set automatically so that you don't need to. Third, the DerelictUtil package and other dependencies are excluded from the compilation automatically via the -X Bud option (except, of course, when DerelictUtil itself is being compiled).
For most users, the default configuration should suffice.
cd $DERELICT_HOME dmd -run buildme.d DerelictAL DerelictUtilThe above will build only the DerelictAL and DerelictUtil libraries.
cd $DERELICT_HOME dmd -run buildme.d cleanlibThis will delete the libraries in $(DERELICT_HOME/lib). Unlike the other command line options, this option must be specified first. Any options following it will be ignored. If it is not first, it will be ignored.