Installing D1 and D2 side by side on linux
Lutger
lutger.blijdestijn at gmail.com
Wed Oct 14 14:49:40 PDT 2009
Justin Johansson wrote:
> I got motivated by Walter putting out latest cuts of D1 and D2 (a D2
> update in less than a week recently!), so ...
>
> Rather than having a single global install of DMD for linux, I'd like to
> have both D1 and D2 installed (i.e. distros unzipped into)
> /opt/dmd1 and /opt/dmd2 respectively
>
> and then be able to envoke rdmd on either version using the full path to
> the executable.
>
> Unfortunately seems like this doesn't work and rdmd can't find dmd in
> either case:
>
> D1
>
> /opt/dmd1/linux/bin/rdmd test.d
> sh: dmd: not found
>
> D2
>
> /opt/dmd2/linux/bin/rdmd test.d
> sh: dmd: not found
> sh: dmd: not found
>
> So what's the best way to do a side-by-side install of D1 and D2 on linux?
>
> As usual, thanks for all kind assistance,
>
> -- Justin Johansson
I'm not sure what the best way is, but this is my setup:
somewhere in ~/ lie all versions of d I have installed:
~/dev/dmd1045
~/dev/dmd2032
~/dev/dmd2034
etc.
Then there is one symlink ~/dev/dmd to one of those paths I want to work. I
have ~/dmd/bin/ on the PATH. Finally there is a little script I can invoke
like this: 'setupD dmd2032' that changes the symlink, possible remove tmp
files used by rdmd etc.
This has worked well for me, I usually just keep the older versions in there
too, sometimes it is useful.
More information about the Digitalmars-d-learn
mailing list