Table of Contents
Installation Guide for Tango used with DMD on Mac OS X
This page details ways of installing Tango for DMD on Mac OS X.
Install Binary Bundle
- Download Tango, the .tar.gz option will suffice
- Extract the package
- If your download is with DMD and you want to install it, back up any previously installed dmd.conf
- If you have Phobos installed, and want to install Tango in the same place, back up object.d
- Copy the folders import and lib from the extracted folder, and bin for the compiler toolchain, to where you want to install
- If you have admin access to your box, installing to /usr/local is recommended
- Make sure your <install path>/bin is part of your PATH and you should be ready to go.
Manual Build and Install
- Download or check out Tango sources.
- Enter the Tango directory where the build files are:
$ cd <tango base>/lib
- At this point you can run install-dmd.sh with various arguments to automate all of the following steps, to see the instructions do
$ ./install-dmd.sh --help
- Run build-dmd.sh to build the core Tango library.
$ ./build-dmd.sh
- Install .a (library) files
$ cp -Rf <tango base>/lib/libtango-base-dmd.a <DMD install prefix>/lib
- Install object.di
$ cp -f <tango base>/object.di <DMD install prefix>/include/d
- Make .d source files accessible by copying the .d source into this path like so:
$ cp -Rf <tango base>/tango <DMD install prefix>/include/d $ cp -Rf <tango base>/std <DMD install prefix>/include/d
- Update your dmd.conf (either alongside your DMD binary, or in /etc)
[Environment] DFLAGS=-I<DMD install prefix>/include/d -defaultlib=tango-base-dmd -debuglib=tango-base-dmd -version=Tango
- You can now build libtango-user-dmd.a, the library with Tango's user API.
./build-tango.sh dmd
- From within <tango-distribution-dir>/lib , install libtango-user-dmd.a to <DMD install prefix>/lib
$ cp -f libtango-user-dmd.a <DMD install prefix>/lib
Add -L-ltango-user-dmd -L-L<DMD install prefix>/lib to your DFLAGS line in dmd.conf. The library path may be omitted if the library is installed to a directory that the linker already checks, for instance /usr/lib.
Without libtango-user-dmd.a, a buildtool like rebuild or build will be required.