Oh Dear

Adam D. Ruppe destructionator at gmail.com
Sun Jul 12 13:53:24 PDT 2009


On Sun, Jul 12, 2009 at 01:30:26PM -0700, Walter Bright wrote:
> Ary Borenszweig wrote:
> >You took the time to modify it to download both D1 and D2, and also dmd. 
> >:-)
> >
> >Just one thing: when you select both D1 and D2, both directories are 
> >added to the path and when you execute dmd it defaults to the first one 
> >found (D1). How could this be solved?
> 
> I don't know. I also didn't figure out how to set the menu shortcuts 
> properly depending on what was or was not installed. I was hoping you 
> could help!

The Windows SDK uses a little script and an environment variable to pick
your platform. You can do (I forget the actual syntax...):

setenv /x64
make

And it builds you the 64 bit version. Or

setenv /XP

And it sets everything up to target Windows XP.




Perhaps the D installer could set up something similar. It could be very simple:

dversion /d2
dmd

And you get dmd for D2.

Then

dversion /d1
dmd

And you get D1.


Indeed, this could be taken to another level:

dversion /d2  will use the newest version of dmd2 available, but also

dversion /v2.013 will specifically use dmd 2.013.



All dversion does is adjust the PATH to point at the right folder. It
could be a pretty simple script (especially if you limit it to just the /d1
and /d2 switches).





-- 
Adam D. Ruppe
http://arsdnet.net



More information about the Digitalmars-d mailing list