Thread overview | ||||||
---|---|---|---|---|---|---|
|
October 14, 2009 Installing D1 and D2 side by side on linux | ||||
---|---|---|---|---|
| ||||
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 |
October 14, 2009 Re: Installing D1 and D2 side by side on linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Justin Johansson | 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.
|
November 06, 2009 Re: Installing D1 and D2 side by side on linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Justin Johansson | Justin Johansson <no@spam.com> 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 do the same as Lutger. only difference: mine is @ /usr/local/lib/d/ symlink @ /usr/local/lib/d/dmd -> /usr/local/lib/d/dmd.2.035 symlink @ /usr/local/bin/dmd -> /usr/local/lib/d/dmd/bin/dmd etc... /usr/local/lib/d/dmd/dmd.2.035 /usr/local/lib/d/dmd/dmd.1.050 etc... you could make a wrapper script I personally don't use rdmd |
November 06, 2009 Re: Installing D1 and D2 side by side on linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Justin Johansson | I added "export PATH=$PATH:/path/to/dmd/linux/bin" into ~/.bash_profile |
Copyright © 1999-2021 by the D Language Foundation