Installation:

Installation of DWT requires a D 1.x compiler, and Tango. Mercurial and DSSS are also highly recommended.

  1. Install D 1.x Compiler
    There are several ways to get the D compiler. Two possible ways are: Hints on installing DMD:
  2. Install Tango
    Instructions for installing Tango are here: http://www.dsource.org/projects/tango/wiki/TopicInstallTango
  3. Install DSSS
    1. Download latest DSSS - http://svn.dsource.org/projects/dsss/downloads/
    2. Unpack DSSS in directory path without spaces
    3. Put dsss/bin in some environment variable to be able to access DSSS from the command line/terminal
    4. Open dsss/etc/rebuild/default with a text editor
    5. Change to one of the following:
      • profile=dmd-win-tango
      • profile=dmd-posix-tango
    6. Change the oneatatime option in the DSSS compiler profile (dmd-win-tango or dmd-posix-tango) to oneatatime=off (twice) (Recommended for faster builds)
  4. Install Mercurial
    For more info see here - http://www.dsource.org/projects/dwt/wiki/AccessMercurialRepo
  5. Install DWT
    1. In the command line/terminal change to the directory you want to download DWT to
    2. Download DWT by running from the command line one of the following commands:
           hg clone http://hg.dsource.org/projects/dwt-linux
           hg clone http://hg.dsource.org/projects/dwt-win
          
    3. (Windows only) Download some additional libraries and put them in dmd/lib - [http://downloads.dsource.org/projects/dwt/dwt-win-importlibs.zip dwt-win-importlibs.zip]
    4. In the command line/terminal, change into the newly created directory dwt-linux or dwt-win
    5. Run "dsss build" to build DWT
    6. Run "dsss install" to install DWT. After the installation process you should be able to build a dwt application with dsss anywhere in your system and you DON'T have to rename anything.
  6. Testing your DWT installation
    1. You can test DWT with the following example:
      module main;
      
      import dwt.widgets.Display;
      import dwt.widgets.Shell;
      
      void main ()
      {
      	Display display = new Display;
      	Shell shell = new Shell(display);
      
      	shell.setText = "Hello DWT World";
      	shell.open;
      
      	while (!shell.isDisposed)
      		if (!display.readAndDispatch)
      			display.sleep;
      
      	display.dispose;
      }
      
    2. Put the above code in a new file "main.d" into another directory
    3. Create a minimal file named "dsss.conf" in the same directory as above
      [main.d]
      
    4. Run "dsss build" in the same directory as above In case you get linker errors verify:
      • on windows, that the location of the import libs is known to dsss also. To be sure you can give that path to dsss with -S"path"
      • that you did "dsss install" after building dwt
    5. Run main