[[TOC()]] = 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 == 1. [wiki:DmdDownloads#MacOSX Download] Tango, the .tar.gz option will suffice 2. Extract the package 3. If your download is with DMD and you want to install it, back up any previously installed dmd.conf 4. If you have Phobos installed, and want to install Tango in the same place, back up object.d 5. 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 6. Make sure your /bin is part of your PATH and you should be ready to go. == Manual Build and Install == 1. [wiki:SourceDownloads Download or check out] Tango sources. 2. Enter the Tango directory where the build files are: {{{ $ cd /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 }}} 3. Run build-dmd.sh to build the core Tango library. {{{ $ ./build-dmd.sh }}} 4. Install .a (library) files {{{ $ cp -Rf /lib/libtango-base-dmd.a /lib }}} 5. Install object.di {{{ $ cp -f /object.di /include/d }}} 6. Make .d source files accessible by copying the .d source into this path like so: {{{ $ cp -Rf /tango /include/d $ cp -Rf /std /include/d }}} 7. Update your dmd.conf (either alongside your DMD binary, or in /etc) {{{ [Environment] DFLAGS=-I/include/d -defaultlib=tango-base-dmd -debuglib=tango-base-dmd -version=Tango }}} 8. You can now build libtango-user-dmd.a, the library with Tango's user API. {{{ ./build-tango.sh dmd }}} 9. From within {{{ /lib }}}, install libtango-user-dmd.a to {{{/lib}}} {{{ $ cp -f libtango-user-dmd.a /lib }}} Add {{{ -L-ltango-user-dmd -L-L/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.