OS X Installer
Jacob Carlborg
doob at me.com
Wed Aug 12 04:18:11 PDT 2009
On 8/7/09 17:32, Anders F Björklund wrote:
> Michel Fortin wrote:
>>>> The objection (if any) was mostly about "/usr/local/dmd/osx/bin"
>>>> vs /usr/local/bin, but using /usr/local/{dmd,dmd2} should be OK.
>>>
>>> I was thinking about using /usr/local/{dmd,dmd2} and then create
>>> symlinks to /usr/local/bin. But that will create problems with the
>>> dmd.conf because it also needs a symlink in /usr/local/bin and then
>>> the conf file for dmd and dmd1 will conflict.
>>
>> The solution is to create a "symlink program" and drop it in
>> /usr/local/bin. I know it works; I wrote one to do just that:
>>
>> #include <unistd.h>
>>
>> int main(unsigned int argc, char **argv) {
>> argv[0] = "/usr/local/dmd/osx/bin/dmd";
>> execv("/usr/local/dmd/osx/bin/dmd", argv);
>> }
>
> I did that for my linux package, but used shell instead.
> Then the dmd.conf was a link back to the real config file,
> to /etc/dmd.conf for dmd and to /etc/dmd2.conf for dmd2...
>
> /usr/bin/dmd2 -> /usr/libexec/dmd2/dmd
> /usr/libexec/dmd2/dmd.conf -> /etc/dmd2.conf
> Then the conf files didn't conflict anymore.
>
> --anders
If I understand you correctly you have a symlink "/usr/bin/dmd2"
pointing to "/usr/libexec/dmd2/dmd" and then a symlink
"/usr/libexec/dmd2/dmd.conf" pointing to "/etc/dmd2.conf".
I can't see how that would work, correct me if I'm wrong: dmd will only
search for a conf file named dmd.conf in the same path as the dmd
executable, in /etc or in the user home directory.
dmd will not find the file in /etc because it's named "dmd2.conf". The
file "usr/libexec/dmd2/dmd.conf" will not work because the dmd.conf will
needs to be in the same directory as the symlink and not the actual
executable, this was the first I tried.
/Jacob Carlborg
More information about the Digitalmars-d
mailing list