Mac OSX installer for dmd

Michel Fortin michel.fortin at michelf.com
Mon Aug 2 07:41:50 PDT 2010


On 2010-08-02 09:18:37 -0400, Andrei Alexandrescu 
<SeeWebsiteForEmail at erdani.org> said:

> On 08/02/2010 06:01 AM, Jacob Carlborg wrote:
>> Have you guys completely forgot
>> http://dsource.org/projects/dmd-installer/browser/trunk/osx ? It's been
>> there for over a year.
> 
> Hi Jacob,
> 
> Apologies for the oversight. I take it it's okay if Walter uses your 
> code to build the distribution automatically? If so, what are the 
> similarities and the differences with Michel's approach?

I think I can answer that.

* Jacob's installer includes DMD directly inside the installation 
package, which I believe is more practical for the user, but less for 
the maintainer as the installer needs to be rebuild for each new 
release. My installer downloads the latest version during the install. 
I do this so I can host the installer on my website with no licensing 
issue and update it only when releasing a new version of D for Xcode.

* Jacob's installer installs in /usr/share/dmd and creates symlinks in 
/usr/bin and /usr/share/man. D for Xocde installs DMD 1 in 
/Library/Compilers/dmd and DMD 2 in /Library/Compilers/dmd2 (user 
visible folders) and makes symlinks in /usr/local/{bin,lib,man}.

* Jacob's installer requires a modified dmd.conf file. Not with my 
installer. With mine, once the symlinks are in place you can just swap 
the dmd or dmd2 folder in /Library/Compilers with a newer one from 
Digital Mars, but you'll need to set the executable bits manually 
(because Walter's archives comes without the executable bit set).

* With Jacob's installer, DMD 1 and DMD 2 will overwrite each other (or 
so I believe). My installer is meant to have both dmd1 and dmd2 usable 
at the same time. Essentially the symlinks /usr/local/bin/* pointing to 
/Library/Compilers/{dmd,dmd2}/osx/bin/* are arranged to that you can 
call 'dmd1' and 'dmd2' from the command line to get either one or the 
other, and 'dmd' will call either dmd2 or dmd1, which you can change 
with the 'sudo setdmd 1' or 'sudo setdmd 2' command. This mimics 
somewhat how Apple bundles multiple versions of GCC in the Xcode 
package and allow changing the default version.

As a side note, my D plugin for Xcode expects DMD to be available at 
/usr/local/bin/{dmd,dmd1,dmd2} and the runtime libraries should be in 
/usr/local/lib. It won't work if the files can't be found there, 
although I might change that if an official distribution of DMD 
installs itself elsewhere.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d mailing list