What I do to easily switch between different DMD versions and libraries on Windows

Anders Bergh anders1 at gmail.com
Wed Jun 20 03:45:30 PDT 2007


Since there are now two D versions, I figured some of you might be
interested in the trick I use on Windows to switch between compilers
easily.

I have DMD 1.016 (Phobos), DMD 1.014 (Tango) and DMD 2.000. Switching
between versions is only two clicks away.



Things you will need:

1. Windows 2000 or above.

2. NTFS file system.

3. http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx
This tool lets you create directory symlinks (NTFS junctions).

1. Extract "junction.exe" into your PATH, I simply extracted it into C:\Windows.

2. Extract dmd 1.x into c:\dmd1_phobos.

3. Extract dmd 2.x into c:\dmd2_phobos.

4. Open notepad, copy/paste this into a new file, "dmd1_phobos.bat":

@echo off
rem Deletes the current symlink and replaces it with a new one.
junction -d c:\dmd
junction c:\dmd c:\dmd1_phobos

5. Do the same for your other DMD installations, just replace
"c:\dmd1_phobos" with "c:\dmd2_phobos", etc.


To change between DMD versions, simply double click the corresponding
batch file. The location of the batch files does not matter.

I hope this helps someone out there, it sure did make things easier
for me when playing around with Tango and 2.0 :-)

-- 
Anders



More information about the Digitalmars-d mailing list