Michel Fortin wrote:
To me, the biggest problem is deciding where the files should go. There doesn't
seem to be any consensus or culture in OS X about this.
I agree. It took me quite a while to decide to do things as I did. The goals
were:
1. It should be easy to manually replace DMD from a new package from Digital
Mars.
2. It should work on the command line with no user intervention (no need to add
something to $PATH in the bash profile for instance).
3. It should not mess with the system directories.
It used to be that /usr/local/bin wasn't in the $PATH, and that
the shell wasn't bash either for that manner. And since GDC was
using the GCC installation anyway, it installs into /usr/bin...
(while being relocatable to a root, like Developer/usr/bin too)
Except when it come from third party package managers (fink,
MacPorts), most Unix software not coming from Apple installs in
/usr/local on Mac OS X (for instance I have: MySQL, Git, Mercurial,
Doxygen, 7za and a couple others there). So it makes a lot of sense
to install it there.
Yeah, as long as the user has admin privileges the /usr/local
hierarchy (and matching /Library) is definitely the one to use.
[...]
And using /usr/local/{dmd,dmd2} wasn't entirely satisfactory either. Mac
OS X hides the /usr folder when you browse using the Finder. So
replacing /usr/local/{dmd,dmd2} manually with a newer one isn't as
straightforward as it should be. I settled on using
/Library/Compilers/{dmd,dmd2}. This isn't entirely satisfactory either
since it doesn't follow UNIX ways, but it's not too far of how Mac OS X
is packaged and I told myself it'd be easier to support users that way.
Sounds excellent. For instance Python is packaged in the same way.
(/Library/Frameworks/Python.framework and symlinks from /usr/local)
For a hybrid environment like Mac OS X it makes sense to use both...
Then the user can either use the Unix way or set it up like Windows.
Now, the only missing piece for an easy manual replacement of DMD is a
zip archive where the executable bit is set.
Hard to believe that bit is still missing, after all these years.
--anders