www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - D1/D2 co-install?

reply BCS <none anon.com> writes:
Does anyone have a good solution to installing both D1 and D2 on the same 
system?
May 17 2009
next sibling parent reply Robert Clipsham <robert octarineparrot.com> writes:
BCS wrote:
 Does anyone have a good solution to installing both D1 and D2 on the 
 same system?
Possible solutions: * Rename the D2 dmd binary to dmd2 and make sure it uses a different config file for each to use the right libs. * Install them in different directories and use a script to update your $PATH depending on if you want to use D1 or D2 * Create a script that uses a different version of dmd depending on what parameters you pass to it (eg dmd -1 or dmd -2). * The simplest solution would probably be something like the following (on non-windows OSes): alias dmd='/path/to/dmd1/binary/here' alias dmd2='/path/to/dmd2/binary/here' This will allow you to use dmd to compile D1 and dmd2 for D2.
May 17 2009
parent BCS <none anon.com> writes:
Hello Robert,

 BCS wrote:
 
 Does anyone have a good solution to installing both D1 and D2 on the
 same system?
 
Possible solutions: * Rename the D2 dmd binary to dmd2
That's what I was thinking...
 and make sure it uses a different
 config file for each to use the right libs.
but IIRC the last time I tried that it didn't work to well but I seem to recall something being done about that. What is the sugested way to make this bit work?
May 17 2009
prev sibling next sibling parent reply Georg Wrede <georg.wrede iki.fi> writes:
BCS wrote:
 Does anyone have a good solution to installing both D1 and D2 on the 
 same system?
~$ cd /usr/local/digitalmars/ digitalmars$ ls -l total 25216 drwxr-xr-x 9 root root 4096 2009-04-03 03:19 dmd1042 -rw-r--r-- 1 root root 7240365 2009-04-03 03:18 dmd.1.042.zip drwxr-xr-x 9 root root 4096 2009-04-20 13:32 dmd2029 -rw-rw-r-- 1 root root 9353643 2009-04-20 13:30 dmd.2.029.zip digitalmars$ cd ~$ grep dmd .bashrc alias dmd1=/usr/local/digitalmars/dmd1042/linux/bin/dmd alias dmd2=/usr/local/digitalmars/dmd2029/linux/bin/dmd ~$ Of course, using /home/georg/dcompilers/dmd1042 or whatever, would be the same, unless I want others to use D, too. (The zip files aren't of course needed, but that's as good a place as any to store them if I don't want to delete them after unzipping.) I don't add the dmd directories to the path, edit dmd.conf, or do anything else. Except, of course chmod +x dmd :-)
May 17 2009
parent reply BCS <none anon.com> writes:
Hello Georg,

 BCS wrote:
 
 Does anyone have a good solution to installing both D1 and D2 on the
 same system?
 
~$ cd /usr/local/digitalmars/ digitalmars$ ls -l total 25216 drwxr-xr-x 9 root root 4096 2009-04-03 03:19 dmd1042 -rw-r--r-- 1 root root 7240365 2009-04-03 03:18 dmd.1.042.zip drwxr-xr-x 9 root root 4096 2009-04-20 13:32 dmd2029 -rw-rw-r-- 1 root root 9353643 2009-04-20 13:30 dmd.2.029.zip digitalmars$ cd ~$ grep dmd .bashrc alias dmd1=/usr/local/digitalmars/dmd1042/linux/bin/dmd alias dmd2=/usr/local/digitalmars/dmd2029/linux/bin/dmd ~$ Of course, using /home/georg/dcompilers/dmd1042 or whatever, would be the same, unless I want others to use D, too. (The zip files aren't of course needed, but that's as good a place as any to store them if I don't want to delete them after unzipping.) I don't add the dmd directories to the path, edit dmd.conf, or do anything else. Except, of course chmod +x dmd :-)
So the dmd.conf in the same dir just works? Sweet, last time I tried it it didn't.
May 17 2009
parent Georg Wrede <georg.wrede iki.fi> writes:
BCS wrote:
 Hello Georg,
 
 BCS wrote:

 Does anyone have a good solution to installing both D1 and D2 on the
 same system?
~$ cd /usr/local/digitalmars/ digitalmars$ ls -l total 25216 drwxr-xr-x 9 root root 4096 2009-04-03 03:19 dmd1042 -rw-r--r-- 1 root root 7240365 2009-04-03 03:18 dmd.1.042.zip drwxr-xr-x 9 root root 4096 2009-04-20 13:32 dmd2029 -rw-rw-r-- 1 root root 9353643 2009-04-20 13:30 dmd.2.029.zip digitalmars$ cd ~$ grep dmd .bashrc alias dmd1=/usr/local/digitalmars/dmd1042/linux/bin/dmd alias dmd2=/usr/local/digitalmars/dmd2029/linux/bin/dmd ~$ Of course, using /home/georg/dcompilers/dmd1042 or whatever, would be the same, unless I want others to use D, too. (The zip files aren't of course needed, but that's as good a place as any to store them if I don't want to delete them after unzipping.) I don't add the dmd directories to the path, edit dmd.conf, or do anything else. Except, of course chmod +x dmd :-)
So the dmd.conf in the same dir just works? Sweet, last time I tried it it didn't.
Yeah, this seems to have changed. Now dmd just works without acrobatics.
May 17 2009
prev sibling next sibling parent Daniel Keep <daniel.keep.lists gmail.com> writes:
BCS wrote:
 Does anyone have a good solution to installing both D1 and D2 on the
 same system?
I have... (goes to check) 10 different compilers on my system. There's \dmd\bin\dmd-default which is the only one on the PATH (and is basically a stable version of Tango and DMD). If I want to use the others, I use the full path to them. OR, you can use rebuild and configure it with extra compiler profiles, then use (for example):
 rebuild -dc=dmd-1.035 stuff
-- Daniel
May 17 2009
prev sibling parent David Ferenczi <raggae ferenczi.net> writes:
BCS wrote:

 Does anyone have a good solution to installing both D1 and D2 on the same
 system?
Naryl made it available on Gentoo. The two versions will get installed into different slots (sepcialtiy of the portgae package manager), and it works great. Switching between different profiles (eg. dmd1-phobos or dmd2-phobos, etc.) is done by the "eselect" Gentoo utility. See: http://code.assembla.com/d-overlay/subversion/nodes
May 18 2009