Version 4 (modified by benl, 5 years ago)



Installation can be avoided by always running DDC from its top-level build directory:

$ bin/ddc -make /path/to/the/Main.ds

In this case it will still be able to find its libraries and runtime system.

However, it is possible to install it as a regular application. We don't do this very often, so it's still a manual process.

  1. Copy the compiler binary to your ~/bin directory, where ~/bin is in your $PATH.
    $ mkdir ~/bin
    $ cp $DDC_BUILD/bin/ddc ~/bin/ddc.bin
  1. For Mac OS X only, also copy the runtime library to your ~/lib directory
    $ mkdir ~/lib
    $ cp $DDC_BUILD/runtime/libddc-runtime.dylib ~/lib
  1. Create an alias to give ddc the path to its libraries and (static) runtime.

You'll probably want to add the following commands to your .profile, or similar

alias ddc='~/bin/ddc.bin -basedir $DDC_BUILD'  (for bash)
alias ddc '~/bin/ddc.bin -basedir $DDC_BUILD'  (for c shells)
  1. Compile and run your first program
    $ echo 'main () = println "Hello world"' > Main.ds
    $ ddc -make Main.ds -o hello
    $ ./hello