Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Installation

Compilers

MiniD is, right now, only compatible with D1. MiniD will probably not support D2 until D2 gets out of alpha at least, and even then, it's heavily dependent upon Tango being ported to D2.

MiniD requires DMD 1.034 or newer, or an equivalent compiler. Unfortunately this means that GDC is out. GDC 0.24 is based on DMD 1.020, and GDC trunk is only 1.030. LDC, however, does compile MiniD (usually).

Mac users! I need your help. As of version 1.040, DMD now works on OSX 10.5. I have no idea if MiniD compiles under it and I own neither an Apple nor a hackintosh-compatible machine. Please to be the compiling and the testing.

Tango

The MiniD library is based on Tango, the alternative standard library for D. For those of you using Phobos, you're just out of luck.

MiniD currently depends on the Tango SVN trunk.

Build Tools

MiniD includes build scripts for both Build and DSSS. It's highly recommended that you start using a build tool if you're not using one already. Makefiles are so 1980s.

Build works better on Windows than it does on Linux, but DSSS works fine most places. Furthermore, MiniD is registered as a net-installable package in DSSS. That means that if you use DSSS, you can install MiniD by just using "dsss net install minid". Of course, your DSSS has to be associated with DMD or LDC, since GDC is a no-go.

How to install it

I'm not going to tell you how to install DSSS, a D compiler, and Tango here. I just won't. I will, however, assume that you have:

  • A compiler
    • DMD 1.034 or newer
    • or
    • LDC
  • Tango SVN trunk installed
  • A build tool (optional, but highly recommended)
    • DSSS 0.75 or newer (eh, maybe not 0.78, I hear it's really slow)
    • or
    • Build

DSSS (Windows and Linux)

All you have to do is "dsss net install minid". This will check out the latest revision of the repository, compile the library, and install the headers. Then just use DSSS or Rebuild to build your programs that use MiniD.

If MiniD is updated (the code in the repo changes) - all you have to do is "dsss net uninstall minid" and then "dsss net install minid". This will get the latest version of the repo.

Sandbox Script (Linux)

If you're on Linux, you can use Sean Kerr's (feti's) Sandbox script. This is an easy-to-use single-file installer. It creates a folder into which it downloads and installs DMD, Tango, DSSS, and your choice of several libraries including MiniD. There's a default profile for MiniD which will download and install the proper versions of DMD and Tango.

This script is great for new users since it makes installation of everything you need extremely fast and easy. You can have a fully-functional D development environment in about two minutes. It's also called a "sandbox" since everything is self-contained in one directory, and if you don't want it anymore, you can just delete the directory. You can even have multiple sandboxes with different compiler/Tango versions and libraries.

You can grab the latest version of the Sandbox script here.

Note: the script still uses Tango 4313 for the MiniD profile; just override it and use "latest" (without quotes of course) instead.

Note for 64-bit Linux users: I have seen this script (and MiniD) work on 64-bit linux, as long as you have all the appropriate 32-bit compatibility packages. For example, on Debian-based systems (including Ubuntu), you'll need the "libc6-dev-i386" and "lib32stdc++6" packages installed.

Manually

All you'll need extra in this case is Subversion. On Linux, it's installable through your package manager, and on Windows, TortoiseSVN is awesome.

First, you need to get the MiniD source. You do this by checking out the Subversion repository here at dsource. From the commandline, you do:

svn co http://svn.dsource.org/projects/minid/trunk <DEST_DIR>

Where <DEST_DIR> is the directory where you want it to check out. If you're using TortoiseSVN, you can type this on the commandline, or you can right-click in a folder where you want <DEST_DIR> to be created, choose "SVN Checkout", enter the Subversion address given above and the name of the destination directory, and start it.

Once you've checked out the repo, change into <DEST_DIR> and you'll see several folders - minid, docs, tests, for example - and some other files. Now we get into the more interesting bits.

DSSS Users

If you're using DSSS, it's really easy to build and install MiniD. All you do is

dsss build
dsss install

That's it. "dsss build" will build the MiniD library, MDCL, minidc, and "mdtest" which is just a stupid test program that you probably don't need. Then "dsss install" will copy the library, executables, and headers into DSSS's dir, making it possible to use MiniD through DSSS.

Build Users

You can build the library with "build @lib". This produces a single file, "minid.lib." MDCL, minidc, and test all build similarly: "build @mdcl", "build @minidc", and "build @test".

Building the library is optional, really. That's the nice thing about autobuilding tools. If you build the library, put it in your library path. If you don't, oh well. Build will just compile and link in any parts of MiniD that you use from your program automatically.

Oh, the headers. You need to either put <DEST_DIR> on your import path (since then "minid.whatever" will look in "<DEST_DIR>\minid\whatever.d"), or you can copy "<DEST_DIR>\minid`" to another place that's on your import path already.

Luddites

If, for some reason, you don't use a build tool.. why? But anyway, building the library is more or less a task of building all the D files in <DEST_DIR>\minid and linking them into a single lib. Building MDCL is just compiling mdcl.d and linking against that lib. Same goes for minidc. test is a little different since it's supposed to use a debug version of the library. Of course, then you put the lib in your libs dir and make sure <DEST_DIR> or a copy of <DEST_DIR>\minid is on your import path.