Anders F Björklund wrote:
Georg Wrede wrote:

What this all comes down to, is, one should be able to install dmd for himself, without root privileges, and another user maybe a different version of dmd for herself. And a company should be able to install dmd for everybody on a computer.

The instructions was added to Wiki4D, hoping they would be included:
http://prowiki.org/wiki4d/wiki.cgi?D__Tutorial/InstallingDCompiler#InstallingDMDonLinuxX86

As a side benefit, fixing this most probably yields an easy (and documented) way to conveniently have several dmd versions installed and usable. For example, D1 and D2, or the last dmd for research and an older one for a multi-month pay project.

I have D1 installed as "dmd" and D2 installed as "dmd2", it takes
some tricks to have it read /etc/dmd.conf and /etc/dmd2.conf though.

--anders

To my surprise, this seems to work:

$ cd Download
$ unzip dmd.1.040.zip
$ mv dmd dmd1040
$ unzip dmd.2.025.zip
$ mv dmd dmd2025
$ alias d1=/home/georg/Download/dmd1040/linux/bin/dmd
$ alias d2=/home/georg/Download/dmd2025/linux/bin/dmd
$ chmod u+x /home/georg/Download/dmd1040/linux/bin/dmd
$ chmod u+x /home/georg/Download/dmd2025/linux/bin/dmd
$ cd /tmp
$ vi ver.d
$ cat ver.d
import std.stdio;
import std.compiler;

void main()
{
  writefln("Version %d.%d", version_major, version_minor);
}
$ d1 ver.d
$ ./ver
Version 1.40
$ mv ver ver1
$ d2 ver.d
$ ./ver
Version 2.25


This leads one to expect that most of the job is done!

Now you actually can have several D versions as non-root installs!!

I wonder if there are some unexpected gotchas or caveats?

(And no, I don't have binaries in Download like this, it's just a test...)

Reply via email to